Overview
Loops apply an action or group of actions multiple times, through a group of children, a range of values, or an array. Each of these types is included in the same action, but they'll show as Loop / Array, Loop / Range, and Loop / Children in the quick add menu.
Loops make it quicker to iterate. Instead of adding and editing multiple actions across different children, different values, or different array items, you can use one Loop node to target all the children, values, or array items with a single action.
If you’re familiar with For Loops in code, Play’s Loops should be intuitive.
Action Properties
Type
Select whether to loop through a stack of children, a range of values, or an array:
Children: Apply actions to each child in a selected parent.
Range: Apply actions using each value in a range.
Array: Apply actions to each item in an array.
Parent
Select the stack or page containing the children that will be looped through. (for Children loops only)
Start
Select the first number in the range that will be looped through. This number will be indexed at 0. (for Range loops only)
End
Select the last number in the range that will be looped through. (for Range loops only)
Array
Select the array variable to loop through. (for Array loops only)
Index
Set the Loop's order:
Forward: Starts the loop at index 0, then 1, 2, 3, and so on until the final index.
Reverse: Starts at the final index and works backward to index 0.
Random Once: Cycles through the indices randomly once.
Random: Cycles through the indices randomly.
Expression Editor Properties
Child
Loop.child
Target each child, value, or array item in the loop.
Count
Loop.count
Total number of children, values, or array items in the loop.
Index
Loop.index
Index number of each child, value, or array item in the loop.
Index Inverted
Loop.indexInverted
Inverted index number of each child, value, or array item in the loop.