Sign in to follow this  
Followers 0
[AI] Stalker

dms HOW DO I MANUALLY SET AI SPAWN LOCATIONS?

18 posts in this topic

Ok so i have the object code below.
 

Spoiler

[
    ["Land_ConcreteWall_01_m_gate_F",[51.9749,3.32715,0],270.254,
    ["Land_ConcreteWall_01_m_8m_F",[40.2437,32.3628,0],0.753531,
    ["Land_ConcreteWall_01_m_8m_F",[48.2375,32.2383,0],0.753531,
    ["Land_ConcreteWall_01_m_8m_F",[24.1535,32.3521,0],359.594,
    ["Land_ConcreteWall_01_m_8m_F",[32.1483,32.3892,0],359.594,
    ["Land_ConcreteWall_01_m_8m_F",[39.7928,-31.4841,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[47.7876,-31.4495,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[31.7936,-31.5403,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[23.7988,-31.575,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[52.0768,20.1594,0],90.1478,
    ["Land_ConcreteWall_01_m_8m_F",[52.1168,28.1543,0],90.1478,
    ["Land_ConcreteWall_01_m_8m_F",[52.0767,12.0107,0],90.1478,
    ["Land_ConcreteWall_01_m_8m_F",[52.0988,-13.8401,0],90.1478,
    ["Land_ConcreteWall_01_m_8m_F",[52.1387,-5.84521,0],90.1478,
    ["Land_ConcreteWall_01_m_8m_F",[52.0986,-21.9888,0],90.1478,
    ["Land_ConcreteWall_01_m_8m_F",[52.0625,-27.5752,0],90.1478,
    ["Land_Offices_01_V1_F",[-22.2819,3.15869,0],90.1539,
    ["Land_i_House_Small_03_V1_F",[24.9657,21.6614,0],180.62,
    ["Land_i_House_Small_03_V1_F",[41.4778,21.7,0],181.083,
    ["Land_i_House_Small_03_V1_F",[25.3712,-21.4236,0],358.442,
    ["Land_i_House_Small_03_V1_F",[41.8783,-21.0125,0],359.753,
    ["Land_ConcreteWall_01_m_8m_F",[7.75824,-31.667,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[-0.241028,-31.7231,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[-8.23578,-31.7578,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[15.753,-31.6323,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[8.06757,32.3359,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[0.0682983,32.2798,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[16.0623,32.3706,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[-24.1169,32.1704,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[-32.1162,32.1143,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[-40.111,32.0796,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[-16.1222,32.2051,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[-64.4698,32.1738,0],269.416,
    ["Land_ConcreteWall_01_m_8m_F",[-44.1871,12.3284,0],269.416,
    ["Land_ConcreteWall_01_m_8m_F",[-44.1251,4.33374,0],269.416,
    ["Land_ConcreteWall_01_m_8m_F",[-44.3328,28.322,0],269.416,
    ["Land_ConcreteWall_01_m_8m_F",[-44.1669,-11.7983,0],269.981,
    ["Land_ConcreteWall_01_m_8m_F",[-44.1621,-19.7979,0],269.981,
    ["Land_ConcreteWall_01_m_8m_F",[-44.1788,-27.7927,0],269.981,
    ["Land_ConcreteWall_01_m_8m_F",[-44.1503,-3.80347,0],269.981,
    ["Land_ConcreteWall_01_m_8m_F",[-24.2582,-31.7068,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[-32.2574,-31.7629,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[-40.2522,-31.7976,0],359.613,
    ["Land_ConcreteWall_01_m_8m_F",[-16.2634,-31.6721,0],359.613,
    ["Land_ConcreteWall_01_m_gate_F",[15.3412,-2.50781,0],90.14,
    ["Land_ConcreteWall_01_m_8m_F",[15.2729,-19.3406,0],270.034,
    ["Land_ConcreteWall_01_m_8m_F",[15.2489,-27.3352,0],270.034,
    ["Land_ConcreteWall_01_m_8m_F",[15.2568,-11.1917,0],270.034,
    ["Land_ConcreteWall_01_m_8m_F",[15.1832,14.6592,0],270.034,
    ["Land_ConcreteWall_01_m_8m_F",[15.1592,6.66406,0],270.034,
    ["Land_ConcreteWall_01_m_8m_F",[15.1671,22.8076,0],270.034,
    ["Land_ConcreteWall_01_m_8m_F",[15.1921,28.3943,0],270.034,
    ["Land_Airport_Tower_F",[9.57007,-22.2322,0],0,
    ["Land_Airport_Tower_F",[9.25458,22.2712,0],179.813,
    ["Land_CampingChair_V2_F",[12.6758,1.68872,0],89.3145,
    ["Land_CampingChair_V2_F",[12.7008,2.74463,0],89.3145,
    ["Land_CampingChair_V2_F",[12.6852,3.72754,0],89.3145,
    ["Land_CampingChair_V2_F",[10.9216,3.73071,0],270.282,
    ["Land_CampingChair_V2_F",[10.8906,2.80005,0],270.282,
    ["Land_CampingChair_V2_F",[10.9084,1.76392,0],270.282,
    ["Land_CampingTable_F",[11.6253,3.28833,0],269.856,
    ["Land_CampingTable_F",[11.6553,1.32642,0],269.856,
    ["Land_CampingChair_V2_F",[12.6711,0.799072,0],89.3145,
    ["Land_CampingChair_V2_F",[10.9609,0.823975,0],270.282,
    ["Land_PartyTent_01_F",[9.18036,3.41772,0],0,
    ["Land_CampingChair_V2_F",[7.70038,1.60449,0],89.3145,
    ["Land_CampingChair_V2_F",[7.7254,2.6604,0],89.3145,
    ["Land_CampingChair_V2_F",[7.70984,3.64331,0],89.3145,
    ["Land_CampingChair_V2_F",[5.94623,3.64648,0],270.282,
    ["Land_CampingChair_V2_F",[5.91522,2.71582,0],270.282,
    ["Land_CampingChair_V2_F",[5.93298,1.67969,0],270.282,
    ["Land_CampingTable_F",[6.6499,3.2041,0],269.856,
    ["Land_CampingTable_F",[6.67987,1.24219,0],269.856,
    ["Land_CampingChair_V2_F",[7.69568,0.714844,0],89.3145,
    ["Land_CampingChair_V2_F",[5.98547,0.739746,0],270.282,
    ["B_CargoNet_01_ammo_F",[-9.86401,-22.3765,0],0,
    ["B_CargoNet_01_ammo_F",[-7.82843,-22.3047,0],0,
    ["B_CargoNet_01_ammo_F",[-9.75903,-24.9392,0],0,
    ["B_CargoNet_01_ammo_F",[-7.89685,-24.8503,0],0,
    ["I_CargoNet_01_ammo_F",[-5.52869,-24.6011,0],0,
    ["I_CargoNet_01_ammo_F",[-5.5321,-22.5774,0],0,
    ["I_CargoNet_01_ammo_F",[-2.94409,-24.6614,0],0,
    ["I_CargoNet_01_ammo_F",[-2.92609,-22.5964,0],0,
    ["Land_PartyTent_01_F",[-6.39929,-24.8889,0],0,
    ["Land_CampingChair_V2_F",[11.8426,7.24634,0],359.514,
    ["Land_CampingChair_V2_F",[9.79456,5.49951,0],180.481,
    ["Land_CampingChair_V2_F",[10.7251,5.46509,0],180.481,
    ["Land_CampingChair_V2_F",[11.7613,5.47925,0],180.481,
    ["Land_CampingTable_F",[10.2394,6.20166,0],180.055,
    ["Land_CampingTable_F",[12.2014,6.22461,0],180.055,
    ["Land_CampingChair_V2_F",[12.7322,7.23877,0],359.514,
    ["Land_CampingChair_V2_F",[12.7014,5.52856,0],180.481,
    ["Land_CampingChair_V2_F",[9.80383,7.26294,0],359.514,
    ["Land_CampingChair_V2_F",[10.7868,7.27515,0],359.514,
    ["Land_CampingChair_V2_F",[6.77252,7.14844,0],359.416,
    ["Land_CampingChair_V2_F",[4.72742,5.39795,0],180.384,
    ["Land_CampingChair_V2_F",[5.65802,5.36523,0],180.384,
    ["Land_CampingChair_V2_F",[6.69421,5.3811,0],180.384,
    ["Land_CampingTable_F",[5.17108,6.10083,0],179.958,
    ["Land_CampingTable_F",[7.13306,6.1272,0],179.958,
    ["Land_CampingChair_V2_F",[7.66217,7.14209,0],359.416,
    ["Land_CampingChair_V2_F",[7.63422,5.43188,0],180.384,
    ["Land_CampingChair_V2_F",[4.73376,7.16138,0],359.416,
    ["Land_CampingChair_V2_F",[5.71667,7.17529,0],359.416,
    ["Land_Airport_Tower_F",[-35.3823,-23.1689,0],179.647,
    ["Land_Airport_Tower_F",[-36.3453,22.6633,0],357.601,
    ["Exile_Construction_ConcreteWall_Static",[-40.7511,-30.8325,0],0,
    ["Exile_Construction_ConcreteWall_Static",[-34.8011,-30.8857,0],0,
    ["Exile_Construction_ConcreteWall_Static",[-28.796,-30.9224,0],0,
    ["Exile_Construction_ConcreteWall_Static",[-22.8421,-30.8657,0],0,
    ["Exile_Construction_ConcreteWall_Static",[-16.8456,-30.8203,0],0,
    ["Exile_Construction_ConcreteWall_Static",[-10.8917,-30.7637,0],0,
    ["Exile_Construction_ConcreteWall_Static",[-4.88666,-30.8003,0],0,
    ["Exile_Construction_ConcreteWall_Static",[1.06726,-30.7437,0],0,
    ["Exile_Construction_ConcreteWall_Static",[7.0874,-30.6858,0],0,
    ["Exile_Construction_ConcreteWall_Static",[13.0413,-30.6292,0],0,
    ["Exile_Construction_ConcreteWall_Static",[-43.6147,-27.9236,0],269.826,
    ["Exile_Construction_ConcreteWall_Static",[-43.502,-24.8049,0],269.826,
    ["Exile_Construction_ConcreteWall_Static",[-43.5767,-18.8511,0],269.826,
    ["Exile_Construction_ConcreteWall_Static",[-43.6404,-12.855,0],269.826,
    ["Exile_Construction_ConcreteWall_Static",[-43.7151,-6.90112,0],269.826,
    ["Exile_Construction_ConcreteWall_Static",[-43.6968,-0.895996,0],269.826,
    ["Exile_Construction_ConcreteWall_Static",[-43.7715,5.05762,0],269.826,
    ["Exile_Construction_ConcreteWall_Static",[-43.8477,11.0776,0],269.826,
    ["Exile_Construction_ConcreteWall_Static",[-43.9225,17.0315,0],269.826,
    ["Exile_Construction_ConcreteWall_Static",[-43.9041,23.0366,0],269.826,
    ["Exile_Construction_ConcreteWall_Static",[-43.9789,28.9902,0],269.826,
    ["Exile_Construction_ConcreteWall_Static",[-40.9509,31.6702,0],0,
    ["Exile_Construction_ConcreteWall_Static",[-34.9969,31.7268,0],0,
    ["Exile_Construction_ConcreteWall_Static",[-28.9919,31.6902,0],0,
    ["Exile_Construction_ConcreteWall_Static",[-23.038,31.7468,0],0,
    ["Exile_Construction_ConcreteWall_Static",[-17.0415,31.7922,0],0,
    ["Exile_Construction_ConcreteWall_Static",[0.871399,31.8689,0],0,
    ["Exile_Construction_ConcreteWall_Static",[6.89154,31.9268,0],0,
    ["Exile_Construction_ConcreteWall_Static",[12.8455,31.9834,0],0,
    ["Exile_Construction_ConcreteGate_Static",[1.8866,-4.26367,0],269.673,
    ["Exile_Construction_ConcreteWall_Static",[-4.99347,31.8579,0],0,
    ["Exile_Construction_ConcreteWall_Static",[-11.0953,31.9063,0],0,
    ["Land_ConcreteWall_01_m_8m_F",[-8.00452,32.2273,0],359.613,
    ["Exile_Construction_ConcreteWall_Static",[-1.37152,-1.3916,0],0,
    ["Exile_Construction_ConcreteWall_Static",[2.1452,-10.186,0],267.711,
    ["Exile_Construction_ConcreteWall_Static",[2.34247,-15.9438,0],267.711,
    ["Exile_Construction_ConcreteWall_Static",[2.69464,-27.7778,0],267.711,
    ["Exile_Construction_ConcreteWall_Static",[2.49738,-22.02,0],267.711,
    ["Exile_Construction_ConcreteWall_Static",[-4.22156,7.30078,0],90.2937,
    ["Exile_Construction_ConcreteWall_Static",[-4.284,1.54004,0],90.2937,
    ["Exile_Construction_ConcreteWall_Static",[-4.26758,12.8352,0],268.414,
    ["Exile_Construction_ConcreteWall_Static",[-4.39417,18.595,0],268.414,
    ["Exile_Construction_ConcreteWall_Static",[-4.59253,30.2117,0],268.414,
    ["Exile_Construction_ConcreteGate_Static",[-4.46344,24.293,0],269.673,
    ["Exile_Construction_StorageCrate_Preview",[-29.4159,15.1768,-0.915],0,
    ["Exile_Construction_StorageCrate_Preview",[-29.304,-12.8799,-0.915001],0,
    ["Exile_Construction_StorageCrate_Preview",[-16.2277,2.8479,-0.914999],0,
    ["Exile_Construction_StorageCrate_Preview",[-15.6945,1.79712,-4.815],0,
    ["Exile_Construction_StorageCrate_Preview",[-25.7365,10.2229,-4.81454],0,
    ["Exile_Construction_StorageCrate_Preview",[-16.0661,2.125,-8.80006],0,
    ["Exile_Construction_StorageCrate_Preview",[-16.7903,9.79565,-8.80237],0,
    ["Exile_Construction_StorageCrate_Preview",[-15.5912,9.95557,-12.6383],0,
    ["Exile_Construction_StorageCrate_Preview",[-21.2946,15.2544,-12.6397],0,
    ["Exile_Construction_StorageCrate_Preview",[-25.6059,10.2358,-12.6397],0,
    ["Exile_Construction_StorageCrate_Preview",[-13.9198,-4.70605,-17.8518],0,
    ["Exile_Construction_StorageCrate_Preview",[-15.7793,14.7959,-17.8518],0,
    ["Exile_Construction_StorageCrate_Preview",[-21.9688,-9.02148,-17.8518],0,
    ["Exile_Construction_StorageCrate_Preview",[10.5199,17.5959,-12.9193],0,
    ["Exile_Construction_StorageCrate_Preview",[10.1481,21.2866,-9.22237],0,
    ["Exile_Construction_StorageCrate_Preview",[10.3632,-22.2419,-9.22236],0,
    ["Exile_Construction_StorageCrate_Preview",[9.88153,-16.9192,-12.9193],0,
    ["Exile_Construction_StorageCrate_Preview",[8.98364,3.05786,0],0,
    ["Exile_Construction_StorageCrate_Preview",[14.325,-7.95215,0],0,
    ["Exile_Construction_StorageCrate_Preview",[28.84,-21.1567,-0.32],0,
    ["Exile_Construction_StorageCrate_Preview",[25.5318,-18.7085,-0.32],0,
    ["Exile_Construction_StorageCrate_Preview",[22.1886,-20.729,-0.32],0,
    ["Exile_Construction_StorageCrate_Preview",[21.242,-17.905,-0.32],0,
    ["Exile_Construction_StorageCrate_Preview",[37.8242,-19.4211,-0.32],0,
    ["Exile_Construction_StorageCrate_Preview",[42.502,-18.73,-0.32],0,
    ["Exile_Construction_StorageCrate_Preview",[46.6611,-16.6924,-0.32],0,
    ["Exile_Construction_StorageCrate_Preview",[44.3416,19.5442,-0.32],0,
    ["Exile_Construction_StorageCrate_Preview",[40.6765,20.0493,-0.32],0,
    ["Exile_Construction_StorageCrate_Preview",[38.6992,26.98,-0.32],0,
];

 

And i wish to use the  Exile_Construction_StorageCrate_Preview  positions as the spawn in spots for the AI before they are allocated automatically.
basically i have used the storage crates as PLACE HOLDERS to get pos.

can anyone provide me with an example using the following SQF format please
 

Spoiler

/*
    New custom DMS mission sqf "AINC DEPOT"
    This mission was created by AINC Clan founder STALKER.
    based on work by Defent and eraser1 and CiC]red_ned
    
    This file does not contain any static machine gun emplacements and they will
    be added in the future.
    
    The vehicle POS for the AI patrol and the LOOT vehicle have not been tested at this stage.
    
    The loot box has not been tested since last edit.
    
    Everything here is as outlined above , an edit of work done by Defent , Eraser1 and red_ned.
    
    Please note the area of the mission is rather large - and the AI count is set high.
    This mission was created to be challenging and was crafted with AINC EXILE  dms config in mind
    To AINC's  custom class's and loadouts.  
    
    This mission may be harder or easier depending on your own DMS config settings.
*/

private ["_num", "_side", "_pos", "_OK", "_difficulty", "_AICount", "_group", "_type", "_launcher", "_staticGuns", "_crate1", "_vehicle", "_pinCode", "_class", "_veh", "_crate_loot_values1", "_missionAIUnits", "_missionObjs", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_markers", "_time", "_added", "_cleanup", "_baseObjs", "_crate_weapons", "_crate_weapon_list", "_crate_items", "_crate_item_list", "_crate_backpacks", "_PossibleDifficulty"];

// For logging purposes
_num = DMS_MissionCount;


// Set mission side (only "bandit" is supported for now)
_side = "bandit";


// This part is unnecessary, but exists just as an example to format the parameters for "DMS_fnc_MissionParams" if you want to explicitly define the calling parameters for DMS_fnc_FindSafePos.
// It also allows anybody to modify the default calling parameters easily.
if ((isNil "_this") || {_this isEqualTo [] || {!(_this isEqualType [])}}) then
{
    _this =
    [
        [10,DMS_WaterNearBlacklist,DMS_MinSurfaceNormal,DMS_SpawnZoneNearBlacklist,DMS_TraderZoneNearBlacklist,DMS_MissionNearBlacklist,DMS_PlayerNearBlacklist,DMS_TerritoryNearBlacklist,DMS_ThrottleBlacklists],
        [
            []
        ],
        _this
    ];
};

// Check calling parameters for manually defined mission position.
// You can define "_extraParams" to specify the vehicle classname to spawn, either as _vehClass or [_vehClass]
_OK = (_this call DMS_fnc_MissionParams) params
[
    ["_pos",[],[[]],[3],[],[],[]],
    ["_extraParams",[]]
];

if !(_OK) exitWith
{
    diag_log format ["DMS ERROR :: Called MISSION nedresearch_mission.sqf with invalid parameters: %1",_this];
};


//create possible difficulty add more of one difficulty to weight it towards that
_PossibleDifficulty        =     [
                                
                                "moderate",
                                "moderate"
                                
                            ];
//choose difficulty and set value
_difficulty = selectRandom _PossibleDifficulty;

switch (_difficulty) do
{
    case "easy":
    {
        _AICount = (4 + (round (random 4)));
        _crate_weapons         = (4 + (round (random 2)));
        _crate_items         = (3 + (round (random 3)));
        _crate_backpacks     = (1 + (round (random 1)));
    };

    case "moderate":
    {
        _AICount = (30 + (round (random 15)));
        _crate_weapons         = (24 + (round (random 6)));
        _crate_items         = (15 + (round (random 8)));
        _crate_backpacks     = (1+ (round (random 1)));
    };

    case "difficult":
    {
        _AICount = (6 + (round (random 6)));
        _crate_weapons         = (8 + (round (random 3)));
        _crate_items         = (8 + (round (random 4)));
        _crate_backpacks     = (3 + (round (random 1)));
    };

    //case "hardcore":
    default
    {
        _AICount = (8 + (round (random 8)));
        _crate_weapons         = (10 + (round (random 6)));
        _crate_items         = (15 + (round (random 8)));
        _crate_backpacks     = (4 + (round (random 1)));
    };
};

//_msgStart = ['#FFFF00',format["A %1 research camp has been spotted, find out what they are up to",_difficulty]];
_msgStart = ['#FFFF00',"AINC DEPOT MASTER WRARTHIS HAS SET UP A STORAGE DEPOT FOR THE GAURDS - RAID IT NOW BEFORE REINFORCEMENTS ARRIVE"];

_crate_weapon_list    = ["arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F","optic_MRCO","optic_DMS","optic_DMS_ghex_F","optic_ERCO_blk_F","optic_ERCO_khk_F","optic_ERCO_snd_F","optic_Arco","optic_Arco_blk_F","optic_Arco_ghex_F",];
_crate_item_list    = ["Exile_Item_EMRE","Exile_Item_InstantCoffee","Exile_Item_PowerDrink","Exile_Item_InstaDoc"];
_crate_backpacks_list    = ["O_HMG_01_weapon_F"];

_group =
[
    [[(_pos select 0)+2,(_pos select 1)+4,0],[(_pos select 0)-10,(_pos select 1)+0,0]],                    // Position AI in tent + 2nd squad
    _AICount,                // Number of AI
    _difficulty,            // "random","hardcore","difficult","moderate", or "easy"
    "assault",                 // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
    _side                     // "bandit","hero", etc.
] call DMS_fnc_SpawnAIGroup_MultiPos;

// add vehicle patrol
_veh =
[
    [
        [(_pos select 0)-200,(_pos select 1)+240,0]
        
    ],
    _group,
    "assault",
    _difficulty,
    _side
] call DMS_fnc_SpawnAIVehicle;


// add static guns
_staticGuns =
[
    [
        // make statically positioned relative to centre point, keep static as they are on top of building
        
    ],
    _group,
    "assault",
    "static",
    "bandit"
] call DMS_fnc_SpawnAIStaticMG;


// Create Buildings - use seperate file as found in the mercbase mission
_baseObjs =
[
    "AINC_objects",
    _pos
] call DMS_fnc_ImportFromM3E_3DEN;
_object;

// If hardcore give pincoded vehicle, if not give non persistent
if (_difficulty isEqualTo "moderate") then
{
    _pinCode = (1000 +(round (random 8999)));
    _vehicle = ["Exile_Car_Tempest ",[(_pos select 0) +0, (_pos select 1) -0],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
    _msgWIN = ['#0080ff',format ["AINC DEPOT HAS BEEN RAIDED , ALL SECURITY FORCES HAVE BEEN KILLED. VEHICLE PIN NUMBER IS %1...",_pinCode]];
}
}
else
{
    _vehicle = ["Exile_Car_Ural_Covered_Yellow",[(_pos select 0)-150,(_pos select 1)+0,0],[], 0, "CAN_COLLIDE"] call DMS_fnc_SpawnNonPersistentVehicle;
    _msgWIN = ['#0080ff',"Convicts have taken over the research camp"];
};

// Create Crate type
_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;


// setup crate iteself with items
_crate_loot_values1 =
[
    [_crate_weapons,_crate_weapon_list],                        // Weapons
    [_crate_items,_crate_items_list],                            // Items + selection list
    [_crate_backpacks,_crate_backpacks_list]                    // Backpacks
];


// Define mission-spawned AI Units
_missionAIUnits =
[
    _group         // We only spawned the single group for this mission
];

// Define mission-spawned objects and loot values
_missionObjs =
[
    _staticGuns+_baseObjs+[_veh],            // armed AI vehicle, base objects, and static guns
    [_vehicle],                                //this is prize vehicle
    [[_crate1,_crate_loot_values1]]            //this is prize crate
];

// define start messages in difficulty choice

// Define Mission Win message defined in persistent choice

// Define Mission Lose message
_msgLOSE = ['#FF0000',"AINC DEPOT HAS COMPLETED ITS RESUPPLY TO THE LOCAL SECURITY FORCES"];

// Define mission name (for map marker and logging)
_missionName = "AINC DEPOT";

// Create Markers
_markers =
[
    _pos,
    _missionName,
    _difficulty
] call DMS_fnc_CreateMarker;

// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
_time = diag_tickTime;

// Parse and add mission info to missions monitor
_added =
[
    _pos,
    [
        [
            "kill",
            _group
        ],
        [
            "playerNear",
            [_pos,DMS_playerNearRadius]
        ]
    ],
    [
        _time,
        (DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
    ],
    _missionAIUnits,
    _missionObjs,
    [_missionName,_msgWIN,_msgLOSE],
    _markers,
    _side,
    _difficulty,
    []
] call DMS_fnc_AddMissionToMonitor;

// Check to see if it was added correctly, otherwise delete the stuff
if !(_added) exitWith
{
    diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];

    // Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
    _cleanup = [];
    {
        _cleanup pushBack _x;
    } forEach _missionAIUnits;

    _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));

    {
        _cleanup pushBack (_x select 0);
    } foreach (_missionObjs select 2);

    _cleanup call DMS_fnc_CleanUp;


    // Delete the markers directly
    {deleteMarker _x;} forEach _markers;


    // Reset the mission count
    DMS_MissionCount = DMS_MissionCount - 1;
};


// Notify players
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;

 

if (DMS_DEBUG) then
{
    (format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
};

 

Again as always . I am thankful for anyone who is willing and able to either help directly with an answer or to point me in the right direction to find answers on my own. 

Yours appreciatively : 

STALKER

Share this post


Link to post
Share on other sites

Is this for DMS static missions?

Hope this helps.

Try this...

Spoiler

_pos = [13713.4,2873.76,0]; //Mission center
_AISoldierSpawnLocations =
[

// [X, Y, Height above terrain]
        [13691.3,2954.89,0.6],
        [13690.7,2953,0.6]

/* For bandit (random) mission you must use relative positioning from the mission center as follows where _pos is the mission center...

[(_pos select 0)+24.78,(_pos select 1)+0.67,9.3],

"_pos select 0" - selects the first item (X) in the array _pos. "_pos select 1" - selects the second (Y).

*/
];

// Create AI
// _AICount = 18 + (round (random 5));
_AICount = 2;  // I believe if this number is higher than the number of ai above, or has random chance (commented line above), it will randomly place those extra ai.

_group =
[
    _AISoldierSpawnLocations+[_pos,_pos,_pos],            // Pass the regular spawn locations as well as the center pos
    _AICount,
    _difficulty,
    "random",
    _side
] call DMS_fnc_SpawnAIGroup_MultiPos;

 

Edited by lords8n

Share this post


Link to post
Share on other sites
Advertisement

Hey mate.

Yes this is for BANDIT missions.
I already have a fully functioning BANDIT mission compound , with 4 statics on top of towers , 1 static inside an  apartment building with 2 statics guarding the front of the main compound.    Created a custom LOOT box position and have set up 6 custom loot boxes that can be sling loaded by transport helicopters. 

Alot of work has been done to customize this DMS pbo.  All missions are custom object placement.
Custom AI classes , Custom Loot boxes with set variables and random variables etc.

Only thing i am having issue with now is the dam placement of AI on spawn into specific relative pos.

Tried

 

Spoiler

_group =
[
    _AISoldierSpawnLocations-[_pos,_pos,_pos],            // Pass the regular spawn locations as well as the center pos
    _AICount,
    _difficulty,
    "random",
    _side
] call DMS_fnc_SpawnAIGroup_MultiPos;

No positive result. However i do appreciate the intent to help ;)

Also tried

 

Spoiler

_group =
[
    [

          [(_pos select 0)+2,(_pos select 1)+4,0],
          [(_pos select 0)-10,(_pos select 1)+0,0]
          [(_pos select 0)-20,(_pos select 1)+12,+12] (tower)

    ],                    // Position AI in tent + 2nd squad
    _AICount,                // Number of AI
    _difficulty,            // "random","hardcore","difficult","moderate", or "easy"
    "assault",                 // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
    _side                     // "bandit","hero", etc.
] call DMS_fnc_SpawnAIGroup_MultiPos;

And this seemed to break the dms.sqf.

I am wondering if there is a way to reference something like

 

Spoiler

_group =
[
    [
            [(_pos select 0)+2,(_pos select 1)+4,0],
            [(_pos select 0)-10,(_pos select 1)+0,0], 
            [(_pos select0)+20,(_pos select1)+10,12]

           [(_pos select0)+30,(_pos select1)+10,12]
           [(_pos select0)+40,(_pos select1)+10,12]
          [(_pos select0)+50,(_pos select1)+10,12]
            .... so on for all possible 20 AI spawn for mission
    ],                // Position AI in tent + 2nd squad
    _AICount,                // Number of AI
    _difficulty,            // "random","hardcore","difficult","moderate", or "easy"
    "assault",                 // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
    _side                     // "bandit","hero", etc.
] call DMS_fnc_SpawnAIGroup_MultiPos;

But i am unsure of exactly how to write the function / array to correctly reference the
positions i have.

Share this post


Link to post
Share on other sites

Are the ai not spawning in at all? Or are they not spawning in up where you want them?

Share this post


Link to post
Share on other sites
12 hours ago, [AI] Stalker said:

Hey mate.

Yes this is for BANDIT missions.
I already have a fully functioning BANDIT mission compound , with 4 statics on top of towers , 1 static inside an  apartment building with 2 statics guarding the front of the main compound.    Created a custom LOOT box position and have set up 6 custom loot boxes that can be sling loaded by transport helicopters. 

Alot of work has been done to customize this DMS pbo.  All missions are custom object placement.
Custom AI classes , Custom Loot boxes with set variables and random variables etc.

Only thing i am having issue with now is the dam placement of AI on spawn into specific relative pos.

Tried

 

  Reveal hidden contents

_group =
[
    _AISoldierSpawnLocations-[_pos,_pos,_pos],            // Pass the regular spawn locations as well as the center pos
    _AICount,
    _difficulty,
    "random",
    _side
] call DMS_fnc_SpawnAIGroup_MultiPos;

No positive result. However i do appreciate the intent to help ;)

Also tried

 

  Hide contents

_group =
[
    [

          [(_pos select 0)+2,(_pos select 1)+4,0],
          [(_pos select 0)-10,(_pos select 1)+0,0]
          [(_pos select 0)-20,(_pos select 1)+12,+12] (tower)

    ],                    // Position AI in tent + 2nd squad
    _AICount,                // Number of AI
    _difficulty,            // "random","hardcore","difficult","moderate", or "easy"
    "assault",                 // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
    _side                     // "bandit","hero", etc.
] call DMS_fnc_SpawnAIGroup_MultiPos;

And this seemed to break the dms.sqf.

I am wondering if there is a way to reference something like

 

  Hide contents

_group =
[
    [
            [(_pos select 0)+2,(_pos select 1)+4,0],
            [(_pos select 0)-10,(_pos select 1)+0,0], 
            [(_pos select0)+20,(_pos select1)+10,12]

           [(_pos select0)+30,(_pos select1)+10,12]
           [(_pos select0)+40,(_pos select1)+10,12]
          [(_pos select0)+50,(_pos select1)+10,12]
            .... so on for all possible 20 AI spawn for mission
    ],                // Position AI in tent + 2nd squad
    _AICount,                // Number of AI
    _difficulty,            // "random","hardcore","difficult","moderate", or "easy"
    "assault",                 // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
    _side                     // "bandit","hero", etc.
] call DMS_fnc_SpawnAIGroup_MultiPos;

But i am unsure of exactly how to write the function / array to correctly reference the
positions i have.

you end up using this:

 

[((_pos select 0)+(round (random 50))),((_pos select 1)+(round (random 10))),0],

 

(round (random 50)) is randomly between 0 and 50

 

Share this post


Link to post
Share on other sites

@red_ned
I don't think he's trying to randomly spawn ai. I think he trying to specifically place ai in exact places relative to mission center (or some other object).

I asked if the ai were spawning at all, but just not where they are intended height-wise. This could have to do with the ai loading in before buildings, objects, etc... placement.

Edited by lords8n

Share this post


Link to post
Share on other sites
16 minutes ago, lords8n said:

@red_ned
I don't think he's trying to randomly spawn ai. I think he trying to specifically place ai in exact places relative to mission center (or some other object).

I asked if the ai were spawning at all, but just not where they are intended height-wise. This could have to do with the ai loading in before buildings, objects, etc... placement.

if its bandit (random) then move the object load lines above the AI load lines:

Quote

_baseObjs =
[
 "base1",
 _pos
] call DMS_fnc_ImportFromM3E;

can be above

Quote

_group =
[
 [_pos,[-9.48486,-12.4834,0]] call DMS_fnc_CalcPos,
 _AICount,
 _difficulty,
 "random",
 _side
] call DMS_fnc_SpawnAIGroup;

but not above all the mission pre-amble with _private and mission calls. that should get the AI in 1st

 

static mission should really load most things in on server start but you can also load objects similarly during a mission start and bump it to the same place in the mission sqf

 

I place chairs for AI while mapping the objects and export at same time then do the maths (although I think there is a relative export in main editor now but I never got it to work)

Edited by red_ned

Share this post


Link to post
Share on other sites

Exactly. Obj plabement above ai placement for sure...IF this is the issue. We need to wait to hear back from him.

Not to derail, but if there is a relative export I'd love to know about it!

Share this post


Link to post
Share on other sites

I think i have it figured out. I will advise next couple of days on what has not worked and what has.
Also will be putting up a completed mission package for DMS with custom object placement etc for anyone who is interested.

Share this post


Link to post
Share on other sites

Tried this

Spoiler

/*
    AINC compound mission created with custom object placement by AINC STALKER.
    Based upon work by DEFENT and ERASER 1 and [CiC]red_ned.
   

*/

private ["_num", "_side", "_pos", "_OK", "_difficulty", "_AICount", "_group", "_type", "_launcher", "_staticGuns", "_crate1", "_vehicle", "_pinCode", "_class", "_veh", "_crate_loot_values1", "_missionAIUnits", "_missionObjs", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_markers", "_time", "_added", "_cleanup", "_baseObjs", "_crate_weapons", "_crate_weapon_list", "_crate_items", "_crate_item_list", "_crate_backpacks", "_PossibleDifficulty"];

// For logging purposes
_num = DMS_MissionCount;


// Set mission side (only "bandit" is supported for now)
_side = "bandit";


// This part is unnecessary, but exists just as an example to format the parameters for "DMS_fnc_MissionParams" if you want to explicitly define the calling parameters for DMS_fnc_FindSafePos.
// It also allows anybody to modify the default calling parameters easily.
if ((isNil "_this") || {_this isEqualTo [] || {!(_this isEqualType [])}}) then
{
    _this =
    [
        [10,DMS_WaterNearBlacklist,DMS_MinSurfaceNormal,DMS_SpawnZoneNearBlacklist,DMS_TraderZoneNearBlacklist,DMS_MissionNearBlacklist,DMS_PlayerNearBlacklist,DMS_TerritoryNearBlacklist,DMS_ThrottleBlacklists],
        [
            []
        ],
        _this
    ];
};

// Check calling parameters for manually defined mission position.
// You can define "_extraParams" to specify the vehicle classname to spawn, either as _vehClass or [_vehClass]
_OK = (_this call DMS_fnc_MissionParams) params
[
    ["_pos",[],[[]],[3],[],[],[]],
    ["_extraParams",[]]
];

if !(_OK) exitWith
{
    diag_log format ["DMS ERROR :: Called MISSION STALKER_AINCcompound_mission.sqf with invalid parameters: %1",_this];
};

 

//create possible difficulty add more of one difficulty to weight it towards that
_PossibleDifficulty        =     [
                                
                                "moderate",
                                "moderate"
                                
                            ];
//choose difficulty and set value
_difficulty = selectRandom _PossibleDifficulty;

switch (_difficulty) do
{
    case "easy":
    {
        _AICount = (4 + (round (random 4)));
        _crate_weapons         = (4 + (round (random 2)));
        _crate_items         = (3 + (round (random 3)));
        _crate_backpacks     = (1 + (round (random 1)));
    };

    case "moderate":
    {
        _AICount = (20 + (round (random 5)));
        _crate_weapons         = (12 + (round (random 6)));
        _crate_items         = (15 + (round (random 8)));
        _crate_backpacks     = (1+ (round (random 1)));
    };

    case "difficult":
    {
        _AICount = (6 + (round (random 6)));
        _crate_weapons         = (8 + (round (random 3)));
        _crate_items         = (8 + (round (random 4)));
        _crate_backpacks     = (3 + (round (random 1)));
    };

    //case "hardcore":
    default
    {
        _AICount = (8 + (round (random 8)));
        _crate_weapons         = (10 + (round (random 6)));
        _crate_items         = (15 + (round (random 8)));
        _crate_backpacks     = (4 + (round (random 1)));
    };
};

//_msgStart = ['#FFFF00',format["A %1 research camp has been spotted, find out what they are up to",_difficulty]];
_msgStart = ['#FFFF00',"AINC Security have set up a resupply compound. Raid them before they complete operations"];

_crate_weapon_list    = ["arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MXM_F","arifle_MXM_Black_F","arifle_MXC_Black_F","arifle_MX_Black_F","arifle_MX_GL_Black_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_GL_blk_F","arifle_SPAR_02_blk_F","arifle_SPAR_03_blk_F","arifle_MX_SW_Black_F","LMG_Zafir_F","srifle_EBR_F","srifle_DMR_01_F","srifle_DMR_03_woodland_F"];
_crate_items_list    = ["optic_MRCO","optic_DMS","optic_DMS_ghex_F","optic_ERCO_blk_F","optic_ERCO_khk_F","optic_ERCO_snd_F","optic_Arco","optic_Arco_blk_F","optic_Arco_ghex_F","Exile_Item_EMRE","Exile_Item_InstantCoffee","Exile_Item_PowerDrink","Exile_Item_InstaDoc"];
_crate_backpacks_list    = ["B_ViperLightHarness_blk_F", "B_Carryall_oucamo","B_AssaultPack_blk"];


_baseObjs =
[
    "STALKER_AINC_objects",
    _pos
] call DMS_fnc_ImportFromM3E_3DEN;


_AISoldierSpawnLocations =
[

[(_pos select 0) -36,(_pos select 1) +15,+1],
[(_pos select 0) -37,(_pos select 1) -12,+1],
[(_pos select 0) -23,(_pos select 1) +3,+1],
[(_pos select 0) -22,(_pos select 1) +2,+5],
[(_pos select 0) -32,(_pos select 1) +11,+5],
[(_pos select 0) -23,(_pos select 1) +3,+8],
[(_pos select 0) -23,(_pos select 1) +10,+9],
[(_pos select 0) -22,(_pos select 1) +10,+12],
[(_pos select 0) -28,(_pos select 1) +15,+13],
[(_pos select 0) -32,(_pos select 1) +11,+12],
[(_pos select 0) -20,(_pos select 1) -4,+17],
[(_pos select 0) -22,(_pos select 1) +15,+17],
[(_pos select 0) -28,(_pos select 1) -8,+18],
[(_pos select 0) +3,(_pos select 1) +22,+9],
[(_pos select 0) +4,(_pos select 1) -22,+9],
[(_pos select 0) +22,(_pos_select 1) -22,+1],
[(_pos select 0) +39,(_pos select 1) -16,+1]

];

_group =
[
    _AISoldierSpawnLocations+[_pos,_pos,_pos,_pos,_pos],            
    _AICount,
    _difficulty,
    "random",
    _side
] call DMS_fnc_SpawnAIGroup_MultiPos;

// add vehicle patrol
_veh =
[
    [
        [(_pos select 0)-100,(_pos select 1)+240,0]
        
    ],
    _group,
    "assault",
    _difficulty,
    _side
] call DMS_fnc_SpawnAIVehicle;


// add static guns
_staticGuns =
[
    [
        // make statically positioned relative to centre point, keep static as they are on top of building
        [(_pos select 0) -10,(_pos select 1) +10,0],
        [(_pos select 0) -10,(_pos select 1) -10,0],
        [(_pos select 0) -25,(_pos select 1) +15,+14]
    ],
    _group,
    "assault",
    "static",
    "bandit"
] call DMS_fnc_SpawnAIStaticMG;

// If hardcore give pincoded vehicle, if not give non persistent
if (_difficulty isEqualTo "moderate") then
{
    _pinCode = (1000 +(round (random 8999)));
    _vehicle = ["Exile_Car_Ural_Covered_Yellow",[(_pos select 0) +12, (_pos select 1) -0],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
    _msgWIN = ['#0080ff',format ["AINC compound secured.Vehicle Code secured.Code is %1...",_pinCode]];
}
else
{
    _vehicle = ["Exile_Car_Ural_Covered_Yellow",[(_pos select 0)-150,(_pos select 1)+0,0],[], 0, "CAN_COLLIDE"] call DMS_fnc_SpawnNonPersistentVehicle;
    _msgWIN = ['#0080ff',"Convicts have taken over the research camp"];
};

// Create Crate type
_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;


// setup crate iteself with items
_crate_loot_values1 =
[
    [_crate_weapons,_crate_weapon_list],                        // Weapons
    [_crate_items,_crate_items_list],                            // Items + selection list
    [_crate_backpacks,_crate_backpacks_list]                    // Backpacks
];


// Define mission-spawned AI Units
_missionAIUnits =
[
    _group         // We only spawned the single group for this mission
];

// Define mission-spawned objects and loot values
_missionObjs =
[
    _staticGuns+_baseObjs+[_veh],            // armed AI vehicle, base objects, and static guns
    [_vehicle],                                //this is prize vehicle
    [[_crate1,_crate_loot_values1]]            //this is prize crate
];

// define start messages in difficulty choice

// Define Mission Win message defined in persistent choice

// Define Mission Lose message
_msgLOSE = ['#FF0000',"AINC security forces have secured the Compound"];

// Define mission name (for map marker and logging)
_missionName = "AINC COMPOUND";

// Create Markers
_markers =
[
    _pos,
    _missionName,
    _difficulty
] call DMS_fnc_CreateMarker;

// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
_time = diag_tickTime;

// Parse and add mission info to missions monitor
_added =
[
    _pos,
    [
        [
            "kill",
            _group
        ],
        [
            "playerNear",
            [_pos,DMS_playerNearRadius]
        ]
    ],
    [
        _time,
        (DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
    ],
    _missionAIUnits,
    _missionObjs,
    [_missionName,_msgWIN,_msgLOSE],
    _markers,
    _side,
    _difficulty,
    []
] call DMS_fnc_AddMissionToMonitor;

// Check to see if it was added correctly, otherwise delete the stuff
if !(_added) exitWith
{
    diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];

    // Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
    _cleanup = [];
    {
        _cleanup pushBack _x;
    } forEach _missionAIUnits;

    _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));

    {
        _cleanup pushBack (_x select 0);
    } foreach (_missionObjs select 2);

    _cleanup call DMS_fnc_CleanUp;


    // Delete the markers directly
    {deleteMarker _x;} forEach _markers;


    // Reset the mission count
    DMS_MissionCount = DMS_MissionCount - 1;
};


// Notify players
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;

 

if (DMS_DEBUG) then
{
    (format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
};

 


Didnt work.

The .SQF not inclussive of the change to AISoldierSpawnLocations references is fine.
And the OBJECTS reference loads correctly when the AI spawn is set to default.

Ie:

Spoiler

_group =
[
    [[(_pos select 0)+2,(_pos select 1)+4,0],[(_pos select 0)-10,(_pos select 1)+0,0]],                    // Position AI in tent + 2nd squad
    _AICount,                // Number of AI
    _difficulty,            // "random","hardcore","difficult","moderate", or "easy"
    "assault",                 // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
    _side                     // "bandit","hero", etc.
] call DMS_fnc_SpawnAIGroup_MultiPos;


Tried simply adding pos refeerences but no avail.

Any ideas?

BANDIT Mission by the way.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.