How do I make a doors (scene change)

I want to create working doors for scene-changing but I don’t know how.
Update: I changed the word ‘door’ to ‘doors’.

Hi, you want to change the scene when you interact with the door?
You can use a condition for when the player is in collision with the door and add an action “Change the scene”.

But how to make the player appear at the door?

Can you share more details about your game?
What type of game is it?
Can you share a screenshot of the events you have leading to the scene change?

Current event.

Simple explanation.

I assume the player character is global object… Have you also added the player object to Scene 2? Does the player appear in the Scene 2, if you start the game directly in Scene 2?

There is gonna be more than 1 door.
I need a way to create the Player at the selected door.

If you have one door per scene
It does not matter where you spawn your player

All you need is

Condition in scene 1
Player interacts with door (whatever is in collision or you need to press up to enter then)

Action
Change global variable SceneSwitch SET TO 2
Change scene to scene 2

Now in scene 2 events

Condition
At beginning of the scene
Value of global variable SceneSwitch is equal to 2

Action
Change position of Player to X and Y of doors in scene 2

To go back
Condition in scene 2
Player interacts with door

Action
Change global variable SceneSwitch SET TO 1
Change scene to scene 1

Condition
At beginning of the scene
Value of global variable SceneSwitch is equal to 1

Action
Change position of Player to X and Y of doors in scene 1

I want more doors per scene.

So go with instance ID

You copy paste like same door object on scene FOR EXAMPLE 3 times
And now you label them like ID 1 ID 2 ID 3

Now you go with

Condition (in scene 1)
Player interacts with door (whatever is in collision or you need to press up to enter then)

Action
Change global variable SceneSwitch SET TO Door.Variable(ID)
Change scene to scene 2

Condition (in scene 2)
At beginning of the scene
Value of Door variable ID is equal to GlobalVariable(SceneSwitch)

Action
Change position of Player to X and Y of doors (in scene 2)

To go back to scene 1
You only change in what is above change scene to scene 1

This way no you do not need to specify interaction with which doors in scene 1 will take you to which doors in scene 2
They are auto connected

So doors with ID 1 in scene 1 will take you to doors with ID 1 in scene 2
And vice-versa

And if you set SceneSwitch variable to 0 it won’t take you to any doors so you leave current scene and appear ANYWHERE in other scene
That also means you should NOT give any doors ID variable of 0

1 Like

I tweaked it a bit it and working.


Each door has 2 variables “Door_ID” and “Scene”.
“Door_ID” for targeting the right door.
“Scene” for scene changing.

1 Like