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

#1 2013-02-02 15:13:48

grinneydude
New Scratcher
Registered: 2012-05-09
Posts: 9

help pls ?

Just wante dto know i a have a game were pepole run at you and attak is there a way to make them pause by pressing a key (Is there a script 4 puaeing).

Offline

 

#2 2013-02-02 15:18:42

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: help pls ?

There are many ways you can program pausing, but it's kind of complicated. I think the best way is to have a variable called "paused?" and put
[if <(paused) = 1>]
[ ]Scripts
[                         ]
On top of ALL of the scripts, which then deactivate when you change the variable to 0 or any other number, but then reactive when you put the variable back on 1.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#3 2013-02-02 15:21:27

grinneydude
New Scratcher
Registered: 2012-05-09
Posts: 9

Re: help pls ?

Thanks i was thinking that but i just wanted an opinon from someone elses prospective tankyou.

Offline

 

#4 2013-02-02 15:42:36

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: help pls ?

If you want to see an example of this checkout one of my projects, here, here, or here. All these projects are from the same series, and use the pausing method I explained earlier when you talk to people.

EDIT: Formatting was messed up.

Last edited by henley (2013-02-02 15:43:02)


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

Board footer