Using send block to send parameters to a clone to run a script

I'm experimenting with using the send block to send starting parameters to a script running in a clone of a sprite

Follows on from

So previously I was telling a clone to

image

and had a custom block that ran the script for my AI smart missile

image

Then I switched to this (the all but first is just to save me removing manually smart from beginning of list as I found I didn't need it)

image

and I'm using this to receive the instruction to launch a smart missile

image

So the issues are

  1. Could I make a feature request to say when I receive any message for me (then I wouldn't have to do
    image

  2. Is it safe?

I'm only using this at the moment on one clone and only with one send so its safe as no other messages are being sent like this.

But if I expanded it to my other objects - missiles - bombers, markers and explosions (which can be many clones of each type of sprite) will it still be safe?

When I receive (any message) is always a little tricky if more than one kind of message is floating around. You should have the first thing in the message be a message name and start by testing for that. If it's the right kind of message, then you're the right sprite to receive it, so you don't have to check for whether you're in the list.

The secret hidden misfeature of BROADCAST interpreting a list message as including a list of recipients is one of the things Jens threw in without consulting me, or it never would have happened. If you give BROADCAST a list, then the message should be that list. Now that we have the equivalent non-secret non-hidden feature SEND, we should fix BROADCAST. Imho.

I had a bit of a panic for a second, as I use broadcast green flag clicked, but it turns out that the when I receive any message block ignores that specialist broadcast

image

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