ACE3/addons/common/functions/fnc_waitAndExecute.sqf

25 lines
581 B
Plaintext
Raw Normal View History

2015-01-17 05:58:24 +00:00
/*
2015-03-24 04:18:00 +00:00
* Author: esteldunedain
2015-01-17 05:58:24 +00:00
*
* Executes a code once with a given game ACE_time delay, using a PFH
2015-01-17 05:58:24 +00:00
*
* Argument:
* 0: Code to execute (Code)
2015-01-17 05:58:24 +00:00
* 1: Parameters to run the code with (Array)
* 2: Delay in seconds before executing the code (Number)
*
* Return value:
* None
*
* Example:
* [{(_this select 0) setVelocity [0,0,200];}, [player], 10] call ace_common_fnc_waitAndExecute
*
* Public: No
2015-01-17 05:58:24 +00:00
*/
#include "script_component.hpp"
PARAMS_3(_func,_params,_delay);
2015-01-17 05:58:24 +00:00
GVAR(waitAndExecArray) pushBack [(ACE_time + _delay), _func, _params];
GVAR(waitAndExecArray) sort true;