Using the above, I believe this would work
_fnc_getOpcomByFaction = {
private ["_opcom"];
_faction = _this;
{
if (_faction in ([_x,"factions"] call ALiVE_fnc_hashGet)) exitWith {
_opcom = _x;
};
} forEach OPCOM_instances;
_opcom
};
//-- Get opcom FSM
_opcom = _faction call _fnc_getOpcomByFaction;
_opcomFSM = [_opcom, "OPCOM_FSM"] call ALiVE_fnc_HashGet;
_tacomFSM = [_opcom, "TACOM_FSM"] call ALiVE_fnc_HashGet;
/////-- Loop this section --/////
//-- Wait until analysis started
waitUntil {sleep 2;!isNil(_opcomFSM getFSMVariable "_analyze")};
//-- During analysis
//-- Analysis complete
waitUntil {sleep 1;(_opcomFSM getFSMVariable "_OPCOM_status") == "reset"};
//-- Post analysis
/////-- Loop this section --/////