• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] How to remove Aloc (Locust)

Status
Not open for further replies.
Hello! I discovered today this little thing, How to remove Aloc (Locust).

Okay, so you probably want to know how to do it, so here it is:
In trigger editor, do this:
  • Unit - Hide MyUnit
  • Unit - Unhide MyUnit
Now you have an unit with no locust on it.

If you want the locust back to an unit, you have to add the Aloc (locust) to an variable.
So well, do these.

Part 1 - Adding Aloc (Locust) to an Variable:
  • AddAbilityLocust
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: set udg_MyAbility = 'Aloc'
Part 2 - Adding Aloc (Locust) to an Unit:
  • AddAbilityLocust ToUnit
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Unit - Add MyAbility to MyUnit
If you got questions, or something else about this, be free to tell.

- MyUnit is not an variable, I just replaced the No Unit as MyUnit since you have to have an unique unit name, instead of something No Unit. And remember, Do target your triggers in units, not in No Unit, and allways remember to check your variables.




/bah OffGraphic bah bah.. BAH!
 
This function would yield the same results as yours:

JASS:
function RemoveLocust takes unit u returns boolean
    if not UnitRemoveAbility(u, 'Aloc') then
        return false
    endif
    call ShowUnit(u, false)
    call ShowUnit(u, true)
    
    return true
endfunction
 
This function would yield the same results as yours:

JASS:
function RemoveLocust takes unit u returns boolean
    if not UnitRemoveAbility(u, 'Aloc') then
        return false
    endif
    call ShowUnit(u, false)
    call ShowUnit(u, true)
    
    return true
endfunction

but it's not GUI and I think that is the point since you can directly remove locust with JASS while you can't do this with GUI

however I wonder why he posted it here
it's too short for a tutorial (maybe with all other ability tricks together....)
and this is no insight forum (there probably is a subforum like that but I don't know)
 
Status
Not open for further replies.
Back
Top