How can stage send message m(5) to sprite S?

Sprite S implements a "for this sprite only" custom block m(x).

How can the stage tell S to execute m(5)? When I'm in the stage script area I see no way to access m to put into a tell block.

Feel I'm doing or understanding something wrong.

Thanks!

Easy: go to the sprite with the block. Drag the block and drop it on the stage sprite in the sprite selector area. Go to the stage. You should see it and be able to run it in the tell block.

If you grab an OF block from the Sensing category, set the right input to sprite S, then pull down the pulldown in the left input, you'll see S's local blocks. Then you put the OF in a RUN or LAUNCH block.

Also, if you need to access other sprites local vars, you can drag and drop them across

Or you can type it in like this

Finally got this post right :slight_smile:
Did you mean to make this a wiki post?

I did not know that.

Yeah, OF is the official Jens-approved way to refer to another sprite's local procedure. The indented visual presentation of those blocks is meant to remind you that the block by itself has no meaning -- you can't drag it out of the OF block to put in a script -- but when paired with the sprite to which it belongs, it becomes something you can call/run in a script.

I can drag m from S's palette to the stage in the sprite selector area & drop it there, but it does not then appear in the stages scripts workspace.

Try to right click, and press clean up blocks.

still doesn't work.

Huh. Must have been a bug back when I tested it when I first tried Snap!...

(Ugh I'm bad at grammar)

I think I remember it too, but now it's been fixed so you have to use sprite local blocks in another sprite the intended way, using OF.

Do you mean spelling? *grammar
EDIT: I think your grammar was fine.

Both lol

Seems like a run-on to me.

I just understood why it is done this way. Thanks, @bh

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