• 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] Remove Skill

Status
Not open for further replies.
Level 2
Joined
Aug 20, 2009
Messages
8
Hey so i want to make a skill where when the hero does the skill he will gain another abiltiy but only when he is vanished. I can add the skill to the hero but i cant remove it. and im guessing theres a leak when its checking for the buff, but i dont know exactly whats wrong. any help would be appreciated!

  • Vanish
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Vanish
    • Actions
      • -------- -----Setup----- --------
      • Set V_Caster = (Triggering unit)
      • Set V_Owner = (Owner of V_Caster)
      • Set V_Dummy = VanishDummy
      • Set V_Ability_Lvl = (Level of Vanish for V_Caster)
      • Set V_Dummy_Skill = VanishDummy
      • -------- -----Vanish----- --------
      • Unit - Create 1 V_Dummy for V_Owner at (Position of V_Caster) facing Default building facing degrees
      • Unit - Add V_Dummy_Skill to (Last created unit)
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Unit - Set level of V_Dummy_Skill for (Last created unit) to V_Ability_Lvl
      • Unit - Order (Last created unit) to Human Sorceress - Invisibility V_Caster
      • -------- ------SFX------ --------
      • Special Effect - Create a special effect attached to the origin of V_Caster using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- ------VenomDust------- --------
      • Unit - Add Venom Dust to V_Caster
      • Unit - Set level of Venom Dust for V_Caster to V_Ability_Lvl
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (V_Caster has buff Vanish. ) Equal to False
        • Then - Actions
          • Unit - Remove Venom Dust from V_Caster
        • Else - Actions
          • Do nothing
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
  • Vanish
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Vanish
    • Actions
      • ...
      • -------- ------VenomDust------- --------
      • Unit - Add Venom Dust to V_Caster
      • Unit - Set level of Venom Dust for V_Caster to V_Ability_Lvl
      • Wait 0.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering Unit) has buff Vanish. ) Equal to False
        • Then - Actions
          • Unit - Remove Venom Dust from (Triggering Unit)
        • Else - Actions
That should do it.
 
Level 2
Joined
Aug 20, 2009
Messages
8
Well when i cast the skill I gain the ability now but it doesnt get removed still when he doesnt have the buff. should i have a trigger that checks every .01 seconds if the unit has the buff if not remove abilty?
 
Level 4
Joined
May 23, 2010
Messages
83
if its not mui the it is easier. try to ser every 0.2 to 0.5 seconds to check the buff and set another variable to false. just check that and ta-da :)
 
Level 2
Joined
Aug 20, 2009
Messages
8
Well after trying all ur ideas it came back to the wait and i came up with this like musk said that buffs arnt instant. so i tweaked the trigger abit and it looks like this. Thanks again everyone for helping. Cheers

  • Vanish
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Vanish
    • Actions
      • -------- -----Setup----- --------
      • Set V_Caster = (Triggering unit)
      • Set V_Owner = (Owner of V_Caster)
      • Set V_Dummy = VanishDummy
      • Set V_Ability_Lvl = (Level of Vanish for V_Caster)
      • Set V_Dummy_Skill = VanishDummy
      • -------- -----Vanish----- --------
      • Unit - Create 1 V_Dummy for V_Owner at (Position of V_Caster) facing Default building facing degrees
      • Unit - Add V_Dummy_Skill to (Last created unit)
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Unit - Set level of V_Dummy_Skill for (Last created unit) to V_Ability_Lvl
      • Unit - Order (Last created unit) to Human Sorceress - Invisibility V_Caster
      • -------- ------SFX------ --------
      • Special Effect - Create a special effect attached to the origin of V_Caster using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- ------VenomDust------- --------
      • Unit - Add Venom Dust to V_Caster
      • Unit - Set level of Venom Dust for V_Caster to V_Ability_Lvl
      • Wait 0.50 seconds
      • Wait until ((V_Caster has buff Vanish. ) Equal to False), checking every 0.50 seconds
      • Unit - Remove Venom Dust from V_Caster
 
Status
Not open for further replies.
Top