Generating objective tasks via script

  1. 8 years ago
    Edited 8 years ago by johnalive

    I am interested in creating a coop mission similar to Domination or Invade & Annex using ALiVE, and am trying to think of a way to set up a task for each objective on the map. So far I have set up a scenario where OPFOR occupies all the civillian & military areas in CUP Chernarus (minus the BLUFOR base), and would like to use the new enhanced task system to create tasks at each of the objectives. Is this something I can accomplish via scripting and functions in the ALiVE API (iterating through all objectives and creating triggers/tasks) or do I need to place these individually on the map?

  2. I agree. Something like this would be great! Especially if it could replace the Wasteland missions that spawn. Something where a couple Globally available missions spawn. A main and a Side and the faction that completes it gets resources or something. It would pop up as an available task.

  3. I've been looking around for a scripting function to grab an array of all the military/civillian objectives on the map and came across ALIVE_fnc_OPCOMpositions. The documentation gives this example:

    _objectivesPositions = ["BLU_F","idle"] call ALIVE_fnc_OPCOMpositions;

    When I tried this (with each of the factions I'm using), it just returned an empty array. I'm not sure what the "idle" argument means (docs say it is a string representing state, but provides no other examples), or if this is even the right function to be using. Any ideas?

  4. Edited 8 years ago by SpyderBlack723

    I prefer just doing this

    _objectives = [];
    {
    	_objectives pushBack ([_x,"objectives"] call ALiVE_fnc_hashGet);
    } forEach OPCOM_instances;

    Note that if two opcoms are aware of the same objective, that objective position will be registered twice in the array (one for each commander)

    If you need to grab objectives of just one opcom (by faction)(cleanest), you can do this

    private ["_objectives"];
    {
    	if ("BLU_F" in ([_x,"factions"] call ALiVE_fnc_hashGet) then {
    		_objectives = ([_x,"objectives"] call ALiVE_fnc_hashGet);
    	};
    } forEach OPCOM_instances;
 

or Sign Up to reply!