Skip to end of metadata
Go to start of metadata

LoadScript

Loads the script.

Syntax
Script.LoadScript(scriptName)
ParameterDescription
scriptNamename of the script to load

ReloadScripts

Reloads all the scripts.

Syntax
Script.ReloadScripts()

ReloadScript

Reload the script.

Syntax
Script.ReloadScript()

ReloadEntityScript

Reloads the specified entity script.

Syntax
Script.ReloadEntityScript( className )
ParameterDescription
classNameName of the entity script.

UnloadScript

Unloads the script.

Syntax
Script.UnloadScript()

DumpLoadedScripts

Dumps all the loaded scripts.

Syntax
Script.DumpLoadedScripts()

SetTimer

Set a general script timer, when timer expires will call back a specified lua function. Lua function will accept 1 or 2 parameters, if userData is specified luaFunction must be: <preformatted>LuaCallback = function( userData,nTimerId ) -- function body end;</preformatted> if userData is not specified luaFunction must be: <preformatted>LuaCallback = function( nTimerId ) -- function body end;</preformatted>

Syntax
Script.SetTimer( nMilliseconds, luaFunction [, userData [, bUpdateDuringPause]] )
Returns: ID assigned to this timer or nil if not specified.
ParameterDescription
nMillisecondsDelay of trigger in milliseconds.
luaFunction.
userData(optional) Any user defined table. If specified will be passed as a first argument of the callback function.
bUpdateDuringPause(optional) will be updated and trigger even if in pause mode.

SetTimerForFunction

Set a general script timer, when timer expires will call back a specified lua function. Lua function will accept 1 or 2 parameters, if userData is specified luaFunction must be: <preformatted>LuaCallback = function( userData,nTimerId ) -- function body end;</preformatted> if userData is not specified luaFunction must be: <preformatted>LuaCallback = function( nTimerId ) -- function body end;</preformatted> .

Syntax
Script.SetTimerForFunction( nMilliseconds, luaFunction [, userData [, bUpdateDuringPause]] )
Returns: ID assigned to this timer or nil if not specified.
ParameterDescription
nMillisecondsDelay of trigger in milliseconds.
luaFunction.
userData(optional) Any user defined table. If specified it will be passed as a first argument of the callback function.
bUpdateDuringPause(optional) will be updated and trigger even if in pause mode.

KillTimer

Stops a timer set by the Script.SetTimer function.

Syntax
Script.KillTimer( nTimerId )
ParameterDescription
nTimerIdID of the timer returned by the Script.SetTimer function.
  • No labels