CBA_fnc_addPerFrameHandler

Description

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

Parameters

_funcThe function you wish to execute
_delayThe amount of time in seconds (can be less than 0) between executions, 0 for everyframe.
_paramsParameters passed to the function executing.  This will be the same array every execution.

Returns

_handlea number representing the handle of the function.  Use this to remove the handler.

Examples

[{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.

Close