[SOLVED] Trigger When Ability is Off Cooldown

I’m trying to make a simple trigger that is activated when a unit’s ability is off cooldown and their health is full.

So when this unit’s health is full and his ability is off cooldown, he’ll rejoin the attack group.

This is currently what I’ve tried…

(This line works fine) Event: [Specified Unit] life changes

(This line also works fine) Condition: Unit life percent is 100%

(This line is not working) Condition: Comparison -> Cooldown For Unit Ability -> Cooldown: Abil/NovaPersonalDefenseMatrix -> Ability Nova - Personal Defense Matrix -> Unit: [Specified Unit] -> Operator == -> Value 2: 0.0

(This line works fine) Action: Add [Specified Unit] to the next attack wave for player ‘x’

Right now, he’ll rejoin the attack group when his health is full, but it won’t take the cooldown of his personal defense matrix ability into consideration at all. (Note, I’ve tried changing the value from 0.0 to various numbers, and it doesn’t help)

Any help would be appreciated. Thank you.

Try using this comparison:

Comparison
Value 1: Unit Ability Command State
    Unit: [Specified Unit]
    Ability Command: [Nova - Personal Defense Matrix]
    State: Cooldown
Operator: ==
Value 2: False

Also be ware that your trigger will not run in case when ability is off cooldown after life reaches 100%, unless you add some other events (like timer).
PS In Data Editor in Ability - Cost - Cooldown, there is a Location field. If it is “Ability” then “Cooldown For Unit Ability” should work, but if it is set to “Unit” you should have used “Cooldown For Unit”.

1 Like

Thank you very much! I tried your method, and it worked the way you detailed it would after adding in a periodic timer event.

The personal defense matrix ability was set to “Ability” and not “Unit” in the location field of its cost, so I’m not sure why it didn’t work. Oh well. Your alternate method worked.

Thank you very much!