i tried this
when i receive [Begin!] show variable [time] If <(time) > 120> broadcast [Game over] and wait else forever wait [1] secs change [time] by 1 end endi tried this and many other things but when i do the thing to broadcast "Begin!" only for 1 second my battle screen shows then the game over thing where it goes back to menu appears!
Offline
Try this:
when I receive [Begin! v] reset timer show variable [time v] forever set [time v] to (round (timer)) if < (timer) > (120) > broadcast [Game over v] and wait endHope that helps!
Last edited by AtomicBawm3 (2012-05-17 18:41:47)
Offline
AtomicBawm3 wrote:
Try this:
when I receive [Begin! v] reset timer show variable [time v] forever set [time v] to (round (timer)) if < (timer) > (120) > broadcast [Game over v] and wait endHope that helps!
this will work ^
the problem with your script is that you're forgetting a forever loop, so it only asks itself "time>120?" once. You need a forever for it to keep asking itself the statement.
Offline
thanks guys i'll try it soon...also do you know how to make it so a sprite can collide with something and won't move through it?
Offline
Gokurox296 wrote:
thanks guys i'll try it soon...also do you know how to make it so a sprite can collide with something and won't move through it?
That's pretty general question...the general answer is:
if <key [up arrow v] pressed?> move (4) steps if <touching [wall v]?> move (-4) steps end endYou can replace the move block with any method of movement you want...this is not the only way to do this, but it's one of the simpler ways.
Offline
You've always got to make sure to reset your variables, or things will happen that aren't supposed to. Hope your game turns out well!
Offline