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

[Spell] Help me with this please

Status
Not open for further replies.
Level 11
Joined
Dec 19, 2012
Messages
411
  • Untitled Trigger 002
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your_Ability
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_Integer Equal to 0
        • Then - Actions
          • Unit - Remove Your_Ability from (Triggering unit)
          • Unit - Add Your_Ability to (Triggering unit)
          • Set Temp_Integer = 1
        • Else - Actions
          • Set Temp_Integer = 0
I think this should work, i didn't test this trigger
 
Level 18
Joined
May 11, 2012
Messages
2,103
  • Untitled Trigger 002
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your_Ability
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_Integer Equal to 0
        • Then - Actions
          • Unit - Remove Your_Ability from (Triggering unit)
          • Unit - Add Your_Ability to (Triggering unit)
          • Set Temp_Integer = 1
        • Else - Actions
          • Set Temp_Integer = 0
I think this should work, i didn't test this trigger

I think you should add wait because this may remove the ability before it's even executed or something.
 
Level 9
Joined
Feb 15, 2013
Messages
372
  • Untitled Trigger 002
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your_Ability
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_Integer Equal to 0
        • Then - Actions
          • Unit - Remove Your_Ability from (Triggering unit)
          • Unit - Add Your_Ability to (Triggering unit)
          • Set Temp_Integer = 1
        • Else - Actions
          • Set Temp_Integer = 0
I think this should work, i didn't test this trigger

So did you mean if the Temp_Integer equal to 0 then remove ability and add the same ability ? then set it to 1, but how to set it to 0 again when the new ability start cooldown? Will this trigger make the ability to triggered again? Like you casts x ability then give x(2) ability<--- its same ability as x ability. And when you casts x(2) ability, will the trigger make x(2) ability remove and add x(3) ability again into it?

Sorry i dont know how to explain ==
 
Level 11
Joined
Dec 19, 2012
Messages
411
So did you mean if the Temp_Integer equal to 0 then remove ability and add the same ability ? then set it to 1, but how to set it to 0 again when the new ability start cooldown? Will this trigger make the ability to triggered again? Like you casts x ability then give x(2) ability<--- its same ability as x ability. And when you casts x(2) ability, will the trigger make x(2) ability remove and add x(3) ability again into it?

Sorry i dont know how to explain ==

When a unit cast the spell, since Temp_Integer is 0, so will execute (Then - Actions), when the unit cast 2nd time, since temp_integer is 1, it will execute (Else - Actions) and didn't remove the ability, so the unit ability will remain cooldown and next time he cast will again activate (Then - Actions) and keep repeating. This make the unit constantly cast 2nd time (doesn't matter time) to make the ability cooldown.

And yes, its the same ability.

I think you should add wait because this may remove the ability before it's even executed or something.

Not too sure what you mean.. but since the event is (A unit starts the effect of an ability) , so the ability will still fire and soon got remove and replace.
 
Status
Not open for further replies.
Top