How do I reset a layout everytime the user navigates to it?

0 favourites
  • 5 posts
From the Asset Store
You must carefully navigate the neon route and collect diamonds on the track.
  • I have different layouts for the levels of my game and another layout for the menu. After the level it goes to the menu with the "Go to"-function. Now, when I tap on the level picker again and the game moves back to the level (again with the "Go to layout" function) the layout is still in the state I left it. I tried to reset it onLayoutStart, but this event isn't get called, when I move with "go to" to the layout I already had used beforehand.

    Which event do I need to use for everytime, when I move to a layout?

  • When you return to a layout it resets automatically. You must be forcing objects to stay in their former state with Persist behaviour or some other method. Or if your game is reliant on global variables for example, they would not reset.

  • you could try adding the event restart layout (system, layout)

  • you could try adding the event restart layout (system, layout)

    You shouldn't need to go to layout and then restart it

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • lionz Thank you for your tip! Had a global variable "LevelEnded" to trigger a transition to the next scene either when winning or loosing and forgot to reset it, before transitioning. So it triggered the loose-condition every time I entered again. Now it's working. ;)

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