2016-09-18 17:48:49 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* [Description]
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Argument Name <TYPE>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Return Name <TYPE>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* ["example"] call ace_[module]_fnc_[functionName]
|
|
|
|
*
|
|
|
|
* Public: [Yes/No]
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
2016-06-30 15:33:29 +00:00
|
|
|
|
2016-09-18 17:48:49 +00:00
|
|
|
params ["_unit", "_stateMachine"];
|
2016-06-30 15:33:29 +00:00
|
|
|
|
2016-09-18 17:48:49 +00:00
|
|
|
if (_unit in GVAR(monitoredUnitsList)) exitWith {}; // already monitored
|
2017-04-22 15:57:32 +00:00
|
|
|
private _defaultState = _stateMachine getVariable "cba_stateMachine_initialState"; // "Default"
|
2016-09-18 17:48:49 +00:00
|
|
|
if (!isNil "_defaultState") then {
|
|
|
|
systemChat format["Assigned default state to: %1. Total monitored: %2", _unit, GVAR(monitoredUnitsList)];
|
|
|
|
_unit setVariable[QGVAR(state), [-1, _defaultState]];
|
|
|
|
GVAR(monitoredUnitsList) pushBack _unit;
|
|
|
|
};
|