• 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.
  • Vote for the theme of Hive's HD Modeling Contest #7! Click here to vote! - Please only vote if you plan on participating❗️

Removing locust

Status
Not open for further replies.
Level 3
Joined
May 2, 2008
Messages
41
How can I remove the locust ability from a unit?
I tried
JASS:
call UnitRemoveAbility( Unit , 'Aloc' )
, but it doesn't work!
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
How can I remove the locust ability from a unit?
I tried
JASS:
call UnitRemoveAbility( Unit , 'Aloc' )
, but it doesn't work!
I think once a unit has the locust ability you can no longer refer to it normally, you need to save it into a variable before adding this ability and to remove it refer to the variable. But I am not sure about this; its something I was told long ago.
 
Level 3
Joined
May 2, 2008
Messages
41
I think once a unit has the locust ability you can no longer refer to it normally, you need to save it into a variable before adding this ability and to remove it refer to the variable. But I am not sure about this; its something I was told long ago.

That's what I am doing. I got the unit stored in a global array. Then I set a local variable like this:
JASS:
local unit c = udg_Array[s]
then I do UnitAddAbility and later UnitRemoveAbility.
 
Level 3
Joined
May 2, 2008
Messages
41
The reason I used locust to begin with was that I had two identical units(heroes). One of them needs to disappear for a while, and I thought the easyest thing would be to use the benefits from locust and making it invisible.
But is there anything else I can do instead?
 
Status
Not open for further replies.
Top