Skip to main content

Trigger Cooldown (Entity Action Type)

Starts a power's cooldown as if the power had just been used, so it can't fire again until the cooldown runs out. It works on every power that has a cooldown, as well as apoli:cooldown.

Type ID: apoli:trigger_cooldown

Fields

FieldTypeDefaultDescription
powerIdentifierrequiredThe power whose cooldown to start. The legacy field resource is accepted as an alias.

Which powers

Any power type with a cooldown: apoli:cooldown, apoli:action_on_key_press (active_self), apoli:action_on_key_sequence, apoli:fire_projectile, apoli:action_on_hit, apoli:action_when_hit, apoli:action_on_kill, apoli:action_on_collision, apoli:action_on_mouse_movement, apoli:action_on_scroll_wheel and apoli:game_event_listener. A power without a cooldown is left alone.

Behaviour

  • If the cooldown is ready (0), it is set to the power's full cooldown and starts counting down, and the power's HUD bar shows it straight away.
  • If the cooldown is already running, this action does nothing and the countdown carries on from where it is.
  • To set a cooldown to an exact number of ticks, use apoli:modify_resource with operation: set_base.

Example

Two abilities that share a cooldown. Using the dash also puts example:blink on cooldown, and example:blink does the same to the dash:

{
    "type": "apoli:active_self",
    "key": "key.apoli.primary_active",
    "cooldown": 100,
    "hud_render": {
        "should_render": true
    },
    "entity_action": {
        "type": "apoli:and",
        "actions": [
            {
                "type": "apoli:trigger_cooldown",
                "power": "example:blink"
            },
            {
                "type": "apoli:add_velocity",
                "z": 1.5,
                "space": "local"
            }
        ]
    }
}