Hello,
I am a Scratcher who is moderately experienced in making games, but I am totally stumped for how to make a game pause and resume easily.
The game that I am working on isSpace Battle v1.2.
Many people have requested a pause option so that they can upgrade without the threat of being destroyed by the enemies, but I am not sure how to do that to my (give or take) 200 scripts in a speedy manner.
If anybody has any ideas, please help. Take a look at my game and try to figure out an easy way.
Offline
Hmm. Scratch does not in fact provide pause support, (though it is a requested feature). The Scratch Modification BYOB provided it in 3.1 and it yet to be added to 4.0. The simplest way I can think of will be in fact to add this snippet inside looping blocks as the last block (i.e. forever, repeat (), repeat until <>):
wait until <(paused) = [false]>Then to pause, just set "paused" to "true" and to resume, set it to "false". Sounds like work, though, but there's not simpler solution. Good Luck!
Offline
Hardmath123 wrote:
Hmm. Scratch does not in fact provide pause support, (though it is a requested feature). The Scratch Modification BYOB provided it in 3.1 and it yet to be added to 4.0. The simplest way I can think of will be in fact to add this snippet inside looping blocks as the last block (i.e. forever, repeat (), repeat until <>):
wait until <(paused) = [false]>Then to pause, just set "paused" to "true" and to resume, set it to "false". Sounds like work, though, but there's not simpler solution. Good Luck!
Ok. It's good to have people helping me, but its not good to hear that i have to put that in everywhere.
It might be done in the next version of my game.
Last edited by AgentRoop (2012-04-23 13:36:11)
Offline
AgentRoop wrote:
Hardmath123 wrote:
Hmm. Scratch does not in fact provide pause support, (though it is a requested feature). The Scratch Modification BYOB provided it in 3.1 and it yet to be added to 4.0. The simplest way I can think of will be in fact to add this snippet inside looping blocks as the last block (i.e. forever, repeat (), repeat until <>):
wait until <(paused) = [false]>Then to pause, just set "paused" to "true" and to resume, set it to "false". Sounds like work, though, but there's not simpler solution. Good Luck!Ok. It's good to have people helping me, but its not good to hear that i have to put that in everywhere.
It might be done in the next version of my game.
The first Space Battle was awesome--can't wait to see the next one!!!
Offline
Thanks! It's coming out soon, but due to what i'm seeing so far, i'm not sure if there will be a pause button. Does anybody know any easy, simple way to pause a game without having to add something to every single one of my scripts?
Offline
No. The only way is to put |wait until <(pause) = (no)>| in every one of your pausible scripts.
Offline
joefarebrother wrote:
No. The only way is to put |wait until <(pause) = (no)>| in every one of your pausible scripts.
Okay. Thanks. I will be back in a few years.
Offline