Jump to content
Sign in to follow this  
macnova1

Mission At sea Units not spawning

Recommended Posts

Hi Guys here is my script for my oil rig mission, however my units do not spawn any help would be great, plus BIS_fnc_task_defend I can not get to work

 


_missionUnits = [


["O_Soldier_AA_F",[8647.78,25836.1,13.6213]],
["O_Soldier_TL_F",[8476.98,25885.7,33.3919]],
["O_Soldier_AA_F",[8705.49,26029.6,33.1847]],
["O_Soldier_AA_F",[8680.55,26017.5,69.7901]],
["O_Soldier_AA_F",[8659.85,26021.3,55.4151]],
["O_Soldier_AA_F",[8639.32,26022.6,59.3722]],
["O_Soldier_AA_F",[8595.7,26037.1,55.4733]],
["O_Soldier_AA_F",[8658.13,25935.9,55.3722]],
["O_Soldier_AA_F",[8599.45,25957.4,55.363]],
["O_Soldier_AA_F",[8601.74,25906,55.3731]],
["O_Soldier_AA_F",[8580.85,25913.1,55.3689]],
["O_Soldier_AA_F",[8632.35,25889.1,73.2636]],
["O_Soldier_AA_F",[8645.59,25860.1,55.3624]],
["O_Soldier_AA_F",[8581.4,25880.8,55.354]],
["O_Soldier_AA_F",[8498.83,25908,58.4823]],
["O_Soldier_AA_F",[8504.11,25922.7,55.3612]],
["O_Soldier_AA_F",[8510.81,25978.8,111.297]]

];

_group1 = createGroup EAST;
_group1 setCombatMode "RED";


{

     _unit = _group1 createUnit [(_x select 0),(_x select 1),[],0,"NONE"];
     _unit setPosWorld getPosWorld _unitj;
     _unit setPosASL [getPosASL _x select 0, (getPosASL _x select 1) + 100, getPosASL _x select 2];
        _unit allowFleeing 0;
    
    if ("ToolKit" in items _unit) then {
        _unit removeItems "ToolKit";
    };
        
    if ("Exile_Item_Knife" in magazines _unit) then {
        _unit removeMagazines "Exile_Item_Knife";
    };
        
    if ("Medikit" in items _unit) then {
        _unit removeItems "Medikit";
    };
    
    _x addMPEventHandler 
        ["MPKilled",
            {

                private ["_killer","_currentRespect","_amountEarned","_newRespect","_killSummary","_newKillerFrags"];

                _killed = _this select 0;
                _killer = _this select 2;

                _killingPlayer = _killer call ExileServer_util_getFragKiller;

                Event_ALLAI_SimulatedUnits = Event_ALLAI_SimulatedUnits - [_killed]; 

                _currentRespect = _killingPlayer getVariable ["ExileScore", 0];
                _amountEarned = 600;
                _newRespect = _currentRespect + _amountEarned;

                _killingPlayer setVariable ["ExileScore", _newRespect];
                _killSummary = [];
                _killSummary pushBack ["TANGO DOWN", _amountEarned];
                [_killingPlayer, "showFragRequest", [_killSummary]] call ExileServer_system_network_send_to;
                
                _newKillerFrags = _killingPlayer getVariable ["ExileKills", 0];
                _newKillerFrags = _newKillerFrags + 1;
                _killingPlayer setVariable ["ExileKills", _newKillerFrags];
                format["addAccountKill:%1", getPlayerUID _killingPlayer] call ExileServer_system_database_query_fireAndForget;

                format["setAccountScore:%1:%2", _newRespect, getPlayerUID _killingPlayer] call ExileServer_system_database_query_fireAndForget;
                _killingPlayer call ExileServer_object_player_sendStatsUpdate;

            }
        ];
} forEach _missionUnits;
    [_group1, _unit] call BIS_fnc_taskDefend;

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×