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

#1 2010-02-17 23:19:52

SnoopyXD
Scratcher
Registered: 2010-02-17
Posts: 2

Stop Script Question

The      <stop script>      only stops the block of script stuff it's in, so is there an easy way to stop all the scripts in a sprite? I want to make it so when it receives something, it stops all the scripts. :S

Offline

 

#2 2010-02-17 23:28:21

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: Stop Script Question

Unfortunately there isn't a block for that, but you can do it fairly easily. Create a variable called "Stop Sprite" or something. Right after one of your When Green Flag Clicked blocks put:

set (variable) to 0

Then around every script (you can take some away later if they are messing up your project) add these blocks:

if variable = 0
(your main code)
else
stop script

Last but not least, under the when I recieve block you were talking about in your original post put this:

When I recieve (whatever)
set variable to 1

That's it. I hope I helped!  smile

Offline

 

Board footer