Message broadcasting

#1

Hello, is there a way to broadcast message to all existing components with msg.post on the global scope? Or can I iterate all existing components in game?

0 Likes

#2

No, tbere is no global broadcast.

However, when you post a message to a game object, the message is sent to all components of that object.

If you tell us what you wish to do, maybe there’s another way we can suggest?

2 Likes

#3

There is no solve from the box, but you may subscribe objects to “event” by youself and use something like https://github.com/britzl/ludobits/blob/master/ludobits/m/broadcast.md

4 Likes

#4

Ok got it. Thanks guys. I just wanted to find a way to broadcast network events via socket. But I’ve realized I should centralize it and use msg.post.

0 Likes