Pages: 1
Topic closed
even if means adding variables to every script
Offline
Check my game Air Raid and go tho the Control sprite and the Pause sprite.
Offline
You've really got to go through every script and add an extra conditional (for things like "when key [] pressed", and "when sprite clicked") or a "wait until" block. To halt loops, just stick "wait until <(pause?) = [false]>" block (beware of loops within loops, as the pause won't take effect until the "wait until" is hit upon, so sticking a "wait until" inside loops that are inside loops can make the pause more immediate. Any variables with a deliberate delay can be tricky, and I don't think there is a general script for pausing scripts with "wait (1) secs", or those that rely on the timer.
Last edited by MoreGamesNow (2012-05-21 21:07:46)
Offline
@MoreGamesNow- That's correct, you can't pause blocks like "glide for 1 sec" and "wait 1 sec", or any other time-dependent blocks. You just have to figure out a workaround (which there always is, though sometimes it's a bit complicated).
Offline
Thanks guys, that helps alot
Offline
Here's my example of a block that will pause a game made, with a
wait (1) sec.block in it:
Offline
when gf clicked repeat until <(timer) = [100000000000]> go to [mouse-pointer v] wait until <tempo = [7]> end
Offline
Then, use script
when i receive [pause] set [tempo] to [7]
Offline
And, don't forget
when i receive [unpause v] set [tempo v] to 0
Offline
Topic closed
Pages: 1