How do I travel in and out of layouts?

0 favourites
  • 6 posts
From the Asset Store
Design for game, asset for game, game kit, UI design, completed design for game, mobile game
  • Help! I'm in the process of designing an RPG, but cannot seem to program the simplest thing. I would like for my player to move to one layout, and upon going back, return to the first layout from where it came. Whatever I do, the same problem persists; both layouts rapidly switch back and forth, and I'm breaking my head trying to figure this out.

    If it helps to note, the first room has two different paths; therefore, there would potentially be three different spawning points: the initial, the first path, and the second path. If anyone has any solutions, please let me know!

  • Hey Spy,

    How do you have things connected up? It sounds like when you go to the new layout you are spawned on the door which is why you are constantly going back and forth between layouts.

    Post up an example of the problem if you can.

  • https://www.dropbox.com/s/dkqrwnwdz75qh ... .capx?dl=0

    As mentioned above, don't spawn on your exit, or you will collide immediately and trigger the exit on the new layout. Otherwise, you'll need a state variable that keeps track of if you just entered a layout, and add a condition to check that it is false before exiting again.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey Spy,

    How do you have things connected up? It sounds like when you go to the new layout you are spawned on the door which is why you are constantly going back and forth between layouts.

    Post up an example of the problem if you can.

    Hey, Genki! The issue I was having was the fact that I had the player always set up to the initial spawn of the first room, when the initial spawn didn't even have to be there in the first place. Kind of hard to explain but basically I had everything wrong. Thankfully oosyrag helped me out! I feel like such an idiot because the process was so simple, hah!

  • dropbox.com/s/dkqrwnwdz75qhxm/layoutrooms.capx

    As mentioned above, don't spawn on your exit, or you will collide immediately and trigger the exit on the new layout. Otherwise, you'll need a state variable that keeps track of if you just entered a layout, and add a condition to check that it is false before exiting again.

    Hey, Oosyrag! Your solution worked! It took me a bit to figure out, but it works wonderfully. Thanks so much for the help! Cheers!

  • Ha we all make mistakes glad your on the right track now. Good job Oosy.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)