time-and-timers

Orchestrate time-based events in Phaser 4 with clocks, timer events, and timelines.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/jallard-007/jallard-ca-server --skill time-and-timers-jallard-007
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: time-and-timers
Source: https://github.com/jallard-007/jallard-ca-server/tree/main/.github/skills/time-and-timers
Command: npx skills add https://github.com/jallard-007/jallard-ca-server --skill time-and-timers-jallard-007

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing time-based actions in Phaser 4 can be complex without a cohesive API. This skill consolidates Clock, TimerEvent, and Timeline concepts to provide consistent, predictable timing behavior across scenes, with pause/resume, timeScale, and event sequencing.

Core Features & Use Cases

  • One-shot delayed calls and finite repeating timers via this.time.addEvent and this.time.delayedCall.
  • Infinite loop timers and timeline-based sequencing for cutscenes and gameplay loops.
  • Timeline support for absolute/relative timing, conditional events, and per-event actions (callbacks, tweens, sounds, and property sets).

Quick Start

Create a Scene with a Clock, add a one-shot delayedCall, a finite repeat timer, and an infinite loop timer to observe time-based callbacks.

Frequently Asked Questions about time-and-timers

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

FAQPage Schema
How do I manage time-based events in Phaser 4 scenes?

You manage time-based events in Phaser 4 scenes by using the consolidated Clock, TimerEvent, and Timeline APIs to orchestrate delayed calls, repeating timers, and infinite loops with consistent behavior across gameplay loops and cutscenes.

What is the difference between delayedCall and addEvent for Phaser timers?

In Phaser timers, delayedCall executes a one-shot delayed action, whereas addEvent handles finite repeating timers and infinite loops, providing flexible callback configuration for gameplay loops.

How do I sequence cutscene events using Phaser timelines?

You sequence cutscene events using Phaser timelines by arranging absolute or relative timing constraints, enabling conditional triggers, and attaching per-event actions like callbacks, tweens, sounds, and property sets.

Can I pause and scale time in Phaser 4 gameplay loops?

Yes, you can pause and scale time in Phaser 4 gameplay loops using the Clock API, which supports precise pause and resume functionality alongside timeScale adjustments to control event execution speed.

How do I create an infinite loop timer in Phaser 4?

You create an infinite loop timer in Phaser 4 by configuring a TimerEvent via this.time.addEvent with a repeat value of -1, allowing continuous callback execution for ongoing gameplay loops.