Warhorse ScripBind documentation
ContentsIndexHome
PreviousUpNext
CScriptBindScript::SetTimer Method
Syntax
C++
int SetTimer(IFunctionHandler * pH, int nMilliseconds, HSCRIPTFUNCTION hFunc);
Parameters 
Description 
int nMilliseconds 
Delay 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. 

ID assigned to this timer or nil if not specified.

!

Script.SetTimer( nMilliseconds, luaFunction [, userData [, bUpdateDuringPause]] )

! ! 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: !

LuaCallback = function( userData,nTimerId ) ! -- function body ! end;

! if userData is not specified luaFunction must be: !

LuaCallback = function( nTimerId ) ! -- function body ! end;

! !  

!  

!  

!  

!  

 

Copyright (c) 2012. All rights reserved.