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.
What would it do if it existed?
Probably trigger another game rule like other drag-n-drops
Yeah, like AE said
Like in scratch
Oh like messages in scratch or whatever those are called. Oh ok yeah that would be cool.
Yeah, that’s where I got the idea.
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.
What does that mean?
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.
I am confuzzled
I think petrichor means that there should also be a number to go with it but I could be wrong
Ah. I see.
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.
This would be very useful, great idea! I’d love to see this in Hopscotch!
I don’t get it, can you elaborate?
yeah me neither
can’t you already do this in hopscotch?
I dunno, no clue what it is lol
i think you like have clones and they could broadcast a number or something and there is a object listening
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.