time-and-timers

Implements timers, delayed calls, and timeline sequencing in Phaser 4 games.

465|41|Updated Aug 4, 2026
One-click install
npx skills add https://github.com/autonomous-ai/openharness --skill time-and-timers-autonomous-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: time-and-timers
Source: https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/time-and-timers
Command: npx skills add https://github.com/autonomous-ai/openharness --skill time-and-timers-autonomous-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Scheduling time-based events in Phaser 4 games is error-prone: developers struggle with repeat-count off-by-one bugs, forgotten timeline.play() calls, and confusion between Clock pausing and time scaling. This Skill provides correct patterns and API references for all timer and timeline operations. ## Core Features & Use Cases - TimerEvent Management: Create one-shot delayed calls, finite repeating timers, and infinite loops via the scene Clock plugin with proper callback scoping. - Timeline Sequencing: Choreograph cutscenes and event sequences with absolute, relative, and conditional timing, plus tween, sound, and custom event integration. - Time Control: Pause, resume, and scale time globally or per-timer for slow-motion and fast-forward effects. - Use Case: Build a game wave spawner that fires every 3 seconds, a countdown timer with progress display, and an intro cutscene sequencing tweens, sounds, and scene transitions. ## Quick Start Ask the AI to create a Phaser 4 scene with a repeating enemy spawn timer and a timeline-based intro cutscene.

Frequently Asked Questions about time-and-timers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a delayed call in Phaser 4?

Use this.time.delayedCall(delay, callback, args, scope) inside a scene to fire a one-shot callback after the given milliseconds. For repeating behavior, use this.time.addEvent with a delay and repeat or loop configuration instead.

How to make a repeating timer in Phaser?

Call this.time.addEvent with a config containing delay, callback, callbackScope, and either repeat for a finite count or loop: true for infinite repetition. Note that repeat: 4 produces 5 total callback fires, one initial plus four repeats.

What is the difference between Phaser Timeline and TimerEvent?

TimerEvent is an independent timer managed by the scene Clock that fires callbacks on a delay. Timeline is a sequencer that runs an ordered series of events at absolute or relative timestamps, supporting tweens, sounds, and custom events.

Why is my Phaser timeline not playing?

Timelines always start paused after creation, so you must call timeline.play() to begin execution. Also verify the scene is not paused, since Timeline updates are driven by the scene's update step.

How do I pause or slow down all timers in a Phaser scene?

Set this.time.paused = true to freeze all timers completely, or set this.time.timeScale to a value below 1 for slow motion. Individual timers can be controlled via their own paused property and timeScale multiplier.

Why does my Phaser timer callback have the wrong this context?

If callbackScope is omitted, the TimerEvent itself becomes this inside the callback rather than the scene. Pass callbackScope: this in the config or use an arrow function to preserve the scene context.