Switching Layout problem

Get help using Construct 2

Post » Wed Sep 04, 2013 2:17 pm

Hi friends,

I created a settings layout to deal with sound settings. When ever I click on settings button Settings layout opens and then when ever I click on keep playing button it goes back to the currentlayout that I set as currentlayout global value.

the problem is -> My Player object is somewhat reseted.

I couldnt understand the problem. If I set persistent as a behaviour it causes some other problems. If I dont set it then this happens. How Can I Oepn a layout without resetting anything on any other layout and How Can I go back to the previous layout without changing anything on that layout?

Any help is appretiated. Thank You.


B
11
S
3
Posts: 44
Reputation: 823

Post » Wed Sep 04, 2013 2:26 pm

IMO the best way to do this would be having an invisible layer with the settings, and whenever the player clicked "settings" it would pause the game and show up.

But if you really want to use layouts, you could save the player's position using variables, then load these variables at the start of the layout.
B
123
S
43
G
41
Posts: 846
Reputation: 28,204

Post » Wed Sep 04, 2013 2:58 pm

I will use the way you suggested.

Thank you
B
11
S
3
Posts: 44
Reputation: 823

Post » Wed Sep 04, 2013 6:46 pm

Is it possible to make a layer Global ? There are levels in the game and every level is a different layout but using same eventsheet. I think it is still the only solution to use a layout and set the position of the player.
B
11
S
3
Posts: 44
Reputation: 823


Return to How do I....?

Who is online

Users browsing this forum: Laura_D, rayolf and 25 guests