This tool is great for cutting down on the logic connections, often referred to as spaghetti, that can clutter up the Editor when there are a lot of Nodes communicating with each other. It can also be used for triggering many components at once or having many triggers that can activate the same logic chain. Finally they can be used with Behaviors, Function Sources & Reusables to create logic that works right out of the box, no linking required.
The Broadcast Listener will always be used with a Broadcaster.
Enabled | Enable or Disable the node. Disabled nodes cannot be executed |
Listen To | Identifies the Broadcast Signal the Broadcast Listener is listening to |
Target | Target object of the listener |
Channel | Channel of the listener |
On Signal Received | When Signal is received, executes the link & passes the value |
The Broadcast Signal connects Broadcasters to Broadcast Listeners.
When a Broadcaster is executed every Broadcast Listener that is listening to the same Broadcast Signal will execute it's functions.
The name of Broadcasters & Broadcast Listeners will automatically be set to the name of the Broadcast Signal used unless it is manually overwritten.
Targeting allows you to send a Broadcast Signal to a specific Broadcast Listener instead of all Listeners in the game.
When the Broadcaster is targeted to an object only Broadcast Listeners connected to that object will react to the signal sent. This includes Nodes embedded in the object, targeted to the object or in related Reusable or Behavior Containers.
Channels allow you to use the same Broadcast Signal for multiple purposes.
When a Broadcaster is executed only Broadcast Listeners set to the same signal & channel will be executed.
The channel of both Broadcasters & Broadcast Listeners can be changed during runtime allowing a single Node to be used for multiple purposes.
Broadcast signals can be used to send information such as values, vectors & object targets.
Any Node that outputs values, vectors or object targets can be used to send that information through a broadcast signal. Simply execute the Broadcaster with the value output of the source Node and it will include that data in the broadcast signal.
For example:
A Number Node's output is linked to a Broadcaster's Execute input.
A Broadcast Listener set to the same Broadcast Signal has it's On Signal Received output linked to the value input of a Text Node.
Now every time the Number Node is executed it will send it's value through the Broadcast Signal, updating the value in the Text Node.