What does restart layout actually reset?

0 favourites
  • 6 posts
From the Asset Store
In this template the music plays without looping in your game
  • I'm trying to understand what "system->restart layout" actually resets...

    For example, in the layout editor I set one of the layers to be initially invisible. During the game it's set to visible at one point, but when I call "system->restart layout" it doesn't reset that layer to invisible.

    Does "system->restart layout" ignore the layout properties set in the layout editor? If so, which ones? And what's the best way to truly reset the layout - store all properties in global variables?

  • The layer is more of a global thing. When you restart it sets objects back to their initial states, and I think groups in events.

  • [deleted]

    All objects are re-created, except global and the ones with Persist behavior.

  • Layers and event groups are not reset to their default state. If you deactivated a group, it will stay deactivated after the layout restart.

    All objects are re-created, except global and the ones with Persist behavior.

    Hey Dop thanks for the response. Re: your comment on groups, just want to make sure I'm not misunderstanding something. Per the docs:

    Restart layout:

    Restart the current layout. Note that unlike Go to layout, this action resets all event groups to their initial activation state. Global variables keep their current value - they are not reset. To reset them use the system action Reset global variables.

    ?

  • Hm, you are right. I tested before posting that comment, but I probably put "Set group deactivated" action after "Restart layout", that's why it stayed deactivated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If I have a function with static variables in the group are they effected?

    And, if I reset an area, where some sprites have become children of sprites not in that area, what happens? Are they no longer children? Same with parent hierarchy forming outside the area?

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