leopard
leopard copied to clipboard
Allow broadcasts to pass arguments?
Scratch broadcasts only allow you to trigger behavior in other sprites, with no way to include any information in the broadcast message itself.
Leopard could extend this behavior by allowing you to pass arguments into the broadcast, and then calling sprites' "when I receive" handlers with those arguments. This would make them into an actual message-passing system.
I'm not sure how this would interact with TypeScript--I guess the broadcast arguments would have to be of the any
type? I don't know how to map a specific broadcast message string to a set of specific argument types.