• 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.

[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