• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] SetUnitAcquireRange() not working

Status
Not open for further replies.
So I'm trying to increase the attack range of a unit. I see the range to 700 and the acquisition range to 400. Then, after an specific event, I call SetUnitAcquireRange(unit, 700), but the range remains 400. Does SetUnitAcquireRange() not work? I though maybe acqure range can't be set past the default, so I set it to 700 on the object editor and then reduced it to 400 when the unit was indexed, but even that didn't work. Any thoughts?

Before you ask, yes, the event is indeed firing correctly and the proper variables are being used. The unit has a ranged attack (Missile) as well. SetUnitAcquireRange() is literally the only thing that doesn't seem to be doing anything.
 
Level 5
Joined
Jul 27, 2017
Messages
73
I just made a short Test and it seems that you can´t manipulate the attack range of a unit with the function SetUnitAcquireRange().
You can manipulate the Acquire Range and this works (in my test i´ve set the acquire range of a unit to 10000 and it started to move torwards the next enemy unit) but it seems that it doesn´t affect the attack range at all.

An idea could be to replace the unit with another unit having the same stats but a different attack range. Then make the player select the unit and maybe safe the original unit´s target for the new one.
Sorry but for now i can only offer this workarround.
 
Status
Not open for further replies.
Top