So i'm trying to get my player character to go inside buildings.
Layout1 is town map, player steps in front of a house door (press a button to open the door) ----> goes to layout 2 which is the interior of the house.
Then when Player steps back in front of the door (or uses a button to open the door) it goes back to town map (layer1) in front of the house.
The player is a global object of course.
If some are familiar with RPG Maker you'll know what i mean, i'm trying to have a similar effect (and i wish it was as easy in construct 2)
What do you have so far?? Cause I see you asked before in another thread.
Last time I asked how to go simply throught layouts (i didn't know the global object option)
If you pay attention this time it's a more precise problem.
I need the player to step on an object (placed in front of a doorstep) and send him to another layout at a precise point (the inside doorstep) and that works both ways.
At the moment i'm able to send him to another layout but it just pops in the middle of the screen.
i can't use the "set position at start of layout" since there will be some locations with more than 1 door.
Develop games in your browser. Powerful, performant & highly capable.
Can you set the doors up as collision objects, and then test map position and use a lookup table to determine which coordinate to switch to in the new layout?
Sorry, the problem isn't very clear.
I know that. I was asking from that information what have you achieved so I can build from what you have developed. But someone will provide the answer to what your trying to do. I help out of kindness not for someone to feel entitled to be rude.
Your player should have two instances variables named "WarpX", "WarpY". When you step on something that makes you warp, set the variables appropriately to where you want the player to be when he "warps" to another layout. Then, on start of a layout, set the X and Y of your player to its WarpX and WarpY values.