Resetting groups intial states

0 favourites
  • 2 posts
From the Asset Store
State Machine
$10.99 USD
State Machine is a great tool for managing the state of anything in your game.
  • Hi Guys,

    I'm working on a topdown shooter where I use groups to activate and deactivate what type or ennemies are spawned by the game.

    I use a "Reset Layout" function to restart the "game" layout when the game is over and it works well as it reset all groups to their initial state.

    However I wanted to add the option to go back to the main menu and from there be able to start a new game.

    What I did was to give 2 options to the player when he is game over.

    -Press R to restart: This work well

    -Press M to return to menu: This kinda not work.

    The thing is that yes I can load my "Menu" layout fine but when I go back into the game after going back to the menu, the active/inactive states of the group in the "Game" layout is as it was when player died instead of resetting to its original values (as it does with a reset layout function)

    I tried many things but I can't figure out how to do this. Have anyone been able to do something similar?

    Thanks a lot for your help

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could probably try resetting them manually on the start of the layout. That typically works for me.

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