Switching Layout problem

0 favourites
  • 4 posts
  • 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.

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

  • I will use the way you suggested.

    Thank you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

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