time-and-timers

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

2|10|Updated Jul 28, 2026
One-click install
npx skills add https://github.com/kodingvibes/gamejam-2026 --skill time-and-timers-kodingvibes
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: time-and-timers
Source: https://github.com/kodingvibes/gamejam-2026/tree/main/participantes/jpyunism/.agents/skills/time-and-timers
Command: npx skills add https://github.com/kodingvibes/gamejam-2026 --skill time-and-timers-kodingvibes

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-scene or per-timer time scaling for slow motion and fast forward, and read precise progress and remaining-time state from any timer. - Use Case: Build an enemy spawner that fires every 3 seconds, pause it during a menu, then run a scripted intro cutscene with tweens and sound cues before gameplay starts. ## Quick Start Ask the AI to create a Phaser 4 scene timer that spawns an enemy every two seconds and a timeline that plays an intro cutscene with a tween and sound.

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?▼

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

How to schedule a delayed call in a Phaser scene?▼

Use this.time.delayedCall(delay, callback, args, scope) as a shorthand for a one-shot timer. It returns a TimerEvent you can pause, remove, or inspect, and it fires once after the given millisecond delay.

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 never fires its events.

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.

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

If callbackScope is omitted, the TimerEvent itself becomes this inside the callback instead of the scene. Pass callbackScope: this explicitly or use an arrow function to preserve the scene context.

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

Set this.time.paused = true to freeze every TimerEvent in the scene's Clock, or set this.time.timeScale = 0 to run updates with zero delta. Prefer paused for a full freeze since it skips the update loop entirely.