Reset global variables

0 favourites
  • 6 posts
From the Asset Store
Globals 2.0
$3.60 USD
10% off
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • Hi Just wondering if anyone might know a solution for this:

    I have this set up:

    Event: System/Time=1 Minute

    Action: System/Go to layout1

    Action: System/Reset global variables to default

    So after 1 minute of game play it goes back to layout1 (beginning of game) and the globals are reset so you can play again.

    The problem is it only works one time. after the second round it dose not reset or time out.

    Is there a way to make it happen every time you play?

    Thanks for any help

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try "Every 60 seconds" instead of "Time = 1 minute". Alternatively try storing 'time' in a global variable on start of layout and checking if the time is 'time + 60'. The game time is from the very beginning of the game, so the second time around the time will be 2 minutes and counting, which will not satisfy the "time = 1 minute" event ever again.

  • Thank you! Changing it to "Every 60 seconds" works perfect!!

  • I think this would work too

    Event(compare two values): time%60 = 0

    And you don't need any extra events

  • thanks! Is there a way to see the timer or countdown on the screen visually somehow tied to the methods mentioned above?

    Also, is there a way to start the timer on a mouse click?

    I have a start page (layout) with a "play" button on it and when that is clicked I'd like the timer to start.

  • Yeah me too.... <img src="smileys/smiley17.gif" border="0" align="middle" />

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