Reset Function

0 favourites
  • 6 posts
  • Hey Ashley / Tom, could we get a System -> Reset / Reinitialize Function of some sort?

    So a layout can be restartet with the values it would have if the game / layout hasn't been played yet?

    Examples: System -> on start of layout -> reinitialize(gamelayout)

    System -> on start of layout -> reinitialize(optionslayout)

    I went the easy way in NEON and just reloaded the page because i lost track of some variables and groups and didn't have an overview anymore of what changed and when... i guess im not the only one with this problem and "bigger" projects.

    I know that i could create an event on game over that goes through all variables /groups / etc. and resets them but i think a function in the runtime itself to do this would be nicer and easier for the users :D

  • Everything should reset except global variables. So would something to reset all global variables be enough?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The main use of a global variable is that its passed to each layout, and every object has instance variables, so I don't really see the point of resetting globals.

  • Think Binding of Isaac. if all the powerups were stored in global variables to keep as you progress, but you want them to go away when the player dies.

  • Surely that's the whole point of initialization.

    On level start, variables - global or instance - should be setup by the programmer accordingly.

  • Ashley well if the global variables are the only thing that aren't reset when the layout is changed, I guess its not needed.

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