Broadcast block in Hopscotch?

Hi,
So I had an idea for a broadcast block in hopscotch. I know you can do something like this with variables but I just think that this would be easier.

11 Likes

What would it do if it existed?

4 Likes

Probably trigger another game rule like other drag-n-drops

6 Likes

Yeah, like AE said

7 Likes

Like in scratch

6 Likes

Oh like messages in scratch or whatever those are called. Oh ok yeah that would be cool.

6 Likes

Yeah, that’s where I got the idea.

6 Likes

Yes, this would be very useful and should definitely be added at some point. I’d also like to be able to give it parameters, which would make it even easier to use.

7 Likes

What does that mean?

4 Likes

I am thinking of it as being able to do things add variables to the message which will only exist in the rule that listens for the message.

7 Likes

I am confuzzled

3 Likes

I think petrichor means that there should also be a number to go with it but I could be wrong

3 Likes

Ah. I see.

2 Likes

You could do something like
send (message) to (any object)
to just say “hey, do this thing for me.” But what if you want to say “do this thing for me with these variables?” Then you could add on to the message a list of parameters, which you could use to send the values you want it to use. Then you could do something like this:
send (do something) with (variable 1, variable 2, variable 3, etc.) to (any object)
Then any object could listen for that message and do something with those variables. Each of the variables would only be able to be used inside of the rule where the message is received.

This isn’t really something you could do right now, but variables in the local scope are on the hopscotch roadmap (and I think even something similar to this is too!) and so eventually it could be a thing.


One thing I’d definitely like to see with this is the ability to send it to any object or to select the specific object to send the message to.

6 Likes

This would be very useful, great idea! I’d love to see this in Hopscotch!

4 Likes

I don’t get it, can you elaborate?

3 Likes

yeah me neither
can’t you already do this in hopscotch?

3 Likes

I dunno, no clue what it is lol

2 Likes

i think you like have clones and they could broadcast a number or something and there is a object listening

3 Likes

It’s a block which broadcasts some message. An object can listen for the message with a new when block which listens for a specific message then responds to the message.


Not as easily.

8 Likes