Am making a game that has different rooms(scenes). I want the player to be able to move from one scene to another through an entry point (like an object in the scene) in the scene such that once the player comes in contact with the entry point, the appropriate scene loads and the player is transported to the appropriate location in the newly loaded scene. How can i implement this in my game. also how would i tackle this problem is a scene has numerous entry points
I believe saving and loading global variables might be your friend for this one. I’m not sure if I can explain it properly here. There are tutorials by Helper Wesley and Max. You can probably look those up. Variables and Saving and Loading.
In a nutshell, what I might do is assign a certain global variable for each door. When the player goes through a certain door, it’s variable is switched to true and other door variables are switched to false. This would determine which scene will be loaded next.
So then the variables are saved and the game switches to the next scene accordingly.
In the next scene, the saved variables are loaded and the player is moved to that scene’s door with the corresponding variable.
So yeah, something like that.