Skip to content

AbilityCooldown ​

class in OpalScript

Gate an ability behind a cooldown. Tick counts down and emits ready when it hits zero.

Properties ​

MemberDescription
AbilityCooldown.DurationSeconds the ability stays on cooldown after use.
AbilityCooldown.RemainingLive countdown until the ability is ready again.

Methods ​

MemberDescription
AbilityCooldown.TryUseAttempt to start the cooldown and return the committed result. Read Applied to see whether it succeeded.
AbilityCooldown.UseAsyncStart a cooldown and await that use's completion.
AbilityCooldown.WaitUntilReadyWait until the current cooldown is ready without consuming a use.
AbilityCooldown.ForceReadyClear the remaining cooldown.
AbilityCooldown.SetDurationSet cooldown duration in seconds.
AbilityCooldown.CanUseWhether a use can start now.
AbilityCooldown.IsCoolingDownWhether time remains on the cooldown.

Events ​

MemberDescription
AbilityCooldown.consumedRaised after a cooldown use starts, with its committed AbilityUse result.
AbilityCooldown.useRefusedRaised when a cooldown use is refused, with its AbilityUse result.

See also ​