• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] my cooldown reduction trigger only mostly works

Level 2
Joined
Dec 5, 2017
Messages
17
Hi there, I'm attempting cooldown reduction, something I'm only barely starting to understand, but something is wrong somewhere in here. For the most part, the trigger works well but occasionally when my unit is hit, the cooldown ends even when its nowhere near less then 5 seconds. Then when its hit again, it picks up where the cooldown left off and carries on as normal.

I dont want to to suddenly reset like that, I want it to work like you'd think "getting hit lowers your cooldown" works.

  • quake cooldown
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability Cooldown of (Triggering unit) for ability Quake , Level: (Level of Quake for (Triggering unit)).) Greater than or equal to 0.01
          • (Ability Cooldown Remaining of (Triggering unit) for ability Quake ..) Greater than or equal to 0.01
          • (Unit-type of (Triggering unit)) Equal to Earth Drake
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability Cooldown Remaining of (Triggering unit) for ability Quake ..) Greater than or equal to 5.00
        • Then - Actions
          • Unit - For Unit (Triggering unit), start cooldown of ability Quake " over "((Ability Cooldown Remaining of (Triggering unit) for ability Quake ..) - 5.00) seconds.
        • Else - Actions
          • Unit - For Unit (Triggering unit), end cooldown of ability Quake
 
This should work:
  • quake cooldown
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Level of Quake for (Triggering unit)) Greater than 0
      • (Damage taken) Greater than 0.00
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability Cooldown Remaining of (Triggering unit) for ability Quake ..) Greater than 5.00
        • Then - Actions
          • Unit - For Unit (Triggering unit), start cooldown of ability Quake " over "((Ability Cooldown Remaining of (Triggering unit) for ability Quake ..) - 5.00) seconds.
        • Else - Actions
          • Unit - For Unit (Triggering unit), end cooldown of ability Quake
Remember that you rarely have to use "And - All (Conditions) are true", that's the default behavior of Conditions. Also, a lot of targeted abilities will fire a 0.00 damage Event, if not all of them. It can be desirable to filter those out since they're unintended.

Oh, and there was a visual bug related to cooldowns + ability icons which might have never gotten fixed. I believe the same issue applies to Expiration Timers. I would confirm that the ability cooldown is actually breaking and that it's not just a UI issue. When testing you might notice that the UI fixes itself whenever you reselect the unit.

Edit: If ending the cooldown of an already ended ability has issues then try this:
  • quake cooldown
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Level of Quake for (Triggering unit)) Greater than 0
      • (Damage taken) Greater than 0.00
    • Actions
      • Set Variable CD = (Ability Cooldown Remaining of (Triggering unit) for ability Quake ..)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CD Greater than 5.00
        • Then - Actions
          • Unit - For Unit (Triggering unit), start cooldown of ability Quake " over " CD - 5.00) seconds.
        • Else - Actions
          • If - Conditions
            • CD Greater than 0.00
          • Then - Actions
            • Unit - For Unit (Triggering unit), end cooldown of ability Quake
I recall these functions being finicky, you don't want to do anything that could be considered "impossible".
 
Last edited:
Oh, and there was a visual bug related to cooldowns + ability icons which might have never gotten fixed. I believe the same issue applies to Expiration Timers. I would confirm that the ability cooldown is actually breaking and that it's not just a UI issue. When testing you might notice that the UI fixes itself whenever you reselect the unit.
Did some testing and it does seem to just be visual. It also does still happen with your trigger.
That being said, your trigger is much cleaner and works the way I need it to :D
Thanks as always!
 
Back
Top