Skip to main content

Execution


Response_Loop.png Loop


Ceiling Node.png

The Loop node enables the user to repeatedly execute a connected response for a specified number of times as defined in the Number of Loops field. Each time the event connected to the loop is triggered, the response is executed repeatedly, and the loop continues until the assigned number of repetitions is completed.


Example

image.png

In this example, a Loop node is used to repeatedly execute the connected response that decreases the value of a number variable by one. The Decrement response is repeated for the number of times specified in the Number of Loops field, with the duration between each repetition set in the Interval field. Once the assigned number of repetitions is completed, the sound named Countdown_Over plays.



Response_Loop.pngResponses_execution_RunScript.png Run Script


Ceiling Node.pngCeiling Node.png







The LoopRun Script node enablesallows the user to repeatedly execute aadvanced connectedfunctions responseusing the Lua programming language. This node provides flexibility by enabling custom scripts to be triggered when an event occurs. Allowing for acomplex specifiedoperations numberand oflogic timesto be carried out as defined in the Numberscript. ofThis Loopsnode field.is Eachideal timefor scenarios requiring functionality beyond the eventstandard connectednodes, tooffering advanced customization and control over the loopsystem.

is

You triggered,can read about Lua Scripting in SimLab Training builder through the responsefollowing is executed repeatedly, and the loop continues until the assigned number of repetitions is completed.Blog:

Lua Scripting Blog


Example

image.png

Lua

In this example, a Loop node is used to repeatedly execute the connected response that decreases the value of a number variable by one. The Decrement response is repeatedDocumentation for theSimLab numberTraining ofBuilder

times specified in the Number of Loops field, with the duration between each repetition set in the Interval field. Once the assigned number of repetitions is completed, the sound named Countdown_Over plays.