time-and-timers

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

Updated Jul 13, 2026
One-click install
npx skills add https://github.com/russellmorgan/UnderConstruction --skill time-and-timers-russellmorgan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: time-and-timers
Source: https://github.com/russellmorgan/UnderConstruction/tree/main/.claude/skills/time-and-timers
Command: npx skills add https://github.com/russellmorgan/UnderConstruction --skill time-and-timers-russellmorgan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Phaser 4 game developers often struggle with scheduling time-based events correctly, hitting off-by-one errors with repeat counts, forgetting that Timelines start paused, or misusing timeScale when building slow-motion effects and cutscenes. ## Core Features & Use Cases - TimerEvent Management: Create one-shot delayed calls, finite repeating timers, and infinite loops via the scene Clock with full control over pause, removal, and reset. - Timeline Sequencing: Choreograph cutscenes mixing callbacks, tweens, sounds, property sets, and custom events using absolute (at) or relative (from, in) timing. - Time Control: Apply per-clock and per-event timeScale for slow motion or fast forward, and read precise progress and remaining-time state from any timer. - Use Case: When building a wave spawner that fires every 3 seconds, a delayed scene transition after game over, or a scripted intro cutscene with synchronized tweens and sound effects, this Skill provides the correct API patterns and flags the common pitfalls. ## Quick Start Ask the AI to add a repeating timer or a sequenced cutscene timeline to your Phaser 4 scene using the Clock and Timeline APIs.

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's create method. It returns a TimerEvent that fires once after the given milliseconds, and you can pause or remove it later like any other timer.

How to make a repeating timer in Phaser 4?▼

Call this.time.addEvent with a delay, callback, and either repeat count or loop: true. Note that repeat: 4 produces 5 total fires, and repeat: -1 is equivalent to loop: true for infinite repetition.

Why is my Phaser Timeline not playing?▼

Timelines always start paused, so you must call timeline.play() after creating them with this.add.timeline. Forgetting play() 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 control them through the TweenManager.

Why does my Phaser timer throw an infinite loop error?▼

A TimerEvent with delay: 0 combined with any repeat or loop setting throws 'TimerEvent infinite loop created via zero delay'. Use a non-zero delay, even a small one, whenever the timer repeats.

How do I pause all timers in a Phaser scene?▼

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