MagiCats
Wiki home
Controls / Basic

Else

Runs when the previous If and Else If blocks did not run.

Current editor blockBlock ID 34Else
Else code block in the MagiCats editor

What it does

Skips its inside blocks if an earlier condition in the chain already passed.

Inputs

  • Blocks snapped inside.

Try it

If Player is seen, Attack. Else, Patrol.

Tips

  • Else should be last in an If chain.

Sources

Legacy pages reviewed: Else

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