I'm making a game where there are bananas falling from the sky and a character below has to catch them, and if a banana hits the floor, then the game ends. I'm having trouble making the banana reset to the top of the screen after it touches the character. This means that instead of 1 point per banana it is more like 50 per banana, and the game ends after 1 banana touches the ground. I need help with this.
Offline
Try using this with your bananas:
when gf clicked forever if (touching [character v]?) change [score v] by (1) go to x: (pick random (-240) to (240)) y: (180)//Resets banana's position. else change y by (-1)//Adjust to make your banana faster/slower. End if <(x position) < (x position of floor)> Game over scripts endI hope that this helps!
Last edited by ErnieParke (2012-11-04 17:59:18)
Offline
What you want is this:
when gf clicked forever hide wait (pick random (1) to (2)) secs show go to x: (pick random (-200) to (200)) y: (170) repeat until <<touching [character v]?> or <touching [ground v]?>> change y by (-3) end if <touching [character v]?> change [points v] by (1) end if <touching [ground v]?> stop all end end
Offline