Global functions accessed from every script.
Returns a handle to the current HUD system <CHUD>.
getHUD | the current HUD |
Returns a handle to the current network system <CNet>.
getNet | the network system |
Returns a handle to the current security levels system <CSecurity>.
getSecurity | the security levels system |
Returns a handle to the current camera <CCamera>.
getCamera | the current camera |
Returns a handle to the current controls system <CControls>.
getControls | the current HUD |
Returns a handle to the current graphics driver system with access to rendering and screen capabilities <Driver>.
getDriver | the graphics driver |
Return number of players.
s32 | player count |
Return index of player in players list.
s32 | player index |
Returns the amount of players not including ones that are in spectator team
s32 | player count that are not in spectator team |
Return the player with index of index.
s32 | index of player |
CPlayer@ | the player object |
See also:
Adds a bot player.
const string | name of bot |
CPlayer@ | the bots player object |
Adds a bot player with specified team and class. Note that this is just stored in the CPlayer class, logic for spawning should be provided in script.
const string | name of bot |
const u8 | team |
const u8 | class |
CPlayer@ | the bots player object |
Shakes the screen for some amount of time.
int | magnitude |
int | time (in ticks) |
Vec2f | position in world space |
See also:
<Vec2f>
Shakes the screen for some amount of time (legacy)
Vec2f | direction vector |
int | time (in ticks) |
Vec2f | position in world space |
See also:
<Vec2f>
Shakes the screen for some amount of time with constant magnitude within screen.
Vec2f | direction vector |
int | time (in ticks) |
Vec2f | position in world space |
See also:
<Vec2f>
Flashes the screen with a color and fades out. When a screen flash is already occuring, calling SetScreenFlash will override the effect. The alpha at any given time is basealpha * (1 - smoothstep(timesinceflashbegin / flashtime))
u8 | alpha at time 0 |
u8 | red |
u8 | green |
u8 | blue |
float | duration in seconds of the effect, i.e. after which the effect is completely gone. defaults to 0.75f seconds |
Register a script command to be executed from the console
const string &in | name of the command |
const string &in | the full function signature to use; cant accept parameters currently. |
const string &in | the script filename |
const string &in | a description of its usage to b e preinted with /list |
bool | if the registration was successful |
Register a script command to be executed from the console
const string &in | name of the command |
const string &in | the full function signature to use; cant accept parameters currently. |
const string &in | the script filename |
bool | if the registration was successful |
Adds a colored message to the chat box.
string | the message |
SColor | color |
See also:
<SColor>
Adds a message to the chat box.
string | the message |
See also:
<SColor>
Sends a message as the current player
string | the message |
int | the chat channel to send on (0=global, 1=team) |
Shows a message box with some information.
string | the message |
bool | whether all GUI is blocked when displaying this message |
Shows a message box with some information and an additional caption.
string | window caption |
string | the message |
bool | whether all GUI is blocked when displaying this message |
Returns the number of ticks (engine updates) during a second.
u32 | number of ticks |
Drops coins and syncs them to clients.
Vec2f | the position in world space coordinates |
int | amount of coins |
u32 | number of ticks |
Exits game and returns to main menu.
Returns the number of ticks since game start.
u32 | number of ticks |
Get the string translated to the local locale (according to g_locale and the locale files)
const string &in toBeTranslated | the string to translate |
string | the translated string; can be unchanged if no match is found. |