Loop: Difference between revisions

26 bytes removed ,  4 July 2024
Changed a link from List Element to List
(Updated and revisited the page)
(Changed a link from List Element to List)
 
Line 11: Line 11:
}}
}}


The Loop block is used to run a script multiple times in the same frame. Often used for processing every element in a [[List Element|list]].
The Loop block is used to run a script multiple times in the same frame. Often used for processing every element in a [[List]].


The loop will execute everything connected to the Do wire Stop - Start times, with the counter incrementing (or decrementing) from Start to Stop on each iteration.
The loop will execute everything connected to the Do wire Stop - Start times, with the counter incrementing (or decrementing) from Start to Stop on each iteration.
Line 27: Line 27:


One of the most common uses of loops is to perform some operation to many blocks at once.
One of the most common uses of loops is to perform some operation to many blocks at once.
To do that, the blocks should be added to a [[List Element|list]].
To do that, the blocks should be added to a [[List]].


In the example below, we're moving the blocks by (0, 0, 0.1) every frame.
In the example below, we're moving the blocks by (0, 0, 0.1) every frame.