ctmartinez1992 Posted February 23, 2014 Share Posted February 23, 2014 Hi, I am having a hard time trying to find how do i schedule an action, let me explain better: I have a sound that i want to play 10 seconds after a level is loaded, how do i make this happen? Thanks for the answer, i'm really stuck on this particular problem and can't seem to find anything Link to comment Share on other sites More sharing options...
Vaughan Posted February 23, 2014 Share Posted February 23, 2014 Use a Phaser timer. https://github.com/photonstorm/phaser/blob/master/examples/time/basic%20timed%20event.js ctmartinez1992 1 Link to comment Share on other sites More sharing options...
ctmartinez1992 Posted February 23, 2014 Author Share Posted February 23, 2014 Ah yes, this is exactly what i need, thank you Link to comment Share on other sites More sharing options...
mitch.white5 Posted March 6, 2014 Share Posted March 6, 2014 Use a Phaser timer. https://github.com/photonstorm/phaser/blob/master/examples/time/basic%20timed%20event.js Vaughan, I repeatedly receive an error stating that "game.type.events" is undefined. In that example of a timer facilitated by Phaser, I don't see anywhere in the code where they define the timer. Do you have any thoughts or suggestions? Thanks! Link to comment Share on other sites More sharing options...
Alvin Posted March 6, 2014 Share Posted March 6, 2014 Do you use the exact same syntax as in the examples ? This is how to add a timer :game.time.events.add(1000,callback, this);Also which version of Phaser do you use ? Link to comment Share on other sites More sharing options...
Recommended Posts