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

#1 2009-04-08 17:31:55

Nanner
Scratcher
Registered: 2009-03-26
Posts: 9

Stop all doesn't stop all!

I have a "typewriter" app that stamps letters on the background when you click on the corresponding "keys".  The background script specifies that when the y-position is less than a certain value (means you've run out of vertical space), Stop All.  (It also specifies that if the x-value gets larger than a certain value, to reset the x-value and decrease the y-value to go to the next line).  But after stepping through the Stop All, the typewriter key sprites  continue to stamp if you click them, all that happens is that the background script is inoperative.  What's happening?

Thanks.

Offline

 

#2 2009-04-09 00:04:08

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: Stop all doesn't stop all!

The thing is:

Stop All really does work... it stops all scripts that are currently running.

HOWEVER,

If you click a key then you start a NEW script running.

Now, to get around this, your keys must check to see if it is OK to allow the key to be pressed, and if it is not ok, just ignore the fact that a key was pressed.


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

#3 2009-04-17 13:26:00

scratchisthebest
Scratcher
Registered: 2009-02-08
Posts: 500+

Re: Stop all doesn't stop all!

What I do is this:[blocks]
<when green flag clicked>
<forever>
     < if  << <mouse down?> <and><touching[ mouse-pointer ]  >>>
     <stamp>
     <end>
<end>

Last edited by scratchisthebest (2009-04-17 13:27:05)


bye 1.4, we all loved you. but we all outgrew the site. 2.0 is a welcome change.
http://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.png

Offline

 

#4 2009-04-20 09:45:09

Dibbo222
Scratcher
Registered: 2007-11-03
Posts: 100+

Re: Stop all doesn't stop all!

<when[ X ]key pressed><when[ X Sprite ]clicked>

^^ those blocks will work at anytime, they will start a new script and will work after u hav 'stopped all'


The biggest tower defense game on Scratch?
http://scratch.mit.edu/projects/Dibbo222/929092

Offline

 

Board footer