Some variables are predefined and handled and/or updated by the game-engine itself.
|short||GameYear||The current year|
|short||GameMonth||The current month (0-11)|
|short*||GameDay||The current day of the month (0-30) depending on month|
|short*||GameHour||The current hour (0-23 hours)|
|short||TimeScale||Minutes that pass in-game within one minute of real-life|
|float||GameDaysPassed||Days that have passed since the beginning of the game. In New Vegas, its initial value is 5 (since the game starts on a Friday).|
- While GameHour and GameDay are defined as short, they return float values. For instance, at 2:30 AM, GameHour has the value 2.5.
- Remember that an hour is about 0.041667 (1/24) of a day. So using GameDaysPassed for anything other than day tracking may get awkward.
- If all you want to know is if it is a new day (strictly meaning that the 12:00am boundary has been crossed), save the current GameDaysPassed into a SHORT variable (lastDay) and then when you want to do your comparison, create a SHORT (currentDay) and set it to the current GameDaysPassed. If (currentDay - lastDay) >= 1, then a day has passed. By storing GameDaysPassed in SHORT variables you trim off the factional hours that live in the decimal places. If you use floats instead of SHORTs you will essentially be checking if "24 hours has passed" rather than, "is it the next day."
- GameDaysPassed can be inaccurate; GetGameDaysPassed should be used instead. Note that this may require some different syntax, like storing the result of GetGameDaysPassed first before evaluation a condition, since GetGameDaysPassed is a function.
There are also local variables with special functions:
|Quest||float||fQuestDelayTime||Determines how long (in real-time seconds) the game will wait between two runs of a quest script. The default value is 5 seconds. This value will also be used when fQuestDelayTime is defined but set to 0.|
|Object(Trap)||float||fTrapDamage||Amount of damage to do each time the trap affects an actor.|
|Object(Trap)||float||fTrapPushBack||Amount of push back force to apply each time a trap effects an actor. This should range from 0 to 1000.|
|Object(Trap)||float||fTrapMinVelocity||Minimum velocity a trap must be moving at relative to the actor to do damage (combination of actor and traps respective velocities). This value is in BSUnits (128 = 6ft).|
|Object(Trap)||float||bTrapContinuous||0 = Only deal damage on first contact with trap.
1 = Continously subtract damage as long as actor is in contact with trap.