This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-04-23 13:07:29

AgentRoop
Scratcher
Registered: 2012-02-11
Posts: 1000+

How can I easily make a pause option?

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.  wink
If anybody has any ideas, please help. Take a look at my game and try to figure out an easy way.


La La
I wrote an album.

Offline

 

#2 2012-04-23 13:27:16

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: How can I easily make a pause option?

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!  smile


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#3 2012-04-23 13:35:50

AgentRoop
Scratcher
Registered: 2012-02-11
Posts: 1000+

Re: How can I easily make a pause option?

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!  smile

Ok. It's good to have people helping me, but its not good to hear that i have to put that in everywhere.  sad
It might be done in the next version of my game.

Last edited by AgentRoop (2012-04-23 13:36:11)


La La
I wrote an album.

Offline

 

#4 2012-04-23 14:11:10

mythbusteranimator
Scratcher
Registered: 2012-02-28
Posts: 1000+

Re: How can I easily make a pause option?

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!  smile

Ok. It's good to have people helping me, but its not good to hear that i have to put that in everywhere.  sad
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!!!


http://www.foxtrot.com/comics/2012-04-01-fdb37077.gif
clicky

Offline

 

#5 2012-04-23 21:09:48

AgentRoop
Scratcher
Registered: 2012-02-11
Posts: 1000+

Re: How can I easily make a pause option?

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?


La La
I wrote an album.

Offline

 

#6 2012-04-24 12:46:55

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: How can I easily make a pause option?

No. The only way is to put |wait until <(pause) = (no)>| in every one of your pausible scripts.


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#7 2012-04-24 16:31:49

AgentRoop
Scratcher
Registered: 2012-02-11
Posts: 1000+

Re: How can I easily make a pause option?

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.  wink


La La
I wrote an album.

Offline

 

Board footer