HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Locust

08-14-2008, 05:03 AM#1
Fledermaus
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.

Collapse JASS:
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.

Not sure if this is because of a newer patch but if you hide and then unhide a unit with Aloc, without calling "call UnitRemoveAbility(u, 'Aloc')", the ability seems to be removed completely.
08-20-2008, 09:23 AM#2
Sophismata
This is true, and I just found out how to make this trick useful.

Anyone know of another way to hide healthbars?
08-20-2008, 09:25 AM#3
Vestras
Try with UnitRemoveAbility.
08-20-2008, 11:20 AM#4
Sophismata
Hmmm, just did some testing and found this:

A unit with locust that is hidden and then shown will become selectable. They cannot be clicked on, but can be selcted through hotkeys and drag-select. They are invulnerable, however.

A unit with locust that is then hidden, has locust removed, and shown again loses the locust ability properly. Unfortunately, the old side effect of removing the health-bar display is gone.


A negative size for the selection circle works.
08-20-2008, 03:34 PM#5
Troll-Brain
Properly, not really, you can't right click any more on the unit (in game with the mouse i mean)
08-22-2008, 08:11 AM#6
Jazradel
Known for ages. Using Chaos morph has similar affects to hiding it.