Scene update stops working

I am working on a game where I have different environments in separate scenes. The scenes are randomly selected. Everything is working as expected, until it doesn’t. I can’t find a pattern to when it stops, but it is always the scene that is listed last in config that is affected (I have switched the order to test). The scene creates properly, but the player won’t move with key commands.

Any ideas on a solution? I’ve considered that this may not be how scenes were intended to be used and this is entirely the wrong approach for what I want to do.

The current scenes:

scene: [Start, ShallowSea, OpenOcean]

Here is the create function in the Start scene. The start scene currently preloads all images and has a “click to start” message. On the click, a random scene is selected. This function is used again when the player completes each scene.

create(){
this.add.image(400, 300, ‘clickStart’);
this.input.once(‘pointerdown’, selectScene, this);
}

The function to randomly select the scene

function selectScene(){
var sceneSelect = Phaser.Math.Between(1, 2);
if (sceneSelect == 1){
var ecosystem = ‘openOcean’
} else if (sceneSelect == 2){
var ecosystem = ‘shallowSea’
}
this.scene.start(ecosystem);
}

Here is a link to the current game: https://taxonomygame.netlify.com/
The gray oval functions as the player. Entering the circle thing at the end starts the next scene.

Following this. I don’t see what could be wrong based on what you’ve provided.

So it loads your scene, you are just unable to send input to the game? The only thing that could be is your scene is unable to see your cursor key bindings.

As Ben said, there isn’t enough information on this to really help. Can you set up a simple, stripped-down example on CodePen.io or something?

Here’s more of the code I’m using. (I’m not too familiar with CodePen and similar options, so I’m trying this before I delve into that).

game config
image

The create() for one of the two scenes that are randomly selected. The other scene is nearly identical in set up, differences are in the images.

The update() for a scene. Again, the other one is the same.

Yes, the weird thing is that the scene is using the cursor key bindings just fine when the scene comes up some of the time…it may make it through 2, 5, 10 runs before it stops responding. Is there any reason the key bindings would work once, but then not work the next time the scene starts?