Changing scenes when the player goes offscreen

Hi, I’ve never actually used GDevelop 5 before and I started using it like 3 days ago. I’m trying to create an Atari style horror game. The plot of the game is that this girl goes to a cemetery to pay respects to a dead loved one, she needs to get back to her car but a dangerous creature is in her way, she needs to get to her car without getting caught by the creature.

The cemetery layout/map is like a maze, so there are twists and turns leading to different places and possible dead ends.

So what I want to know is how to change the starting scene to the next scene as the player goes off screen. Sort of like the Atari game “Adventure”. Can someone help me with that?

Hi, you can check the position of the player, and if it goes outside the screen limits,skip to the appropriate level.

How do I do that? I’m still new to this program and don’t know everything about it.

For example, suposse you are in a room with the exit at the top of the screen. You could check the Y coordinate of the player, and if it’s lower than 0, change the level to the next room.

You have these conditions available for sprite objects:
imagen

I’m sorry but I don’t quite understand. I am very sorry.

Maybe you should start with the platformer tutorial to learn the basics of GDevelop :slight_smile:
It will explain how to use the software, what is its logic, where is everything, etc.
You will also find several video tutorials on youtube as well, if you prefer.

This page is also very important. Read it carefully.

Yes, as @Gruk said, I think you should start looking for basic tutorials before starting your own game.

As a little guide for what you want, maybe this explanation helps you a bit.
You know that in two dimensional world the space is defined by two cordinates X (horizontal) & Y (vertical)
In GDevelop, each object has these two variables “embedded”, wich defines their position in the screen.
If your game screen resolution is, for example, 800 x 600, the object will be outside of the screen in these cases:
X<0 → the object is out of the screen from the left
X>800 → the object is out of the screen from the right
Y<0 → the object is out of the screen from the top
Y>600 → the object is out of the screen from the bottom

So one way to exit the level as in Atari game “Adventure” is checking the player’s coordinates. Other way could be by checking collision with some kind of door object, or zone. But take your time learning the basics first, and then go for your game.

Good luck!.

1 Like

Thank you very much.