hello i need alittle help please
ok how do i have a sprite when it start at the bottom of screen moving vertically i only move it horizotally so that it go up to hit another sprite? i dont want to hold it with arrow but just move it from side to side before it hit a sprite at the top of the screen? there will be another sprite moving up i dont want it to stick to. i want to use right left arrow to direct them in a position to hit a moving sprite going left to right at the top of screen. also when it hit sprite at top make a sound . when game over the screen say game over
thank you
Offline
I think that this is what you need for your sprite:
when gf clicked
repeat until (touching [target v]?)
change y by (1)//Adjust for a faster speed upwards.
if (key [left v] pressed?)
if <(x velocity) > (-5)>//Change the -5 to edit the max speed leftwards.
change [x velocity v] by (-.5)
end
else
if (key [right v] pressed?)
if <(x velocity) < (5)>//Change the 5 to edit the max speed rightwards.
change [x velocity v] by (.5)
End
else
change [x velocity v] by ((.5)*(([abs v] of (x velocity))/(x velocity)))
end
end
change x by (x velocity)
end
play sound [sound v]
And use this in the You Lose sprite:when gf clicked hide when I receive [You Lose v] show stop all//Opptional.I hope that this helps!
Last edited by ErnieParke (2012-10-31 16:28:02)
Offline