• 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.

[Trigger] Problems with Adding and Removing locust using Trigger

Status
Not open for further replies.
Level 12
Joined
Aug 12, 2008
Messages
350
I creating an ability that it takes to charge towards a target unit thus I add locust to the unit. Then remove it after casting.
The problem is after I remove the locust ability, I can't select the caster but the enemies able to the caster. Weird!

I used the following functions because I can't find the locust ability in adding ability through trigger. Thus, I used trigger and then convert it to custom text and then I change the ability ID.
  • Custom script: call UnitAddAbilityBJ( 'Aloc', udg_C_caster[udg_C_index2] )
  • Custom script: call UnitRemoveAbilityBJ( 'Aloc', udg_C_caster[udg_C_index3] )
Is there any wrong with the above functions?
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
To completely remove the effects of locust, you must also use a transformation ability. You can base it on bear form. Set the alternate unit to some other hero.

  • Untitled Trigger 113
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set u = Paladin 0031 <gen>
      • Custom script: call UnitAddAbility(udg_u, 'Aloc')
      • Wait 1.00 seconds
      • Unit - Hide u
      • Custom script: call UnitRemoveAbility(udg_u, 'Aloc')
      • Unit - Unhide u
      • Unit - Add Bear Form Rem Loc to u
      • Unit - Order u to Night Elf Druid Of The Claw - Bear Form
      • Unit - Remove Bear Form Rem Loc from u
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
Whats wrong? I gave a good egzample of removing locust, except Maker once again proofs to know how to fix every glich.

My bad, I meant my if state above that sentence :D

Maker didn't use the BJ, he used the native instead. The BJ calls the native so it's just a performance loss if you use it but in GUI it doesn't matter. (If you use custom script ofc you should avoid this.)
 
Status
Not open for further replies.
Top