Skip to content

Timeline Events set to once break timeline #7147

Closed

Description

@TomorrowToday

Version

  • Phaser Version: 3.88.2
  • Operating system: MacOS 15.4.1
  • Browser: Chrome 136.0.7103.114 (Official Build) (x86_64)

Description

Multiple timeline events with once set to true, silently break the timeline and prevent all future events from firing.

Example Test Code

sandbox

class Example extends Phaser.Scene
{

    create ()
    {
	const timeline = this.add.timeline();
		
        for (let i=0; i<50; i++) {
            timeline.add({
                at: i * 20,
                once: true, // comment out to get to fin
                run: () => console.count('event #')
            });
        }

	timeline.add({
	    from: 1000,
            run: () => console.log('fin')
	});

	timeline.play();
    }
}

const config = {
    type: Phaser.AUTO,
    width: 800,
    height: 600,
    backgroundColor: '#2d2d2d',
    parent: 'phaser-example',
    scene: Example
};

const game = new Phaser.Game(config);

Additional Information

Activity

  1. photonstorm commented on Dec 23, 2025

    @photonstorm
    Collaborator

    Thank you for submitting this issue. We have fixed this and the fix has been pushed to the 4.0.0 branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions