ACE3/addons/medical/functions/fnc_handleInit.sqf

28 lines
548 B
Plaintext
Raw Normal View History

/*
* Author: KoffeinFlummi
* Called when a unit is initialized via XEH_init
*
* Arguments:
* 0: The Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob] call ACE_medical_fnc_handleInit
*
* Public: No
*/
2015-02-06 12:47:17 +00:00
#include "script_component.hpp"
2015-08-22 14:26:53 +00:00
params ["_unit"];
2015-02-06 12:47:17 +00:00
_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}];
2015-04-19 15:28:47 +00:00
if (local _unit) then {
2015-09-05 10:50:32 +00:00
if (!EGVAR(common,settingsInitFinished)) exitWith {
EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(init), [_unit]];
};
[_unit] call FUNC(init);
2015-04-19 15:28:47 +00:00
};