• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ HD Level Design Contest #1 POLL is now OPEN! Check out the stunning visuals of the final entries. 🔗Click here to cast your vote!

How to measure range (distance between points) precisely?

Not open for further replies.
Level 33
Mar 27, 2008
There are many ways to measure range (distance), one of it, is this:

  • Measuring Distance
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to *YourAnyKindOfTargetGroundAbility*
    • Actions
      • Set CasterLoc = (Position of (Triggering unit))
      • Set TargetLoc = (Target point of ability being cast)
      • Set Range = (Distance between CasterLoc and TargetLoc)
      • Cinematic - Clear the screen of text messages for (All players)
      • Game - Display to (All players) the text: (The distance between caster's location and the target location is + (String((Integer(Range)))))
      • Custom script: call RemoveLocation(udg_CasterLoc)
      • Custom script: call RemoveLocation(udg_TargetLoc)
This trigger will calculate the distance between the caster's position and the target position.
This is the simplest measuring distance method (for simple purpose).

You need to be specify on what you want to measure, and how that it needs to be measured
Not open for further replies.