Meteor Scripting Functions
System
void passToConsole(string text)
Run console command.
passToConsole("god");
passToConsole("giveitem all");
bool isGamePaused()
Check whether the game is paused.
if (isGamePaused())
{
print("The game is paused!");
}
bool gameHasFocus()
Check whether the game is focused.
if (gameHasFocus())
{
print("The game has focus");
}
else
{
print("The game does not have focus");
}
Game has focus if no menus or dialogs are open and the game is not paused.
bool playerHasControl()
Check whether the player currently has control.
if (playerHasControl())
{
print("Player has control");
}
else
{
print("Player does not have control");
}
Player has control if the screen is not fading and is not showing cinematic movie bars.
float getElapsedTime()
Gets the time, in seconds, since the mission started.
print("It has been " + getElapsedTime() + " seconds since the mission started.");
void saveGameVar(string varName, variant value)
Sasve a game variable to a saved game file.
Only works within onGameSave() event.
Supported types are int, float, bool, string and vector2.
variant loadGameVar(string varName, variant defaultValue)
Load a game variable from a saved game file.
Only works within onGameLoad() event.
defaultValue is optional. If not specfied then numbers are 0 and bool is false etc.
Index
Generated on the 15 May 2024 at 09:00:40 (UK Time)