How to make the Broadcast message?

Fox Kin 4 years ago updated by Stephen Eddy 3 years ago 7

I want tell many obj  to do same thing……at the same time

but I am not sure which obj (so cant use the custom event)

so I need the function, like this……(in playmaker)

What do I do then in bolt?

Ask for help………………

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):
Satisfaction mark by Fox Kin 4 years ago

There's a trick you can use for this: use the same target/receiver for all the custom events in the scene. 

In the future, with custom event definitions, you will be able to indicate that an event is global, but in the mean time, this is the workaround.


Lazlo beat me to it :)  Heres an example of one target/receiver in all events:

It doesn't matter how many objects you use

thanks!!!!It is very useful !

I must be being stupid because I cannot get this to work.  What needs to be present on GlobalBroadcaster to make this work?

I have tried creating an empty GameObject for global broadcaster but if I do that it does not allow me to drag and drop it onto the object fields of the Custom Events.  I have tried adding Flow Graphs or State Graphs to the global GameObject and it still doesn't allow me to drop them as a target for the CustomEvent source or sink objects.

"but if I do that it does not allow me to drag and drop it onto the object fields of the Custom Events"  ------you can't drag scene object to macro.

A way is use Scene Variables to save GlobalBroadcaster to use in macro

By the way, use the empty GameObject is right.


Thanks for the response.

Are you saying I have to define a reference to the GlobalBroadcaster as a scene variable and then add a Get Scene Variable and feed it into the Event Triggers within the graph?  

The reason I didn't think that was required is that in the screenshots above they show no inputs on the graph but have the object defined on the Event Triggers.  Also, I see the object selector icon to the right of the name.

my solution for prefab.

1. instantiate prefabs and set a specific parent

2. set Trigger Event A on parent

3. set Custom Event A on prefabs and target --- Get Parent 

then you can simply send a event to all your children by a parent GO

but, waiting... global Trigger Event system


gameobject (parent)  ------------------- ( Trigger Custom Event : self )

        - child prefab     ------------------- ( Custom Event / target : Get Parent )

        - child prefab(1)

        - child prefab(2)