How to make a portal that warps you to another part of the stage, guide by Pvic. Basically how this works is that you touch the purple portal and you go to the green one. Make sprite spr_portal https://cdn.discordapp.com/attachments/403203277568606219/408327313961254922/spr_portal_strip20.png & spr_portal2 https://cdn.discordapp.com/attachments/403203277568606219/408327329270726676/spr_portal2_strip20.png Center the offset in both sprites Make object obj_portal, give it the sprite spr_portal make it's parent with obj_control and make an event of collsion with par_player, add a code and paste this
if other.ai_flag==false{
other.x=instance_nearest(x,y,obj_portal2).x;
other.y=instance_nearest(x,y,obj_portal2).y;
obj_camera.x=global.main_player.x
obj_camera.y=global.main_player.y
instance_create(x,y,obj_fade_in_white)}
Make obj_portal2, give it the sprite spr_portal2, make it's parent with obj_control and make it's depth 10. You also have to make a object called obj_fade_in_white: duplicate obj_fade_in call it obj_fade_in_white go to the code in it's draw event and change c_black to c_white