Can someone fix the codes for me?

https://playcanvas.com/editor/scene/2048785
Hi. I am having trouble getting my scene come together. the flow goes like this menu>start>level1>level2>well done!

on my level2 scene, when my entity (grandma) collects a stone, i want the game to switch to the next scene which is the ‘gameover’ scene. the goal is the collect rosaries. after the collecting all rosaries on the “level2” scene, i want it to switch to the next scene which is the “Well Done!” scene. Please help me. Attached above is the link to the editor.

Hi @FRANCHESCA_GUSTILO!

For example on line 18 of your code, you can change the scene with the code below.

image

this.app.scenes.changeScene('tryagain');

You can do something similar for the rosaries if the number of rosaries is sufficient.