MagiCats
Wiki home
Actions / Move

Run Away

Makes the subject turn away from a target and move forward.

Current editor blockBlock ID 10RunAway
Run Away code block in the MagiCats editor

What it does

Looks at the target position, turns away if needed, then moves forward.

Uses at least 1 step even if the value is zero or negative.

Inputs

  • Target unit.
  • Distance or step count.

Try it

If See Player, Run Away Player 3. A shy enemy flees when spotted.

Tips

  • The subject still needs a movement speed above zero.

Sources

Legacy pages reviewed: RunAway

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