Problem with locations in my games?

0 favourites
  • 3 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • Hello!

    I recently encountered a serious problem in my game, and I did not find any guide on how to solve a similar problem.

    In my game (TDS) there are 2 locations located on two layouts: the surface and the cave. I want the objects in the layout to keep their location, animation, etc. when the player enters the cave and then returns to the surface (in my game, most of the objects are randomly generated). However, when I try to do this with "go to layout", when I return to the surface layout, it restarts.

    I tried to do this by autosaving the game before entering the cave, and then loading the save, but then when leaving the cave, all global variables are reset. Thus, the health and other indicators of the player are set to the initial value.

    I'm not sure if this can be done in principle, but I really hope that someone can help me. Thank you in advance!!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The layouts reset by default. What you are looking for is the 'Persist' behavour. Add this to any objects you want to retain their position or variables and they will be the same when you go between layouts.

  • Thank you VERY MUCH!!!!!

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