View Single Post
random objects in an if/else
Old
Porpoise
Guest
 
Status:
Posts: n/a
Smile random objects in an if/else - 04-09-2010, 04:34 AM

I have a question about selecting a random object from a list and using the object selected in an if/else.

More specifically, I am working on a game of wack-a-mole (with hares instead of moles) and I want to make an if/else statement that asks "if the random hare selected is below ground, move the same random object selected up .5 meters. Else, do nothing.

Hopefully the end result will be Alice selecting a hare at random and moving its head above the ground if it it currently below it, and then go back down when you click on it.

Currently, i have it set up so that a specific object chosen by me (hare1, hare2, ect.) goes up the height of its head and gives the player 3 seconds to click it. after the 3 seconds are up, it checks whether it is above or below ground (If the player clicked it, it should be below ground). If it is below ground, it makes the next one go up. If it is above ground (meaning the player hasn't clicked it), it goes down on its own and the next one goes up.

thanks in advance.
Attached Files
File Type: a2w wackamole.a2w (1.44 MB, 16 views)
   
Reply With Quote