Turok EX Modding Guide

Scripts kSys

provides system functions not directly related to gameplay

stored in global var Sys

Methods

void Print( kStr& s )

void Warning( kStr& s )

output to the console and stdout.txt

warnings appear in yellow in the console

bool GetCvarValue( kStr& var, kStr& val )

get the console variable named var, store the result in val, and return whether the variable was found

e.g.,

kStr crosshair;
if ( Sys.GetCvarValue("g_showcrosshair",crosshair) && crosshair.Atoi() == 0 )
	Sys.Warning( "player cannot aim" );

int VideoWidth()

int VideoHeight()

display dimensions

int Mouse_X()

int Mouse_Y()

horizontal and vertical mouse coordinates, respectively

(0,0) is in the top-left corner, and the coordinates are limited to the display region