• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Unselectable for a period of time

Status
Not open for further replies.
Level 28
Joined
Jan 26, 2007
Messages
4,789
To add the ability:

  • Custom script: call UnitAddAbility(Unit, 'Aloc')
This will add the locust ability to a unit.
"Unit" should be the unit you want to give locust (e.g.: if you set that unit to a variable called "LocUnit", it should be "call UnitAddAbility(udg_LocUnit, 'Aloc')").

Unfortunately, the function "call UnitRemoveAbility" doesn't work for locust.
So in that case, I recommend you to re-create the unit completely (remove the locusted unit and create a completely similar unit at the exact location, with the exact stats etc).
Hold on, I'll create a function for that (the unit's a hero, right?)
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Yeah, you can undo the changes Locust makes.

*Remove Locust from the unit
*Hide then unhide
*Use Metamorphosis

  • Remove Locust
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Game - Display to Player Group - Player 1 (Red) the text: Locust Added
      • Custom script: call UnitAddAbility( udg_u , 'Aloc' )
      • Wait 4.00 seconds
      • Game - Display to Player Group - Player 1 (Red) the text: Removing Locust
      • Custom script: call UnitRemoveAbility( udg_u , 'Aloc' )
      • Unit - Hide u
      • Unit - Unhide u
      • Custom script: call UnitAddAbility( udg_u , 'A000' )
      • Custom script: call IssueImmediateOrder( udg_u , "metamorphosis" )
http://www.hiveworkshop.com/forums/pastebin.php?id=geu4od
 
Status
Not open for further replies.
Top