Skip to content
mouse114514 edited this page Sep 12, 2026 · 1 revision

While ... Loop

While ... Loop

Overview

Repeatedly runs the inner statements while the condition is true.

⚠️ Warning: make sure the condition can eventually become false, otherwise you get an infinite loop that freezes the game.

Slots

Slot Type Description
CONDITION Boolean slot loop condition
SUBSTACK Statement slot loop body

Connections

Connection Type Description
Top Statement connects after a previous statement
Bottom Statement continues to the next statement

Generated Code

Emits while (<condition>) { ... }.

Example

while [X < 10]
└── set X to X + 1

Block ID: cu_while


中文 | Flow Control Blocks | Block Reference

Clone this wiki locally