ReferenceScript nodesUtilities › Flow Control
Repeat Loop
Does body a number of times (a thousand at most), with Index counting from 0, then done.
↻Repeat Loop
Loop Body
Count3Index
Completed
Inputs
| Pin | Type | Starts at | Notes |
|---|---|---|---|
in | what happens next | – | – |
Counttimes | number | 3 | – |
Outputs
| Pin | Type |
|---|---|
Loop Bodybody | what happens next |
Indexindex | number |
Completeddone | what happens next |
The code it becomes
The graph below written as a script would write it.
let s2_index = 0;// On Scene StartL2: for (let i = 0, end = Math.min(1000, Math.floor(3)); i < end; i++) { s2_index = i; scene.log(s2_index);}In a graph
◆On Scene Start
↻Repeat Loop
Loop Body
Count3Index
Completed
ƒPrint
In Text
The node with what starts it and Print to show what it gives, as Studio draws them.
Related
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.