MagiCats
Wiki home
Controls / Basic

Loop

Repeats the blocks inside it until something stops the loop.

Current editor blockBlock ID 31Loop
Loop code block in the MagiCats editor

What it does

After the last child block runs, the code jumps back to the start of the loop.

Inputs

  • Blocks snapped inside the loop.

Try it

Loop: Move Forward 3, Turn Over.

Tips

  • Use Out Loop inside a condition to escape a forever loop.

Sources

Legacy pages reviewed: Loop

Code checked: MagiCats_UnityProject/Assets/Scripts/Blocks/ContentFonction.cs, MagiCats_UnityProject/Assets/Scripts/Blocks/BlockManager.cs