Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

useCooldown

useCooldown(entity, key): CooldownStatus | undefined

The cooldown entity runs under key, as a view shows it, or undefined while it runs none. A running cooldown keeps only the tick it ends on, so the hook reads it again after each step and draws again as remainingSeconds moves: what an ability’s button shows, drawing remainingSeconds / seconds of its rim.

Parameter Type
entity Entity | null
key string

CooldownStatus | undefined