While events
While events are a special kind of event: as long as the "While` conditions are true, the event is repeated without interruption (the next events are not executed and the screen is not refreshed).

While events are usually not needed, but these events can be used to repeat actions as long as a given set of conditions is true. The While event is useful for algorithms that you may want to create in your game.
Local variables
While events support local variables. Local variables declared in a While event are scoped to the loop: they are initialized before the loop starts and are only accessible within the loop and its sub-events.
Loop counter variable
While events can have a loop counter variable. When set, this variable starts at 0 and is automatically incremented by 1 each time the loop body is executed. This is useful to track how many iterations the loop has gone through without manually managing a counter.
How to add this event
Right click (or long press) on an existing event and choose "Add" in the menu. Then, select the event you want to add. Alternatively, click on the "Plus" icon in the toolbar or on "Add..." at the bottom of the events sheet.
Examples
Tip
See it in action! 🎮
Open these examples online.

