Hi everyone,
I’m trying to get the character to go through the red door, switch to the “Pain Scale” scene, and when they go through the green door, go back to the main scene from the green door and not from the beginning of the scene.
I really don’t know if the game allows to do something like that. Until now I’ve tried using the event “Stop the scene and go back to the previous paused one” but this does not work, it just repeats the same scene “Pain Scale” over and over again.
Does anyone know if it is possible to do it this way or is there some other similar option to return to the scenes?
This is how Pain Scale scene looks, so that green door is the exit to the Game scene:
Maybe, change the global variable called room1_x to the x position of Player while he is on that green door
and change the global variable called room1_y to the y position of Player while he is on that green door
Now, in room1, check if the scene is just resumed, and change the Position of Player based on room1_x and room1_y
Finally i tried it with variables, but it is something that I still don’t understand very well. What I did was just put everything in the same event and now I can go back to the main scene from the same door from where it came out.
Thanks for your help anyway!
I’m assuming you’ve got a collision check between player and red door, and the action to pause current scene and start the Pain Scale scene? If so, then the problem is probably that when the scene resumes, the player is in the same position, and in contact with the red door. At which point it would open up the Pain Scale scene again.
Move the player character to the green door on the main scene before you switch to the Pain Scale scene.
With the events in the first screenshot in this thread, the scene is being paused with the user in collision with the activation box. Meaning that as soon as they come back to this scene it is immediately going to pause again and go to the other scene.
In many cases it can try to change scenes infinitely before it actually changes it over, causing either a freeze or nothing to happen (this is with any change scene event)
Hi. all , variables are your friends all this can be solved just add a scene variable or an object variable to the greendoor object so later just check
if player is in collision with greendoor
greendoor variable open = false
Do your stuff here for a collision with the greendoor closed.
if player is in collision with greendoor
greendoor variable open = true
Do your stuff here for a collision with the greendoor open.
Maybe you need to add some Storage for the greendoor so you can manage the state of the door at the begin of the scene.