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

#1 2013-02-09 06:50:37

Bombguy2010
New Scratcher
Registered: 2013-02-08
Posts: 17

How to stop activation of other script when one script is running?

For example, while one series of script is running, how do i make it that you can't press any buttons to activate another series of script in the same sprite?

Thanks

Offline

 

#2 2013-02-09 10:54:03

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: How to stop activation of other script when one script is running?

Bombguy2010 wrote:

For example, while one series of script is running, how do i make it that you can't press any buttons to activate another series of script in the same sprite?

Thanks

Well, one way is to use a variable that's 1 whenever your first script is running and 0 when it isn't. Then, in your second script, just use this if statement:

if <(Script 1 Running?) = (0)>
 Run script...
end

I hope that this helps!


http://i46.tinypic.com/35ismmc.png

Offline

 

#3 2013-02-09 19:00:05

Bombguy2010
New Scratcher
Registered: 2013-02-08
Posts: 17

Re: How to stop activation of other script when one script is running?

Where can i find "run script" ?

Offline

 

#4 2013-02-09 19:05:02

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: How to stop activation of other script when one script is running?

Bombguy2010 wrote:

Where can i find "run script" ?

"run script" isn't a block, that's where your code goes that you want to run when the other isn't running


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

Board footer