• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

What can i compare the trigger editor "range" to

Status
Not open for further replies.
I think he's talking about the distance scale.

You can display the grid in the terrain editor (hotkey G) : there is the largest yellow grid which is 512 large, then the medium white grid which is 128 large and the smallest grey grid which is 32 large.

Most of time, destructables and doodads are usually 64x64 sized minimum but you can create custom paths 32x32, regions are 32x32 sized minimum as well and units has a minimum collision radius of 8.
 
Level 5
Joined
Dec 22, 2008
Messages
100
I think he's talking about the distance scale.

You can display the grid in the terrain editor (hotkey G) : there is the largest yellow grid which is 512 large, then the medium white grid which is 128 large and the smallest grey grid which is 32 large.

Most of time, destructables and doodads are usually 64x64 sized minimum but you can create custom paths 32x32, regions are 32x32 sized minimum as well and units has a minimum collision radius of 8.

Ok :p ty
I was referring to the "unit within range" event so i dont know if thats right or not.
EDIT
Not right for me anyway, i used a "unit within range" event with one of those distances and it just triggers it wherever my units are at.
 
Level 10
Joined
Jun 26, 2005
Messages
236
Tirl is right. To check to distance between two Point(x,y)'s, use the distance formula:

JASS:
function GetDistance takes real x1, real x2, real y1, real y2 returns real
    return SquareRoot(((y2-y1)*(y2-y1))+((x2-x1)*(x2-x1)))
endfunction
 
Level 11
Joined
Sep 30, 2009
Messages
697
JASS:
function GetDistanceBetweenCoordinatesNoRoot takes real x1, real x2, real y1, real y2 returns real
    return ((y2-y1)*(y2-y1))+((x2-x1)*(x2-x1))
endfunction
Would be better for performance because SquareRoot is very slow :/ Just square the compared real then and it will do the same.
 
Status
Not open for further replies.
Top