Loop
Last updated
Last updated
The Loop Node is useful to create code loops within the diagram.
Under the node's Property Drawer, you can define the amount of loops to be executed. This value can either be static, that is, a defined number of times, or dynamic, using the Tag System.
The use of dynamic values is very useful for defining loops that should increase or decrease based on other variables. An example of such scenario would be creating a general player game loop and having a player base counter (using Data Node) assigned to the loop count. In this manner, it's possible to calculate outcomes for each individual player in the player base.
The Loop Node has multiple Chain Connection and Logic Connection inputs and outputs. There are outer and inner connection points.
The outer connection points are used to interface the Loop Node with other nodes in the diagram and the inner ones are used to interface the nodes within the loop itself.
The right-most inner Chain Connection point is the End Connection for the loop. Once it is triggered, the loop will break, executing the next chained node (outer Chain Conneciton point).