how to make this script work the way i want to. keep looping vertically (up motion from bottom of stage to top in 0 second). or after it touches a sprite edge of stage loop. also send a crore to a score box
when plag click
forever
move 4 step
point in direction 0
Offline
how to make this script work the way i want to. keep looping vertically (up motion from bottom of stage). or after it touches a sprite at the top of the stage or edge of stage then loop. also send a score to a score box
when flag click
forever
move 4 step
point in direction 0
Offline
edxforme wrote:
how to make this script work the way i want to. keep looping vertically (up motion from bottom of stage). or after it touches a sprite at the top of the stage or edge of stage then loop. also send a score to a score box
when flag click
forever
move 4 step
point in direction 0
This is part of a script from My Gauntlet Game where a ball moves from when end of the screen to the other when it touches a colour- i have changed it so it is touching two sprites and heads to the opposite end when it touches one of the sprites. If you only want one sprite take out the second "if touching"
when gf clicked go to <x: (0), y: (0) > forever if (touching [sprite 1]) change y by <what ever you want> if (touching [sprite 2]) change y by <- what ever you want>sorry about the bad scratchblocks
Last edited by Willpower (2012-10-24 11:37:59)
Offline
willpower
thank you, in addition to the above i need when touch the score go up by 6 and if it touches another it go down by 3..... also when it go to a minus score i have a broadcast saying game over.....help please thank you
Offline
Willpower wrote:
edxforme wrote:
how to make this script work the way i want to. keep looping vertically (up motion from bottom of stage). or after it touches a sprite at the top of the stage or edge of stage then loop. also send a score to a score box
when flag click
forever
move 4 step
point in direction 0This is part of a script from My Gauntlet Game where a ball moves from when end of the screen to the other when it touches a colour- i have changed it so it is touching two sprites and heads to the opposite end when it touches one of the sprites. If you only want one sprite take out the second "if touching"
when gf clicked go to x: (0) y: (0) forever if <touching [sprite 1 v]?> change y by (what ever you want) if <touching [sprite 2 v]?> change y by (what ever you want)sorry about the bad scratchblocks
Fixed for you.
Last edited by Firedrake969 (2012-10-27 15:45:42)
Offline
I think you're looking for this:
when gf clicked set [score v] to [0] go to x: (0) y: (-180) point in direction (0) forever move (4) steps if <<<touching [edge v]?> and <(y position) > [0]>> or <touching [sprite at top v]?>> change [score v] by (6) end if <touching [bad sprite v]?> change [score v] by (-3) end if <(score) < [0]> broadcast [game over v] end
Offline