Include variables with broadcasted messages

A feature I’d like to see in Hopscotch is:

The ability to include variables with a broadcast message block, so you could, for example, broadcast a message “ask Square to tell me it’s x position” and include a variable which has instructions for sending the x position back. Then Square could listen for this, and in the rule responding to it, get the variable with the instructions. While this isn’t as useful as something like In string, replace something with something (or Some way to copy text), it is definitely a great idea for when you add local variables.

13 Likes

Yes… yes. YES YES YES I NEED THIS

3 Likes

second

yessss

3 Likes

Third yessss

3 Likes

Yo @AstrosUwU and @FRENCH_WAVE123

Nobody would be sooo disappointed

3 Likes

Bruh you could do Square x position

3 Likes

What if Square is a clone?

3 Likes

100 thousand times yes! This can be very useful for many many different reasons…

3 Likes

Then we shall kick square clone from the chat

2 Likes

This seems like an odd feature. You’re basically having a function change a local variable that isn’t its local variable, while that function is running. This seems odd. Just send a string “give me your x” and have the recipient put its x in a global variable (day globalX) and then have the sender put the global variable into its local variable (day localX)

3 Likes

Oh. But how would there be a way to know which clone it is?

3 Likes

then we need to have the ability to access clone attributes

2 Likes

That is possible, but what if you have two objects whose clones are talking to each other at the same time? It’s possible buyt not easy.

3 Likes

Use lists to store the global variables maybe?

1 Like

This would be very useful. You could trigger so many more things with a few lines of code.

1 Like

I think I’m your 4th yes. This would be so cool.

This + message variable = kaboom

Oh yes, we need this! It would be awesome.

1 Like