Switch to new scene

I’m testing out making a game for the first time, it’s a very simple game the player moves across several scenery screens. Basically, as of now I have it set up that the player uses d to move from one side of the screen to the other, I want to make it to where when they reach a certain x coordinate it switches to the next scene. Is that possible and how would I go about doing it?

I’ve tried making an event:

Condition:
Compare X position of the object
Sign of test: equal to the coordinate I want to use

Action:
Change scene to “Scene2”

I thought maybe that would work, it did not.

Did you try equal to or greater than?

I have had similar issues when triggering actions based on position and I could be wrong or not explaining it well, but I think it’s because the coordinate of the player object doesn’t exactly match the settings when you’re moving around (it might be something like X 100.49858429 vs. 100). So if you use ‘equal to or greater than’ your coordinate setting, it should still trigger that action even if the actual position is a fraction higher.

Does that make sense? .

I tried this, it didn’t work I moved around the coordinates and tried all the settings and the only one I could get to work was the less than option, which sent the player directly into the second scene when the game started - but thank you for the suggestion. :slight_smile:

Aww bummer.

You’re welcome, I hope you can get it working :slight_smile:

I would probably end up creating some object to trigger it with a collision. :blush:

1 Like

Okay, that’s a great idea and that’s what I’m doing and it’s working so thank you!!! :smiley: :smiley:

1 Like