call SetUnitAcquireRange(unit, 2000)
call BlzSetUnitWeaponRealField(unit, UNIT_WEAPON_RF_ATTACK_RANGE, 0, 2000)
call BlzSetUnitWeaponRealField(unit, UNIT_WEAPON_RF_ATTACK_RANGE, 1, 2000)
They are receiving the attack speed buff so I believe it is all working?
What would the custom script need to be? with the unit being TempUnit and the new range being TempReal?
You're welcome.It works! Thank you very much!!
You can try to set it's attack range to 0 or something before applying TempReal.OK no it doesn't quite work, TempReal is being calculated correctly but the ranges are being added together rather than replaced?
Example - unit with 500 range should be getting 10% bonus, 550 is being calculated (shown with test text) but the unit ends up with 1050 range? (500 + 550)
Any ideas?
I don't think there is a function. But you can always use a Variable/Hashtable to store this information if you can't get away with typing the exact value yourself.The fix I have done is that TempReal calculates the bonus not the total, this seems to have worked
As it's a round based game with duplicate units involved this shouldn't be recalculated at any time, but could be worth looking into anyway...what function would pick up the base attack range?
And yes you are correct I should definitely make a tempary count variable!
No problem. Do the TempUnit's have different attack ranges or something? What's stopping you from just doing this:Ahh no worries I will go with how it is for now, may have to revisit if it doesn't work further down the line.
Thanks for all your help though![]()
No idea, Blizzard released these functions in 1.31 and then never touched them since. A lot are buggy/unfinished.@Uncle
So for some reason this doesn't work on a unit with 800 range? It is setting them to have melee range? Any ideas?
I have tried deleting the line where it adjusts the aquisition range and that wasn't the problem... all the other units still work just this one!