So I'm making a sonic fan game where you're cream the rabbit and you have to find her pet chao "cheese" behind one of the bushes in each level. I was just wondering how I would make the chao end up behind a diffferent Bush each time you boot up the game. Would you use the random instance or what?
This is easy. Try this:
system condition: "Pick random instance" (bush)
Chao command: "set position to another object" (bush)
Than you only need to add the move to object command.
Develop games in your browser. Powerful, performant & highly capable.
Event--->System/pick random BUSH instance
Action--->CHEESE/ (Here is where you can try a few things out that are available and see what works for you. Remember you can use an expression like BUSH.X to get the BUSH's x position and BUSH.Y to get y position.)
Sounds super simple! I saw the pick random instance expression the other day and wondered when ill be using it.
I just tried it and the chao ended up being behind every single Bush, not just one.
It's looping cos you haven't set any restrictions on it Add a Trigger Once, or make it a sub-event of "On start of layout"
i've run into another problem; I also want bombs to appear if you pick the wrong bush. How do I choose random bushes with more than 1 bomb?