Using objective capture status for triggering events

  1. ‹ Older
  2. 5 years ago
    Edited 5 years ago by marceldev89

    I can't think of anything quick to do that. It's fairly complicated because you can't really say something like "I want to keep track of this specific objective", it's more something like "I want to keep of an objective that's closest to this position" kind of thing.

    There is one thing I can think of and that is using the custom objective module and setting a (unique) name in the "Variable Name" field of the module. For example, you place down 3 custom objectives and name them custom_objective_1, custom_objective_2 and custom_objective_3. You should now theoretically be able to replace

    } forEach ([_opcom, "objectives"] call ALIVE_fnc_OPCOM);

    with

    } [custom_objective_1, custom_objective_2, custom_objective_3];

    and it'll only check those 3 custom objectives. I've got no clue if this works or not but that's the only thing I can come up with at the moment.

    EDIT: Hmm, I don't think that's going to work.

  3. First, sorry for being a necromancer.

    If I followed this thread correctly, the final product would look like this?

    if (isServer) then {
        [] spawn {
    waitUntil {!(isNil "ALIVE_REQUIRE_INITIALISED")};
            while {true} do {
                {
                    private _opcom = _x;
                    private _opcomSide = [_opcom, "side"] call ALIVE_fnc_hashGet;
    
                    if (_opcomSide == "WEST") then {
                        private _allObjectivesReserved = true;
    
                        {
                            private _objective = _x;
                            private _objectiveState = [_objective, "tacom_state", "none"] call ALIVE_fnc_hashGet;
    
                            if (_objectiveState != "reserve") exitWith {
                                _allObjectivesReserved = false;
                            };
                        } forEach ([_opcom, "objectives"] call ALIVE_fnc_hashGet);
    
                        if (_allObjectivesReserved) then {
                            "end1" call BIS_fnc_endMissionServer;
                        };
                    };
                } forEach OPCOM_INSTANCES;
    
                sleep 60;
            };
        };
    };
  4. At a quick glance (on mobile), your solution appears correct.

  5. 4 years ago

    Anyone have the working on a mission I can look at?

 

or Sign Up to reply!