OMSI Script System Variables
The System Variables are read-only and loaded with (L.S.example). They are defined in /program/varlist_system.txt.
Timegap
Duration of the previous frame in seconds.
GetTime
How long OMSI has been running in seconds.
NoSound
0: Sound enabled, 1: Sound disabled
Pause
0: Unpaused, 1: Paused
If this game is paused then OMSI isn't executing script frames, so when will this ever be true?
Time
Time of day (seconds since midnight).
Day, Month & Year
Calendar date.
DayOfYear
1 on 1st January.
A couple of default sound cubes use this to mute themselves at certain times of year.
mouse_x & mouse_y
Position of the cursor on the screen (pixels) for mouse drag interactions.
PrecipType
What kind of water is falling from the sky?
- No precipitation;
- Rain;
- Snow.
The default buses use this to ensure the sound of raindrops hitting the roof only plays when it is raining.
PrecipRate
0: No precipitation, 1: Maximum precipitation
The rate of raindrop accumulation on the windows will depend on this variable.
coll_pos_x, coll_pos_y & coll_pos_z
Location of collision (metres, relative to vehicle origin) in the frame where the system trigger collision is triggered.
coll_energy
Collision "energy" (newton-metres‽) in the frame where the system trigger collision is triggered.
Weather_Temperature
Ambient temperature (℃) of the environment.
Weather_AbsHum
Absolute Humidity (gm-3) of the environment.
AutoClutch
Added in version 1.03.
0: Automatic Clutch setting disabled, 1: enabled.
wearlifespan
Added in version 2.00.
Not used, see the predefined local variable of the same name
SunAlt
Added in version 2.00.
Sun elevation (° above horizon).
Default sound cubes that emit bird sounds use this so the birds don't chirp at night.
See also: Envir_Brightness