Numbers / Basic
Distance Between
Measures the distance between two units.
Current editor blockBlock ID 38DistanceEntre

What it does
Returns the rounded distance between their positions.
Inputs
- First unit.
- Second unit.
Try it
If Distance Between Enemy and Player < 5, Attack.
Tips
- This is the easiest way to make range-based behavior.
Sources
Legacy pages reviewed: DistanceEntre
Code checked: MagiCats_UnityProject/Assets/Scripts/Blocks/ContentFonction.cs, MagiCats_UnityProject/Assets/Scripts/Blocks/BlockManager.cs