Can you please help me with a kind of teleport problem?
A few weeks ago, I downloaded a C3 file about a teleportation system (thanks to developer Alextro), where when the player touched one door, it came out at another.
Today, I implemented it in my own game I am creating. Here is the link where you can download my game:
When the player tries to leave the first room and touches the (orange) sprTeleport object (which in the final game should be invisible), it comes out again in the first room (should come out in the second room).
I looked for hours which could be wrong, but I could not find anything.
Please, can you tell me what goes wrong with my version of the teleport?
I thank you in advance for your efforts to help me, which will be very much appreciated.
Develop games in your browser. Powerful, performant & highly capable.
I forgot to add that every sprite is 48x48, and the viewport is 768 x 480 (W x H). I do not know if I have to move the viewport to the next room in code or by teleportation; the viewport will move automatically.
Thank you again for helping me.
I'm not sure if you uploaded the wrong project, because the teleport seems to be working fine. You do not need to move the viewport, because you are switching layouts entirely.
Thank you so much Wacky Toaster, for your help.
The file I shared is the latest version but is not working as expected.
This is how it should work:
The next room should only be visible when the player goes over the teleport object. Then the room is changed to the next one, and the player is standing in the doorway.
When I move the player push by push, he is pushed back by the teleport object.
The whole labyrinth consists of 7 sub-labyrinths, which contain 12 chambers each. Those chambers are invisible to the player when he is not in the chamber. So only the chamber the player is in must be visible.
Each sub-labyrinth is one layout, so there are seven layouts to accommodate the labyrinth.
I think I have to go back to the drawing table and design a better method to change rooms.
Thank you for your help which is much appreciated.