Honestly I'm not 100% sure if this is the right forum for this topic, because I'm not 100% sure where the problem actually lies.
I have an event that at a point, enters a loop, set to break once a switch is toggled. In that loop is a call to my custom scene. In the scene is a means to close the scene using SceneManager.pop(), which as far as I can tell is the proper way to do it. The scene's close function called through pop merely closes all the windows, nothing else. The odd part happens after the scene is closed. I have the option to break the loop after the scene closes, returning to the normal game map. The first time this is done, everything's fine. But if, after closing the scene, I choose to open it again while still inside the loop, and then close the scene, then break the loop, the game just closes. No crash, no error message, it just closes as if I'd shut it down myself.
I put this topic in Learning Javascript because my custom scene is involved, though I'm not sure how much of an impact it's really having, since the crash happens during execution of a set of event commands, no custom script at all in that part. Trying to debug a set of event commands at the code level is pretty tricky(at least as far as setting a breakpoint goes), so I figured I'd see if there was an obvious answer before I went bug hunting.
Thanks in advance for any and all assistance!
I have an event that at a point, enters a loop, set to break once a switch is toggled. In that loop is a call to my custom scene. In the scene is a means to close the scene using SceneManager.pop(), which as far as I can tell is the proper way to do it. The scene's close function called through pop merely closes all the windows, nothing else. The odd part happens after the scene is closed. I have the option to break the loop after the scene closes, returning to the normal game map. The first time this is done, everything's fine. But if, after closing the scene, I choose to open it again while still inside the loop, and then close the scene, then break the loop, the game just closes. No crash, no error message, it just closes as if I'd shut it down myself.
I put this topic in Learning Javascript because my custom scene is involved, though I'm not sure how much of an impact it's really having, since the crash happens during execution of a set of event commands, no custom script at all in that part. Trying to debug a set of event commands at the code level is pretty tricky(at least as far as setting a breakpoint goes), so I figured I'd see if there was an obvious answer before I went bug hunting.
Thanks in advance for any and all assistance!