Broadcast __shout__go__ vs clones

Bug ?

If i create somes clones of an object and i broadcast __shout__go __ (green flag: page 105 in the manual), the app restart but the clones are not destroyed ! However, if I press the real green button, the clones are destroyed before the app restarts ...

The first time i run the app with the real green flag:

If i click on the broadcast block one time:

If i click on the broadcast block a second time (i noticed something: watch this, the green flag block was executed 25 times ! (24 clones+the original sprite = 25) :

At the end of the second broadcast:

In Scratch - green flag event stops all scripts and then launches scripts under green hats

Snap! didn't copy this behaviour - its up to us to stop scripts programatically or press red stop before green flag

But it looks like pressing green flag is still clearing old clones

So just add this code before you broadcast block and you should get same behaviour


PS remember with your clones, that they also receive the green flag event :slight_smile:

I know how to bypass it, that's not the question...


Sorry, Scripts can't simulate clicking the green flag: It only doing half of the job... Because, when i hit the real green flag, the clones are deleted....

__shout__go__ just triggers all the when green flag events. It doesn't actually press the green flag.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.