Utility Script
Revision as of 12:54, 3 December 2015 by imported>Plplecuyer (→Definition)
Collection of generic utility global functions
Definition
ScriptName Utility Native Hidden
Properties
None
Global Functions
- Var Function CallGlobalFunction(string asScriptName, string asFuncName, Var[] aParams)
- Call a global function synchronously without depending on the script containing the function.
- Function CallGlobalFunctionNoWait(string asScriptName, string asFuncName, Var[] aParams)
- Call a global function asynchronously without depending on the script containing the function.
- string Function GameTimeToString(float afGameTime)
- Converts a float game time (in terms of game days passed) to a string detailing the date and time it represents.
- float Function GetCurrentGameTime()
- Obtains the current game time in terms of game days passed (the same as the global variable of a similar name)
- float Function GetCurrentRealTime()
- Obtains the number of real-world seconds that have passed since the game has launched (ignoring time alt-tabbed away, or other cases where the game might be frozen)
- int Function GetCurrentStackID()
- Obtains the ID number of the stack this function was called on.
- bool Function IsInMenuMode()
- Returns whether the game is currently in "menu mode" or not.
- float Function RandomFloat(float afMin, float afMax)
- Generates a random float between the minimum and maximum (inclusive)
- int Function RandomInt(int aiMin, int aiMax)
- Generates a random integer between the minimum and maximum (inclusive)
- Function SetINIBool(string ini, bool value)
- Sets a pre-existing bool ini value
- Function SetINIFloat(string ini, float value)
- Sets a pre-existing float ini value
- Function SetINIInt(string ini, int value)
- Sets a pre-existing int ini value
- Function SetINIString(string ini, string value)
- Sets a pre-existing string ini value
- Function Wait(float afSeconds)
- Pauses the script for at least the specified time (latent). Does not count time spent in a menu.
- Function WaitGameTime(float afHours)
- Pauses the script for at least the specified amount of game time (latent).
- Function WaitMenuMode(float afSeconds)
- Pauses the script for at least the specified time (latent). Does count time spent in a menu.
Member Functions
None
Events
None