I have been pulling my hair out trying to figure this out.
In my game, there are currently 4 layouts. The main Layout is "Layout1"
I want to be able to go to another layout by contacting the "Door" item. Once through, I want to place "Player" at that doors corresponding "EntryPoint." Or possibly place it at the door itself and have the door object ignore the players presence until he moves away from it (so you don't teleport back and forth infinitely). The "Door" version would be preferred, so I don't have to create an entry point for each door.
Each door has an associated instance variable that refers to the layout the player will be teleported to. Each entry point also has an instance variable that refers to the layout the player is coming from.
Teleporting the player to the correct layout based on the doors instance variable is easy. Figured that one out at least
. But, placing the player at the correct entry point is killing me. No matter how I try to 'call-up' a particular entry point based on its instance variable, I just can't get it right!
I need this to be modular like the door, I don't want to have to program the exact coordinate for each entry point for each Layout (and corresponding event sheet).