0 Favourites

Transferring positions between layouts

  • 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!

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic
132 29,584
chadorireborn's avatar
chadorireborn
Unread hot topic
52 8,559
BluePhaze's avatar
BluePhaze
Unread hot topic
0 Favourites
Feature: Multi-Layout Editor
52 4,319
Nesteris's avatar
Nesteris