Unit's attack range

soulreaping

New Member
Reaction score
17
Hi,

How do I find out unit's attack range? I've tried GetUnitAcquireRange() but it returns either 500. or 600.


Thanks!
 

Tom Jones

N/A
Reaction score
437
Create two units, one of them should be of the type you wish to detect the attack range of, with a distance greater than the maximum range a unit has in your map apart from each other. Then simply order the unit you wish to detect the attack range of to attack the other unit, when the other unit takes damage, get the distance between them. This should approximately be the attack range of the unit.
 

Hero

─║╣ero─
Reaction score
250
Hi,

How do I find out unit's attack range? I've tried GetUnitAcquireRange() but it returns either 500. or 600.


Thanks!

The Acquire range is when they see the enemy by the way.
Not when they can attack it.

So it's like if a bear sees you from far. He still must come in range to attack you.
 

tauir

New Member
Reaction score
0
Attack?

What about attack? I'm trying to make a skill like double damage. It just keeps coming up as 50 when it's actually around 120.
 

0zaru

Learning vJASS ;)
Reaction score
60
Then now we are deducting by attacking. You must order your unit to attack a dummy unit, when that dummy unit takes damage (You know by a trigger..) then detect the damage(Easy to calculate by getting the max life of the dummy unit - the current life of the dummy unit.. (I don't remember if there was a native that gets the damage :p))
 

tauir

New Member
Reaction score
0
Sry

Should i do an ordered attack? Because when I try tried that, it paused the attack and created another.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top