Forum rules - please read before posting.

Adding infinitely to an integer

My goal here is basically to create a game which is for all intents and purposes endless (it's the classic 'Simon' game to be specific, pretty simple). Every stage of the game, I want a new integer value to be remembered every time a new round starts, and for the game to be able and register if the player clicked the right button, and I want this process to repeat until the player loses. How could I go about doing this without manually scripting every single level until I die?

Comments

  • You can create an Integer in the Variabes Manager - make it a local one unless you need to access it in other scenes or asset files.

    The Variable: Set Action can then be used to set its value when the stage begins. Note that its value is saved/restored automatically when re-entering the scene, so you'll have to reset it to zero in your scene's OnStart/OnLoad cutscenes if you want to avoid this.

    When setting an integer value using this Action, the Method field allows you to either set its value explicitly (i.e. reset to zero), or increase it by some value (i.e. increase by 1).

    If you'd like more advice on incorporating your intended logic, just elaborate a bit more on exactly what it is you're after.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.