CBA_fnc_addPerFrameHandler

Description

Add a handler that will execute every frame, or every x number of seconds.

Parameters

_functionThe function you wish to execute.  <CODE>
_delayThe amount of time in seconds between executions, 0 for every frame.  (optional, default: 0) <NUMBER>
_argsParameters passed to the function executing.  This will be the same array every execution.  (optional) <ANY>

Passed Arguments

_this ARRAY 0: _args - Parameters passed by this function.  Same as ‘_args’ above.  <ANY> 1: _handle - A number representing the handle of the function.  Same as ‘_handle’ returned by this function.  <NUMBER>

Returns

_handleA number representing the handle of the function.  Use this to remove the handler.  <NUMBER>

Examples

_handle = [{player sideChat format ["every frame! _this: %1", _this];}, 0, ["some","params",1,2,3]] call CBA_fnc_addPerFrameHandler;

Author

Nou & Jaynus, donated from ACRE project code for use by the community; commy2

Array to read from [Array]
Close