Guide by Pvic
So today I am gonna show you all how to do this: https://youtu.be/PdNWC-Wynu0
it's pretty easy
Go to scr_game_initialization and paste this: global.lastexit=1;
Afterwards, duplicate the sprite spr_player_startplace, make the sprite called spr_player_startplaceB, mirror/flip it horizontaly and make it red
Then make two sprites,
spr_exit1: https://cdn.discordapp.com/attachments/392733687596187649/401076326762545155/unknown.png
spr_exitminus1: https://cdn.discordapp.com/attachments/392733687596187649/401076354373910529/unknown.png
Make the origin of both sprites like this:
Duplicate the object in game -> fades called obj_fade_next and call it obj_fade_previous and change room_goto_next() in the Destroy event's code to room_goto_previous()
Afterwards, make a object called obj_exit1, give it the sprite spr_exit_1 and click add event -> collision -> par_player and add this code:
if other.ai_flag==false
{
global.lastexit=1;
if !instance_exists(obj_fade_next)
{
instance_create(x,y,obj_fade_next)
}
}
duplicate obj_exit1, call it obj_exitminus1 and give it the sprite spr_exitminus1 and then give it this code:
if other.ai_flag==false
{
global.lastexit=-1;
if !instance_exists(obj_fade_previous)
{
instance_create(x,y,obj_fade_previous)
}
}
Duplicate obj_player_starplace and rename the object you created to obj_player_startplaceB, make its parent be obj_player_startplace and paste this in the top of it's code:
if global.lastexit=1{instance_destroy();exit;}
Afterwards, go to obj_player_starplace and paste this on top of it's code
if global.lastexit=-1{instance_destroy();exit;}
.