Transferring positions between layouts

Get help using Construct 2

Post » Wed Jun 13, 2012 5:55 pm

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!
B
19
S
6
G
5
Posts: 98
Reputation: 4,484

Post » Wed Jun 13, 2012 6:12 pm

Just store the character's position in a global var and set it again when the next layout loads.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Wed Jun 13, 2012 8:23 pm

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,
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], makkancs, Marxally and 32 guests