Using the run/tell block on multiple sprites at once

I'm experimenting with these blocks and wondering if there's a way to do something like this (I can't post images or links currently):


This doesn't work as the blocks don't accept a list of sprites. Using a for each loop means they rotate one-by-one, rather than all at once.

I'm sure there are many different ways to do this, but I'm curious about methods similar to the examples given.

What if inside the FOR EACH you LAUNCH (script OF sprite)? Does that do what you want?

I think if we were to invent TELL (list of sprites) TO (script) it'd do them one at a time, just like FOR EACH, so you'd still have to LAUNCH the scripts.

Ah thanks, I did want a launch in a for each.

What's confusing me now is that these two scripts work differently:

The latter script seems to ignore the first item in the list, and instead rotate the last item twice as much.

The former works for what I want to do though at least.

Oh, I had to tell the item to launch, rather than launch the tell. Not sure why.

I'm not sure I know the answer. Maybe it has to do with how the scheduler orders threads; launching the tell means that all the threads are carried out by the original sprite, whereas telling the launch makes one thread in each object.

Could it be that item is updated before the launched tell runs?

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