Distribution Controller

From C4 Engine Wiki
Revision as of 10:46, 15 July 2023 by Eric Lengyel (talk | contribs) (Created page with "__NOTOC__ The '''Distribution Controller''' is a special type of controller that forwards the messages it receives to other controllers. This can be useful for performing the same action on multiple nodes in the world using only a single script method. If the target of a script method has a Distribution Controller attached to it, then it's as if the same script method were applied to all of the nodes to which the distribution controller forwards its messages. As an exam...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The Distribution Controller is a special type of controller that forwards the messages it receives to other controllers. This can be useful for performing the same action on multiple nodes in the world using only a single script method. If the target of a script method has a Distribution Controller attached to it, then it's as if the same script method were applied to all of the nodes to which the distribution controller forwards its messages.

As an example, suppose that you want to hide five different geometry nodes in a world. You could place a marker node somewhere, attach a Distribution Controller to it, and connect it to the five geometry nodes. The node to which a script is attached would be connected to the marker node with the Distribution Controller, and the script would contain a Hide Geometry method that targets the marker node. If the Distribute messages through connectors option is selected for the Distribution Controller, then Hide Geometry method would cause all five connected geometry nodes to be hidden.

Settings

The following settings are available for Distribution Controllers. The target node is the node to which the distribution controller is attached. If more than one of the following options is selected, then all of the selected options apply.

Setting

Description

Distribute messages to self

Specifies that messages should be processed by the Distribution Controller itself and thus applied to the target node.

Distribute messages to subnodes

Specifies that messages should be forwarded to all immediate subnodes of the target node.

Distribute messages through connectors

Specifies that messages should be forwarded to all nodes to which the target node is connected.

See Also