[SOLVED] Jumping from One scene to another

Hi! I’m literally almost done with my game. My problem now is that my game is kind of experiencing some kind of ‘glitch’ (?) Once I finish with my level one scene, it goes to a ‘proceed?’ scene. and that ‘proceed?’ scene goes to the second level. However, it’s sort of making this weird ‘double’ scene? that I don’t understand at all. It looks like this

Here’s the link of my game:

Level One: PlayCanvas | HTML5 Game Engine
Proceed? Scene: PlayCanvas | HTML5 Game Engine
Level Two: PlayCanvas | HTML5 Game Engine

Hey, the loadscene() function is being called again and again in the script named CollisionLeveltwo.js
It should be called only once. Also, you should add any check with which oncollision functionality is called only once and not again and again. Now, whenever you will go near the endpoint in level 1, it will call that onCollisionStart function which is not correct.


I tried deleting the first this.loadscene(); and it’s still doing the same thing. Could you further explain what I need to do?

Oops! nevermind. I deleted the entire code for the second ‘self.loadScene’ and now it works! oh my god. You are such a lifesaver. Thank you very much, I really appreciate your time helping me

1 Like