I just came up with a fairly rudimentary way to pause:
Have a sprite with the following script:
<when green flag clicked>
<forever>
<if><key[ p ]pressed?>
<show>
<stop all>
After that have the same sprite with a script that broadcasts a 'resume' message when clicked.
From here it might get a little difficult to get things proceeding as if they were uninterrupted, but if you play around with it you should be able to pull something out.
Offline
^ That way shuts down the entire game.
When you make a pause button, have it set a variable to 1 if paused and 0 if not paused. Then, on any forever, repeating or wait scripts just put right inside them but around everything else,
<if> Pause =0
This makes it so that it will only run while the game is unpaused.
Hope that was clear enough!
Offline
TheSaint wrote:
^ That way shuts down the entire game.
When you make a pause button, have it set a variable to 1 if paused and 0 if not paused. Then, on any forever, repeating or wait scripts just put right inside them but around everything else,
<if> Pause =0
This makes it so that it will only run while the game is unpaused.
Hope that was clear enough!
I did the thing with the variables, but it might of been a different way, all i remember it
that it didn't work
Offline
If forever if(pause =0) did not work, then you are doing it wrong. You can't do it any other way.
Just put forever if(pause=0) on top of all your scripts and set pause to 1 if you want to pause.
Offline
i can get everything on my screen to stop...but i canot get it to play again without making it go back to the beginning -.- please help!
Offline
archmage wrote:
If forever if(pause =0) did not work, then you are doing it wrong. You can't do it any other way.
Just put forever if(pause=0) on top of all your scripts and set pause to 1 if you want to pause.
You can also use wait until <pause=0>
Offline
archmage wrote:
If forever if(pause =0) did not work, then you are doing it wrong. You can't do it any other way.
Just put forever if(pause=0) on top of all your scripts and set pause to 1 if you want to pause.
It Did'nt Work either
Offline