time-and-timers

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

Updated Jun 10, 2026
One-click install
npx skills add https://github.com/mudman1986/quarterless --skill time-and-timers-mudman1986
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: time-and-timers
Source: https://github.com/mudman1986/quarterless/tree/main/.github/skills/time-and-timers
Command: npx skills add https://github.com/mudman1986/quarterless --skill time-and-timers-mudman1986

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Phaser 4 game developers often struggle with scheduling time-based events correctly, from one-shot delays and repeating spawners to choreographed cutscenes, and hit subtle bugs like off-by-one repeat counts or timelines that never start. ## Core Features & Use Cases - Clock and TimerEvent Management: Create one-shot delayed calls, finite repeating timers, and infinite loops with per-event and global time scaling, pausing, and progress inspection. - Timeline Sequencing: Choreograph cutscenes mixing callbacks, tweens, sounds, property sets, and custom events using absolute, relative, or conditional timing. - Gotcha Avoidance: Documents twelve common pitfalls such as timelines starting paused, repeat off-by-one errors, and timer reset requiring re-addition to the Clock. - Use Case: When building a wave spawner that fires every 3 seconds, a slow-motion effect via timeScale, or an intro cutscene with synchronized tweens and sounds, this Skill provides the exact API patterns and configuration tables. ## Quick Start Ask the AI to create a Phaser 4 repeating timer that spawns an enemy every two seconds and pauses when the scene pauses.

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 repeating timer in Phaser 4?

Use this.time.addEvent with a delay in milliseconds, a callback, and either repeat for a finite count or loop: true for infinite repetition. Note that repeat: 4 produces 5 total callback fires, counting the initial invocation.

How to delay a function call in a Phaser scene?

Use this.time.delayedCall with the delay in milliseconds and your callback function. This is a shorthand for a one-shot TimerEvent that fires once and then removes itself from the Clock.

Why is my Phaser timeline not playing?

Timelines always start paused after creation, so you must explicitly call timeline.play() to begin execution. Forgetting this call is the most common reason a timeline appears to do nothing.

Does Phaser timeline timeScale affect spawned tweens?

No, timeline timeScale only scales the timeline's own elapsed counter. Tweens created by the timeline run at their own speed, so set the tween timeScale separately or adjust it through the TweenManager.

How do I pause all timers in a Phaser scene?

Set this.time.paused to true to freeze every TimerEvent managed by the scene Clock, or set this.time.timeScale to 0 for a zero-delta update. Prefer paused for a full freeze since it skips the update loop entirely.

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 bind the scene context.