Forum rules - please read before posting.

Global timer

Prompt please, whether to make a global timer is possible?

Comments

  • You can create a Global integer Variable to store the number of e.g. seconds that have passed since your game begins.

    Create a new ActionList that's set to Run In Background, and have it run a Variable: Set Action to increase the integer's value by 1, then an Engine: Wait Action to wait 1 second, then loop back to the first Action.  If you then assign this as your ActionList on start game (in the Settings Manager), it'll track how many seconds have passed.
  • Cool, this kind of feature will be very useful! Specially because I'm making a sort of life simulator, rpg, adventure game hybrid, lol. Can we somehow adhere this information next to the saved games, to show how long the player has, well... played in each save?
  • Any created variable can be displayed in a menu using tokens, or manipulated further through script: this tutorial shows how.  You could use an integer variable to keep track of time, and a string variable to display it in a friendly fashion.
  • But, in the save/load menus, how would you display the value of the Gvar which belongs to each separate save without having to load that file first? is there a way to extract the value from a single variable from a saved game file?
  • Ah, sorry, I misread your question.  Yes, AC supports custom save labels - see this tutorial.  The key difference would be in how your "Save name" global variable is set (a custom script as above, rather than inputted by the player).
  • Thanks, I'll give it a read!

  • Done. Thank you.
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.