License from €75
DE EN FR ES IT CZ

get os.time or timer with lua

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 12 years ago
    Hello,
    I need to show a simple timer or os.time in my scene but I don't know like do it and the variable type.
    number type: v=variable
    string type: vs=variable
    time type: ???

    thanks.
  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license.

    See licenses Try it for free
  3. · 12 years ago
    There is no time type for the displayed texts. You can only include the integer or string value of an existing value. You could write the time into a value though. The string section of a value would be better than the integer section as you would be able to include formatting.

    What is this timer for?

    os.date("%X") -- return players os time in 24 hour format (hh:mm:ss)
    
  4. · 12 years ago
    Hi Lee, it's your timer script that not works grin. When I quit the option menu, the timer resets to 0 every time.
  5. · 12 years ago
    Ah that old chestnut again eh! grin

    I wrote that script ages ago. Not sure why it should be resetting itself though, unless you are reinitializing the script by calling it each time you load the menu scene.

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?