Timer
Timer is a better alternative to the timers that Gothic offers. The FrameFunctions and Anim8 packages are already based on it. It isn't possible to modify the current time, as this would only cause difficulties.
Dependencies
N/A
Initialization
Initialize with LeGo_Timer
flag.
Implementation
Functions
Timer
Returns the current playing time. If a new game is started, the time is 0. It is measured in milliseconds.
The function returns current playing time in milliseconds.
TimerGT
Returns the current game time, but the timer is paused when the game is paused (in the menu or status screen).
The function returns current playing time in milliseconds, but without measuring time when game is paused.
TimerF
Alias to Timer
function that returns the time as an Ikarus float value.
The function returns current playing time as an Ikarus float value.
Timer_SetPause
Pauses the timer (and thus all FrameFunctions and running animations).
var int on
Pause on/off
Timer_SetPauseInMenu
The timer can automatically pause when the game is paused. (status screen, main menu...)
var int on
Automatic pause on/off
Timer_IsPaused
This can be used to query whether the timer is paused.
The function returns TRUE
if the timer is paused, FALSE
is returned otherwise.