ACE3/addons/medical/functions/fnc_moduleAssignMedicRoles.sqf

29 lines
695 B
Plaintext
Raw Normal View History

2015-03-07 12:47:28 +00:00
/*
* Author: Glowbal
* Assign a medical role to a unit.
*
2015-03-07 12:47:28 +00:00
* Arguments:
* 0: The module logic <OBJECT>
* 1: Synchronized units <ARRAY>
* 2: Activated <BOOL>
2015-03-07 12:47:28 +00:00
*
* Return Value:
2015-08-22 14:25:10 +00:00
* None
2015-03-07 12:47:28 +00:00
*
* Example:
* [LOGIC, [bob, kevin], true] call ACE_medical_fnc_moduleAssignMedicRoles
*
2015-03-07 12:47:28 +00:00
* Public: No
*/
#include "script_component.hpp"
params ["_logic"];
if (!isNull _logic) then {
private _list = _logic getVariable ["EnableList", ""];
private _setting = _logic getVariable ["role", 0];
[_list, QGVAR(medicClass), _setting, true] call EFUNC(common,assignObjectsInList);
[synchronizedObjects _logic, QGVAR(medicClass), _setting, true] call EFUNC(common,assignObjectsInList);
};