Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _objAmount = [_this, 0, 1, [0]] call BIS_fnc_Param;
- _objType = [_this, 1, "and", [""]] call BIS_fnc_Param; //"or" and "and"
- hint format["%1 for %2 obj's", _objType,_objAmount];
- //convert objective type to lowercase to compare
- if(tolower(_objType) == "or") then {
- [] spawn { while {!ASORET_objComplete } do {
- _complete = false;
- for[{_i = 0}, {_i < _objAmount}, {_i = _i + 1}] do {
- //it's already marked as complete, or this objective is complete
- _complete = _complete || (missionNamespace getVariable [format["ASORET_obj%1", (_i+1)], false]);
- };
- ASORET_objComplete = _complete;
- hint format["Loop Complete OBJ %1",_complete];
- sleep 20;
- };
- } else {
- [] spawn { while {!ASORET_objComplete } do {
- _complete = true;
- for[{_i = 0}, {_i < _objAmount}, {_i = _i + 1}] do {
- //it's already marked as complete and this objective is complete
- _complete = _complete && (missionNamespace getVariable [format["ASORET_obj%1", (_i+1)], false]);
- };
- ASORET_objComplete = _complete;
- hint format["Loop Complete OBJ %1",_complete];
- sleep 20;
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement