Reset Layers and Groups

0 favourites
  • 9 posts
From the Asset Store
Create large maps with dynamic depth and precise sprite layering control in top-down games.
  • Hello community, I'm developing a multiplayer game and I came across a simple problem, when leaving the layout the groups and layers preserve their states, it took me a while to identify the problem because I didn't know that this was "global"... So when leaving the layout I had to deactivate all the groups that were supposed to be deactivated at the beginning and I changed the view of the layers... That's when I noticed that we could have a reset state group and layers. Is this valid and possible in the future?

    Tagged:

  • I think 'restart layout' should reset the groups.

    If the layers preserving their state is a problem, then they shouldn't be global...

  • I think 'restart layout' should reset the groups.

    If the layers preserving their state is a problem, then they shouldn't be global...

    Yes restart Layout resets the state but the intention would not be to restart, it would be to exit... And come back later... So that didn't solve it. In the end I had to reset them one by one.

  • I think 'restart layout' should reset the groups.

    By the way, this is so wrong that restarting a layout resets all groups in the entire project, including groups from all other layouts. There should be at least an option to disable this.

  • Global or normal layers don't keep their state. Only global or persistent objects do.

  • Would it work if Sheets had setting between Local and Global?

    For example, having the layoutsheet set as Local would mean it's refreshed when you change layout.

  • No... You are confusing the global function of the layer or the layout... I meant the state of VISIBILITY and THE ACTIVATION OF GROUPS. As soon as you leave a layout, the groups that were deactivated at the beginning become activated... When you return, the player expects to find the group deactivated and it was activated last time... The same thing for the layers... They remain visible and interactive forever.

  • One of the reasons I dont use Groups to do the (Active & Deactivate) feature is because when you have many groups it becomes annoying to have to loop and deactivate them before leaving the layout so you can find them in their original state the next time you come back to that layout. That is why I switch to instance variables in an object instead as this will reset their state every time I come back to the layout.

    I like the idea that proposes Alaistar:

    The availability of making (Local and Global) event sheets or Groups. I have wanted that since I used Construct.

    It is like the Local variables they are very useful for temporary values and once you leave the scope it resets to default values.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's right, now I just have to get used to it... However, I didn't know that groups preserved their states when I left, so in the multiplayer game I'm playing, I returned to the room and the Peer and HOST groups were already open, causing a lot of bugs. Here's the link to a complex multiplayer strategy game I'm working on.

    construct.net/en/free-online-games/nevess-military-c3-multiplayer-58939/play

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