• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help attack range

Level 6
Joined
Sep 1, 2022
Messages
92
“I’m trying to set the attack range, but for some reason it doesn’t work. I’m confused that in the object editor it’s set through an integer, but in the trigger through a real number. And the line codes are different. What am I doing wrong?”
EsWNMowAuNg.jpg
QPoStZMskC8.jpg
 
Last edited:
Level 45
Joined
Feb 27, 2007
Messages
5,578
One wholeass type category is fucked for GUI and in the trigger editor supplies the wrong list of codes (based on expected type) for the thing you want to modify. So you might be seeing that category; don't remember which it is off the top of my head. If you write some JASS code you can manually make lines to modify any field code you want, as well as fix the ones GUI can't use properly because of the editor mistakes. As Chaosium said many of the intended ones just don't work, so the likelihood of other random ones you define working is pretty low too but if it's the only option for you....
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
You can adjust attack range using that function, it's just buggy. Also, you need to make sure you change Acquisition Range to always be >= to it.
 
Last edited:
Level 6
Joined
Sep 1, 2022
Messages
92
One wholeass type category is fucked for GUI and in the trigger editor supplies the wrong list of codes (based on expected type) for the thing you want to modify. So you might be seeing that category; don't remember which it is off the top of my head. If you write some JASS code you can manually make lines to modify any field code you want, as well as fix the ones GUI can't use properly because of the editor mistakes. As Chaosium said many of the intended ones just don't work, so the likelihood of other random ones you define working is pretty low too but if it's the only option for you....
the one who wrote about the fucking gui, let him give the code in jass.
 
What Uncle linked is probably the best solution.

If you're fine with having acquisition range equal to attack range, you can have acquisition range and attack range equal to highest possible range the unit can have, and then set acquisition range as the unit is spawned to what it's supposed to have "right now" and then use the acquisition range to modify to whatever it supposed to have. Lowest possible value is 64 IIRC.

And FYI: Acquisition range is the range to acquire a target and if longer than attack range, unit will move into range to attack said target.
(This is how I solved the "attack range issue" before knowing about the trick that Uncle linked).
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
the one who wrote about the fucking gui, let him give the code in jass.
So giving an incomplete answer is better? What exactly is your point here? There is no way to fix the GUI fields without using JASS, so if they want to do this they will have to. And you literally only have to use two custom script lines to read or set the field not make a wholeass JASS trigger.
 
Top