Transferring positions between layouts

0 favourites
  • 3 posts
  • Hello all,

    So, say I have multiple layouts that ultimately are parts of a larger game map. I want to be able to move to the edge of the screen on one layout and then appear in the corresponding next layout, but in the same spot. So say I exit Layout1 from the right side of the screen about halfway down; I want my character to appear in Layout2 on the left side of the screen in the same spot as the exit point from Layout1. I know how to switch Layouts and all that, but I am not sure how to tackle the rest of this.

    I also had an additional question. At what point is there 'too many' events running? I typically avoid using the various loop functions if I can and keep them to a minimum, but I tend to run into a couple hundred events for more complex games and after awhile it seems to drop the FPS.

    Thanks for any feedback!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just store the character's position in a global var and set it again when the next layout loads.

  • i made an example, but with this you should have a system that knows in wich layout you are and wich direction is the next layout

    i saved the vars in a global object >character

    example

    hope it helps,

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