Reset Scene after Game Over Instant Games

Hi all,

I have searched the forums but don’t seem to see anything relating to my problem.

Question:

  1. How do you handle screen reset or reload scene for instant messenger games?

Issue:
After a condition is met to win or lose the game I want to “Reset”/“Reload” the level. I have tried the change scenes script from PlayCanvas it works fine in my isolated project but not on my main project. I have functions that fire and listen to events. One application.fire(string) code does as intended but the application.fire(string) code in another doesn’t get executed.

Can anyone shed a light?

There is no ‘official’ way to reset / reload your application. It is something you have to manage manually in your scripts. What I usually do when I make games is for every script that I create I also write a reset function for that script where I explicitly handle resetting the state for that scripts. Then when I reset my game I fire an event on the app and each script listens for that event and calls its reset method.

1 Like