I'm trying to start out with a basic platformer -- right now a cube that can move about between two rooms. I guess I have two questions:
1) What is the best way to make multiple rooms that one can more back and forth between? (1 layout per room or something else?)
2) What is the best way to send the player back and forth between rooms?
Currently I have two layouts (Layout 1 for room 1 and Layout 2 for room 2). I also have a sprite (Trans1) I made invisible in Layout 1, and when the player comes into contact w/ Trans1 he is taken to Layout 2 like so:
Hero - On collision with Trans 1 --> go to layout "Layout 2"
And on Layout 2 I just moved the player sprite by the entryway to the next room. This all worked pretty well until I was trying to figure out how the player could go back. If I do the same thing with a separate invisible sprite (Trans2), I realized that the player does not appear by the hallway, but rather by the original spawn point (where the game begins). I tried something like this:
Hero - On collision with Trans 2 --> go to layout "Layout 1"
--> Set position to (728,204)
...but that didn't actually more the player sprite to that location, and it appeared in the original spawning point like before.
I feel like there must be a simple way of doing this that I'm drastically overlooking -- any help would be much appreciated! (Hope my ramblings make sense!).
EDIT: Here's a .capx for what I'm trying to do. LINK