How to tell a clone to do something?

I have a solution for this already: tell "ask Sprite for (my clones)", but even though it works, it always gives me the "Hmm... reporter didn't report" message. Do I need to fix it if it already works? Will it decrease performance? And if so, how else can I tell a clone to do something?

Can you link to an example that does this?

Here's the link. You have to beat the game to see it, so I set the enemy's health to 0. Just press the green flag and it should show up when the tank explodes.

Not seeing any errors popping up at all

Ignore that - I was letting my tank get blown up.

How do I fire the gun on my tank?

In any case - which script in which sprite gives the error message?

All you have to do is add a report block at the end of the script, like this:
untitled script pic (2)

But I don't think we should have to do that unless there is an issue within the "whatever script..." command block.

tell is a command block to run a set of command blocks - nothing should be reporting

Thanks

Try running the script without the report block

Now that I think about it, this probably should be in bug reports.

There was a thread about this behavior not too long ago. Jens said that telling a list of sprites is technically not supported, so it's technically a bug. The official way of doing that is by just using a for each loop.

for each ((clone :: variables)) in (my [clones V]) {
  tell (clone :: variables) to ({...} @> ) @:>
}

Thanks! But what if I just want to tell one clone, and the sprite has multiple?

Then just do tell (item (1 v) of (my [clones V])) to ({...} @>) @:>

Oh, of course. Ty!

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