Skip to Content

globals

Read-only live game values: realtime, curtime, frametime, framecount, tickcount, tickfraction, tickinterval and maxplayers.


Read-only game values, read live on each access.

PropertyTypeDescription
globals.realtimenumberReal time in seconds.
globals.curtimenumberGame time in seconds.
globals.frametimenumberLast frame duration in seconds.
globals.framecountintegerFrame counter.
globals.tickcountintegerCurrent tick.
globals.tickfractionnumberFraction of the current tick.
globals.tickintervalnumberSeconds per tick: 1/64.
globals.maxplayersintegerNumber of player slots.

All properties return nil before the game's global variables exist, including at the main menu immediately after startup. Unknown properties also return nil; absoluteframetime is not defined. pairs(globals) yields no entries.

Assigning any property raises globals.<key> is read-only.