Quote:
Aloc (Locust): A unit that is given locust becomes unselectable, untargetable and ignores any pathing limitations. This means it can only be controlled and ordered with triggers. It won't show a life bar over its head too. Now to get rid of locust UnitRemoveAbility(u, 'Aloc') won't work therefore you'll need to chaos transform the unit into a different temporary unit type and immediately transform it back. However if the unit had been transformed with a chaos ability before then adding locust will make it unselectable but still targetable and it will also obey pathing rules. Another option to get rid of locust is the following hiding the unit, removing the ability and unhiding it again.
 JASS: function UnitRemoveLocust takes unit u returns nothing
local boolean backup = not IsUnitHidden(u)
call ShowUnit(u, false)
call UnitRemoveAbility(u, 'Aloc')
call ShowUnit(u, backup)
endfunction
This solution has some side effects. The health bar above the unit as well as the player name when you move your mouse over the unit will not be shown any more. So this would also be a trick to get rid of those tooltips and health bars.
|
He is trying this. Wasn't there a catch that Aloc can't be removed once added or something?
I would suggest giving all units Locust in WE and using UnitRemoveLocust to remove it.