hold x y-position by changing the layout

Get help using Construct 2

Post » Wed Nov 28, 2012 12:34 pm

Hello,

Ive a problem to hold the x-y-coordinates by a sprite when changing the layout. The same sprite in the second layout starts everytime from another position. Did anybody know how to transfer the positions in a new layout?

B
4
Posts: 19
Reputation: 720

Post » Wed Nov 28, 2012 1:07 pm

Depends how you want it work,

You could try making the sprite a global sprite and that will help position it where it left off
You could try a start of layout event setting the sprite to a custom position on the new layout

Both of these answers should help, at the least it should point you in the right direction
B
13
S
2
Posts: 87
Reputation: 1,244

Post » Wed Nov 28, 2012 6:41 pm

Thanks for answer. Ive tested both versions, but nothing works. It would be great to explain the practice a little bit more.
For the second version Ive create global variables in the first layout for holding the x-y-coordinates by every tick. "On start of" the second layout Ive set the coordinates with the edit action --> size & position --> set position.

What I am doing wrong?
B
4
Posts: 19
Reputation: 720

Post » Wed Nov 28, 2012 7:21 pm

Thanks! I have it!!!
B
4
Posts: 19
Reputation: 720

Post » Wed Nov 28, 2012 7:24 pm

For all the other guys: Ive combine the two versions from hoguthewhitewolf. That works!

Thanks again hugo....
B
4
Posts: 19
Reputation: 720


Return to How do I....?

Who is online

Users browsing this forum: Matthew de and 27 guests