• 🏆 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!

How can I obtain a unit's attack range?

Status
Not open for further replies.
Level 11
Joined
May 16, 2016
Messages
730
Isn't there any other way, throught triggering or that do not involve the object editor ?
You can create the list of all units (or for example create dummy ability and name it "600 aoe". If unit "600 aoe" greater than 0 that means its range is 600.
technically where are no trigger to detect attack range (only acqusition range)
 
Level 3
Joined
Mar 5, 2010
Messages
14
Technically, you can do it by just checking the distance between Points of units A and B but it will not work ''correctly'' if unit A and B get closer to each other.
 
Level 11
Joined
Oct 9, 2015
Messages
721
It's using distance between points, but then I would need the attack range value so the operation would become functional. I think that there's not really a effective and easy way of getting the attack range other than using hashtables or some woraround (like the point value in object editor, mentioned above). There was a thread on the lab that said it could be possible to read data from the object editor (here: Accessing memory from the script - it's time of the revolution ) but it would be even more difficult than building a hashtable.
 
It's using distance between points, but then I would need the attack range value so the operation would become functional. I think that there's not really a effective and easy way of getting the attack range other than using hashtables or some woraround (like the point value in object editor, mentioned above). There was a thread on the lab that said it could be possible to read data from the object editor (here: Accessing memory from the script - it's time of the revolution ) but it would be even more difficult than building a hashtable.

It's using a bit more then just distance between points, if the unit can attack then it'll keep pushing that unit back 25 until it can't and that would be your max range. Planning on turning it into coordinates eventually.
 
Status
Not open for further replies.
Top