I/O Sets

Video Transcript

A node can have a group of inputs and outputs that can be duplicated and removed by pushing the Add Set and Remove Set button on the node. For example the Pass Through Highest node has a set consisting of an activation input, an activation output, and a trigger output. The set with the highest input activation has its output activation turn on and its output trigger fire when it takes over.

To show the Add and Remove set buttons on a node simply check the I/O Set checkbox. A new icon is added next to the inputs and outputs when the I/O Set option is active. Click on this icon to make the input or output part of the set. Your code has access to an integer variable called SetLength who’s value is the total number of sets added to your node. A node with an I/O set always has at least 1 copy of the set. Inputs and outputs in the set are accessed from code like you would access an array, with brackets surrounding an index value after the input or output accessor. Like an array, the first item in the set has an index of 0.

A common task is to loop through the sets with a for loop. The best way to understand how to use I/O Sets is to study the built in nodes that use them. The Last Triggered, Multi Step, and Range Splitter nodes all use I/O Sets.