S
SharpDim.
Guest
New in programming, sorry for the unsophisticated languages
So in my program there is a room that plays the role as the "main room", which means there are a several objects in that room and they are like entrances to other rooms, when the player object collides with one of those "entrances" it will be transferred to the corresponding room, and then through colliding the "exit" inside each room the player could get back to the main room.
But the problem is I've set a location for the instance of the player object in the main room (when I dragged the object in), and every time it enters the main room, no matter which room it comes out from, it will get back to that location, when it is expected to be near the "entrance" of the room it comes out from.
Just like in a game when the player comes out of a village they should be in front of the entrance of that village instead of somewhere else. How to achieve that through coding?
If there's confusion here's a graphic demonstration of the situation:
Thank you guys very much for answering!
So in my program there is a room that plays the role as the "main room", which means there are a several objects in that room and they are like entrances to other rooms, when the player object collides with one of those "entrances" it will be transferred to the corresponding room, and then through colliding the "exit" inside each room the player could get back to the main room.
But the problem is I've set a location for the instance of the player object in the main room (when I dragged the object in), and every time it enters the main room, no matter which room it comes out from, it will get back to that location, when it is expected to be near the "entrance" of the room it comes out from.
Just like in a game when the player comes out of a village they should be in front of the entrance of that village instead of somewhere else. How to achieve that through coding?
If there's confusion here's a graphic demonstration of the situation:
Thank you guys very much for answering!
Last edited by a moderator: