Jump to content

my first static mission, need help


Recommended Posts

Hi i make my first mission. first i make object : 

if (isServer) then {

_vehicle_3 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBUAVterminal", [1140.9242, 2527.5955, -2.8610229e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_3 = _this;
  _this setDir 19.009367;
  _this setPos [1140.9242, 2527.5955, -2.8610229e-006];
};

_vehicle_4 = objNull;
if (true) then
{
  _this = createVehicle ["BTR90_HQ_unfolded", [1148.3534, 2537.5293, -5.2452087e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_4 = _this;
  _this setDir 49.521225;
  _this setPos [1148.3534, 2537.5293, -5.2452087e-006];
};

_vehicle_5 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBFieldhHospital", [1175.2413, 2532.1558, -3.8146973e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_5 = _this;
  _this setDir 112.54391;
  _this setPos [1175.2413, 2532.1558, -3.8146973e-006];
};

_vehicle_6 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBVehicleServicePoint", [1141.7616, 2516.4692, 1.3828278e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_6 = _this;
  _this setDir 61.574554;
  _this setPos [1141.7616, 2516.4692, 1.3828278e-005];
};

_vehicle_7 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBLightFactory", [1152.9174, 2499.0522, 3.3378601e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_7 = _this;
  _this setDir -134.45648;
  _this setPos [1152.9174, 2499.0522, 3.3378601e-006];
};

_vehicle_9 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBContructionSite1", [1180.9768, 2527.0144, -3.3378601e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_9 = _this;
  _this setDir 45.106716;
  _this setPos [1180.9768, 2527.0144, -3.3378601e-006];
};

_vehicle_10 = objNull;
if (true) then
{
  _this = createVehicle ["USMC_WarfareBContructionSite1", [1184.2617, 2525.4026, -2.0980835e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_10 = _this;
  _this setDir 40.023411;
  _this setPos [1184.2617, 2525.4026, -2.0980835e-005];
};

_vehicle_11 = objNull;
if (true) then
{
  _this = createVehicle ["CDF_WarfareBContructionSite", [1187.655, 2522.5811, 1.5258789e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_11 = _this;
  _this setDir 35.707901;
  _this setPos [1187.655, 2522.5811, 1.5258789e-005];
};

_vehicle_12 = objNull;
if (true) then
{
  _this = createVehicle ["Ins_WarfareBContructionSite", [1168.8115, 2535.5857, 1.6212463e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_12 = _this;
  _this setDir 35.446182;
  _this setPos [1168.8115, 2535.5857, 1.6212463e-005];
};

_vehicle_13 = objNull;
if (true) then
{
  _this = createVehicle ["Land_fortified_nest_big", [1163.1637, 2540.0981, -0.046755899], [], 0, "CAN_COLLIDE"];
  _vehicle_13 = _this;
  _this setDir 194.57272;
  _this setPos [1163.1637, 2540.0981, -0.046755899];
};

_vehicle_18 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Misc_Cargo1Eo_EP1", [1148.8073, 2508.8076, -5.2452087e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_18 = _this;
  _this setDir 58.994881;
  _this setPos [1148.8073, 2508.8076, -5.2452087e-006];
};

_vehicle_21 = objNull;
if (true) then
{
  _this = createVehicle ["CampEast_EP1", [1167.3418, 2490.7686, 3.8146973e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_21 = _this;
  _this setDir -144.23048;
  _this setPos [1167.3418, 2490.7686, 3.8146973e-006];
};

_vehicle_25 = objNull;
if (true) then
{
  _this = createVehicle ["CampEast_EP1", [1175.1738, 2485.3459, -6.6757202e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_25 = _this;
  _this setDir -144.23048;
  _this setPos [1175.1738, 2485.3459, -6.6757202e-006];
};

_vehicle_27 = objNull;
if (true) then
{
  _this = createVehicle ["CampEast_EP1", [1193.5358, 2517.5151, -4.7683716e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_27 = _this;
  _this setDir 52.34721;
  _this setPos [1193.5358, 2517.5151, -4.7683716e-006];
};

_vehicle_29 = objNull;
if (true) then
{
  _this = createVehicle ["CampEast_EP1", [1196.8766, 2507.3442, -1.0490417e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_29 = _this;
  _this setDir -284.18365;
  _this setPos [1196.8766, 2507.3442, -1.0490417e-005];
};

_vehicle_32 = objNull;
if (true) then
{
  _this = createVehicle ["Land_fortified_nest_big", [1180.1633, 2476.083, -1.9073486e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_32 = _this;
  _this setDir -327.08746;
  _this setPos [1180.1633, 2476.083, -1.9073486e-006];
};

_vehicle_35 = objNull;
if (true) then
{
  _this = createVehicle ["FlagCarrierINS", [1164.2135, 2518.604, -4.7683716e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_35 = _this;
  _this setPos [1164.2135, 2518.604, -4.7683716e-006];
};

_vehicle_45 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1144.7505, 2574.0779, -1.9073486e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_45 = _this;
  _this setDir 508.3844;
  _this setPos [1144.7505, 2574.0779, -1.9073486e-006];
};

_vehicle_46 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1147.1542, 2573.1001, -0.051214695], [], 0, "CAN_COLLIDE"];
  _vehicle_46 = _this;
  _this setDir 611.89746;
  _this setPos [1147.1542, 2573.1001, -0.051214695];
};

_vehicle_47 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1145.6179, 2571.062, -0.0066490173], [], 0, "CAN_COLLIDE"];
  _vehicle_47 = _this;
  _this setDir 360.93307;
  _this setPos [1145.6179, 2571.062, -0.0066490173];
};

_vehicle_51 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1167.6288, 2441.0178, 7.1525574e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_51 = _this;
  _this setPos [1167.6288, 2441.0178, 7.1525574e-006];
};

_vehicle_52 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1166.0281, 2443.0713, 0.0351758], [], 0, "CAN_COLLIDE"];
  _vehicle_52 = _this;
  _this setDir 103.26068;
  _this setPos [1166.0281, 2443.0713, 0.0351758];
};

_vehicle_53 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1169.3854, 2443.074, 0.011480331], [], 0, "CAN_COLLIDE"];
  _vehicle_53 = _this;
  _this setDir -100.85347;
  _this setPos [1169.3854, 2443.074, 0.011480331];
};

_vehicle_57 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1226.0667, 2477.9319, -5.2452087e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_57 = _this;
  _this setDir -60.552372;
  _this setPos [1226.0667, 2477.9319, -5.2452087e-006];
};

_vehicle_58 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1223.4108, 2477.5032, 0.02704668], [], 0, "CAN_COLLIDE"];
  _vehicle_58 = _this;
  _this setDir 42.708332;
  _this setPos [1223.4108, 2477.5032, 0.02704668];
};

_vehicle_59 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1225.1349, 2480.3213, 0.025304317], [], 0, "CAN_COLLIDE"];
  _vehicle_59 = _this;
  _this setDir -161.40593;
  _this setPos [1225.1349, 2480.3213, 0.025304317];
};

_vehicle_63 = objNull;
if (true) then
{
  _this = createVehicle ["Land_CamoNetVar_EAST", [1160.8091, 2531.3533, -4.7683716e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_63 = _this;
  _this setPos [1160.8091, 2531.3533, -4.7683716e-006];
};
};


Next i make some AI :

[[1174.2133, 2509.1602, 1.4305115e-006],6,"hard","Random",4,"Random","RU_Soldier","Random","Bandit"] call spawn_group;
[[1182.3551, 2493.48, 1.9073486e-006],6,"hard","Random",4,"Random","RU_Soldier_TL","Random","Bandit"] call spawn_group;
[[1156.8876, 2522.3499, 1.2397766e-005],6,"hard","Random",4,"Random","RUS_Soldier1","Random","Bandit"] call spawn_group;
[[1174.3737, 2499.1636, -2.8610229e-006],6,"hard","Random",4,"Random","MVD_Soldier_GL","Random","Bandit"] call spawn_group;
[[1180.5831, 2508.9629, 4.7683716e-007],6,"hard","Random",4,"Random","RU_Soldier_Crew","Random","Bandit"] call spawn_group;
[[1207.7635, 2497.4592, 3.3378601e-006],6,"hard","Random",4,"Random","CDF_Soldier_TL","Random","Bandit"] call spawn_group;

[[[1145.5648, 2572.5664, -3.8146973e-006],[1167.8104, 2442.728, -1.3828278e-005],[1224.5549, 2478.313, 3.3378601e-006]],
"DSHKM_CDF","medium","Bandit","Bandit","Random",2,"none","Random"] call spawn_static;

[[1201.5977, 2454.1587, 3.3378601e-006],50,2,"UAZ_MG_INS","Random","Bandit","Bandit",_mission] call vehicle_patrol;

 

 crate : 

_box1 = createVehicle ["TKLaunchers_EP1",[1162.7145, 2530.0483, -9.5367432e-007], [], 0, "CAN_COLLIDE"];
[_box1] call spawn_ammo_box;
  clearWeaponCargoGlobal _box17 ; 
  clearMagazineCargoGlobal _box17 ; 
 _box1  addWeaponCargoGlobal[""RPG7V"",1];  
 _box1  addMagazineCargoGlobal [""PG7V"", 1]; 
 _box1 addMagazineCargoGlobal [""OG7"", 1];"

 

Marker :

 

_this = createMarker ["bandithq", [1160.0741, 2519.1294]];
_this setMarkerText "Bandit HQ";
_this setMarkerType "mil_dot";
_this setMarkerColor "ColorRed";
_this setMarkerBrush "Solid";
_marker_0 = _this;

 

And now i have question, i know how add building (  to this dayz_server\init\server_functions.sqf i add this line : execVM "\z\addons\dayz_server\buildings\bandithq.sqf";

But i need help how add AI, crate and marker to map. Can someone help me ?

 

 

Link to comment
Share on other sites

mmm cant understand you as well :D you can use one single file for all this if mission is persistent.. if not maybe and more easy way is create an event.

for example a persistent mission

Spoiler

if (isServer) then {

//BUILDINGS SECTIONS

_vehicle_3 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBUAVterminal", [1140.9242, 2527.5955, -2.8610229e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_3 = _this;
  _this setDir 19.009367;
  _this setPos [1140.9242, 2527.5955, -2.8610229e-006];
};

_vehicle_4 = objNull;
if (true) then
{
  _this = createVehicle ["BTR90_HQ_unfolded", [1148.3534, 2537.5293, -5.2452087e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_4 = _this;
  _this setDir 49.521225;
  _this setPos [1148.3534, 2537.5293, -5.2452087e-006];
};

//the other buildings

///////////////////////////////////

///AI SECTION// use this way or spawn groups if u really know groups works

_this = createCenter east;
_this setFriend [west, 0];
_this setFriend [civilian, 0];
_center_1 = _this;

_group_1 = createGroup _center_1;

_unit_1 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Soldier_SL_EP1", [8333.0879, 6015.5435], [], 0, "CAN_COLLIDE"];//use your coords
  _unit_1 = _this;
  _this setDir -57.881279;
  _this setVehicleVarName "guner1";
  guner1 = _this;
  _this setVehicleInit "this MoveInGunner gun1;";
  _this setUnitAbility 0.60000002;
  if (true) then {_group_1 selectLeader _this;};
};

/////////END AI///////////////////////////

///SPAWN BOX

_loot_box = "TKLaunchers_EP1";
_loot_lists = [
[
["M9SD","FN_FAL","M4A3_CCO_EP1","AKS_74_kobra","Sa58V_RCO_EP1","ItemEtool","ItemCrowbar","ItemKnife","ItemSledge","ItemCompass","Binocular","Binocular_Vector","NVGoggles","ItemGPS"],
["ItemBriefcase100oz","150Rnd_127x107_DSHKM","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD"]
],
[
["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["ItemBriefcase100oz","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"]
],
[
["ItemToolbox","M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"]
],
[
["ChainSaw"],
["ItemBriefcase100oz","ItemBriefcase100oz","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemComboLock","ItemGenerator"]
],
[
["m240_scoped_EP1_DZE","Mk_48_DZ","M240_DZ","RPK_74"],
["ItemBriefcase100oz","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","2000Rnd_762x51_M134","2000Rnd_762x51_M134","ItemAVE","ItemLRK","ItemTNK","ItemARM","ItemORP","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked"]
],
[
["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"],
["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","FoodCanFrankBeans","FoodCanFrankBeans","FoodCanBakedBeans","FoodMRE","HandGrenade_east","2000Rnd_762x51_M134","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
],
[
["VSS_vintorez","Saiga12K","M8_compact"],
["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","HandGrenade_east","HandGrenade_east","FoodCanSardines","FoodMRE","FoodPistachio","FoodNutmix","FoodMRE","FoodPistachio","FoodNutmix","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
]
];
_loot = _loot_lists call BIS_fnc_selectRandom;
_loot2 = _loot_lists call BIS_fnc_selectRandom;

_box1 = createVehicle [_loot_box,[1162.7145, 2530.0483, -9.5367432e-007], [], 0, "CAN_COLLIDE"];

clearMagazineCargoGlobal _box1 ;
clearWeaponCargoGlobal _box1;
_box1 setVariable ["permaLoot",true];

// Add loot
{
_loot_box addWeaponCargoGlobal [_x,1];
} forEach (_loot select 0);
{
_loot_box addMagazineCargoGlobal [_x,1];
} forEach (_loot select 1);
{
_loot_box addWeaponCargoGlobal [_x,1];
} forEach (_loot2 select 0);
{
_loot_box addMagazineCargoGlobal [_x,1];
} forEach (_loot2 select 1);

};

 

here you have another example of persistent missions (persistent means start with the server and die when server restart and start again)

this have, buildings, vehicles, Ai, scuads, crates....

Spoiler

 

and the marker you can make a new sqf with the marker and call it trough init.sqf

 

but if u wanna something like WAI missions use his example to create a new.

Spoiler

if(isServer) then {
    
    private         ["_baserunover","_mission","_directions","_position","_crate","_crate_type","_num"];

    // Get a safe position 80 meters from the nearest object
    _position        = [80] call find_position;
    
    // Initialise the mission variable with the following options, [position, difficulty, mission name, mission type (MainHero/Mainbandit), minefield (true or false)] call mission_init;
    [_mission,_position,"hard","Test Mission","MainHero",true] call mission_init;

    diag_log         format["WAI: Mission Test Mission started at %1",_position];

    //Setup the crate
    _crate_type     = crates_large call BIS_fnc_selectrandom; // Choose between crates_large, crates_medium and crates_small
    _crate             = createVehicle [_crate_type,[(_position select 0),(_position select 1),0],[],0,"CAN_COLLIDE"];

    // Crate Spawn Example
    // Parameters:    0: _crate
    //                1: Max number of guns OR [MAX number of guns,gun_array]
    //                2: Max number of tools OR [MAX number of tools,tool_array]
    //                3: Max number of items OR [MAX number of items,item_array]
    //                4: Max number of backpacks OR [MAX number of backpacks,backpack_array]
    [_crate,16,[8,crate_tools_sniper],[3,crate_items_high_value],[4,crate_backpacks_large]] call dynamic_crate;
    
    // Create some Buildings
    _baserunover0     = createVehicle ["land_fortified_nest_big",[(_position select 0) - 40, (_position select 1),-0.2],[], 0, "CAN_COLLIDE"];
    _baserunover1     = createVehicle ["land_fortified_nest_big",[(_position select 0) + 40, (_position select 1),-0.2],[], 0, "CAN_COLLIDE"];
    _baserunover2     = createVehicle ["land_fortified_nest_big",[(_position select 0), (_position select 1) - 40,-0.2],[], 0, "CAN_COLLIDE"];
    _baserunover3     = createVehicle ["land_fortified_nest_big",[(_position select 0), (_position select 1) + 40,-0.2],[], 0, "CAN_COLLIDE"];
    _baserunover4     = createVehicle ["Land_Fort_Watchtower",[(_position select 0) - 10, (_position select 1),-0.2],[], 0, "CAN_COLLIDE"];
    _baserunover5     = createVehicle ["Land_Fort_Watchtower",[(_position select 0) + 10, (_position select 1),-0.2],[], 0, "CAN_COLLIDE"];
    _baserunover6     = createVehicle ["Land_Fort_Watchtower",[(_position select 0), (_position select 1) - 10,-0.2],[], 0, "CAN_COLLIDE"];
    _baserunover7     = createVehicle ["Land_Fort_Watchtower",[(_position select 0), (_position select 1) + 10,-0.2],[], 0, "CAN_COLLIDE"];
    
    // Adding buildings to one variable just for tidiness
    _baserunover = [_baserunover0,_baserunover1,_baserunover2,_baserunover3,_baserunover4,_baserunover5,_baserunover6,_baserunover7];
    
    // Set some directions for our buildings
    _directions = [90,270,0,180,0,180,270,90];
    { _x setDir (_directions select _forEachIndex) } forEach _baserunover;

    // Make buildings flat on terrain surface
    { _x setVectorUp surfaceNormal position _x; } count _baserunover;

    // Group Spawn Examples
    // Parameters:    0: Position
    //                1: Unit Count
    //                2: Unit Skill ("easy","medium","hard","extreme" or "random")
    //                3: Guns (gun or [gun,launcher])
    //                    Guns options    : (0 = ai_wep_assault, 1 = ai_wep_machine, 2 = ai_wep_sniper, "random" = random weapon, "Unarmed" = no weapon)
    //                    Launcher options: (at = ai_wep_launchers_AT, aa = ai_wep_launchers_AA or "classname")
    //                4: Magazine Count
    //                5: Backpack ("random" or "classname")
    //                6: Skin ("Hero","bandit","random","special" or "classname")
    //                7: Gear (0:ai_gear0, 1:ai_gear1, 2:ai_gear2, 3:ai_gear3, 4:ai_gear4 or "random")
    //                8: AI Type ("bandit","Hero","special" or ["type", #] format to overwrite default gain amount) ***Used to determine humanity gain or loss***
    //                9: Mission variable from line 9 (_mission)
    _num = round (random 3) + 4;
    [[_position select 0, _position select 1, 0],_num,"extreme",["random","at"],4,"random","bandit","random",["bandit",150],_mission] call spawn_group;
    [[_position select 0, _position select 1, 0],4,"hard","random",4,"random","bandit","random","bandit",_mission] call spawn_group;
    [[_position select 0, _position select 1, 0],4,"random","random",4,"random","bandit","random","bandit",_mission] call spawn_group;
    [[_position select 0, _position select 1, 0],4,"random","random",4,"random","bandit","random","bandit",_mission] call spawn_group;
    [[_position select 0, _position select 1, 0],4,"random","random",4,"random","bandit","random","bandit",_mission] call spawn_group;


    // Humvee Patrol Example
    // Parameters:    0: Patrol position
    //                1: Starting position
    //                2: Patrol radius
    //                3: Number of Waypoints
    //                4: Vehicle classname
    //                5: Unit Skill ("easy","medium","hard","extreme" or "random")
    //                6: Skin ("Hero","bandit","random","special" or "classname")
    //                7: AI Type ("bandit","Hero" or "special") ***Used to determine humanity gain or loss***
    //                8: Mission variable from line 9 (_mission)
    [[(_position select 0) + 100, _position select 1, 0],[(_position select 0) + 100, _position select 1, 0],50,2,"HMMWV_Armored","random","bandit","bandit",_mission] call vehicle_patrol;
    
    // Static Turret Examples
    // Parameters:    0: Spawn position
    //                1: Classname ("classname" or "random" to pick from ai_static_weapons)
    //                2: Unit Skill ("easy","medium","hard","extreme" or "random") ***NO effect if ai_static_skills = true;***
    //                3: Skin ("Hero","bandit","random","special" or "classname")
    //                4: AI Type ("bandit","Hero" or "special") ***Used to determine humanity gain or loss***
    //                5: Gun (0:ai_wep_assault 1:ai_wep_machine 2:ai_wep_sniper or "random") ***NO effect if ai_static_useweapon = false;***
    //                6: Magazine Count ***NO effect if ai_static_useweapon = false;***
    //                7: Backpack ("random" or "classname") ***NO effect if ai_static_useweapon = false;***
    //                8: Gear (0:ai_gear0, 1:ai_gear1, 2:ai_gear2, 3:ai_gear3, 4:ai_gear4 or "random") ***NO effect if ai_static_useweapon = false;***
    //                9: Mission variable from line 9 (_mission)
    };
    [[[(_position select 0) - 10, (_position select 1) + 10, 0]],"M2StaticMG","easy","bandit","bandit",0,2,"random","random",_mission] call spawn_static;
    [[[(_position select 0) + 10, (_position select 1) - 10, 0]],"M2StaticMG","easy","bandit","bandit",0,2,"random","random",_mission] call spawn_static;
    [[[(_position select 0) + 10, (_position select 1) + 10, 0]],"M2StaticMG","easy","bandit","bandit",0,2,"random","random",_mission] call spawn_static;
    [[[(_position select 0) - 10, (_position select 1) - 10, 0]],"M2StaticMG","easy","bandit","bandit",0,2,"random","random",_mission] call spawn_static;

    // Heli Paradrop Example
    // Parameters:    0: Paradrop position
    //                1: Spawn position
    //                2: Trigger radius
    //                3: Vehicle classname
    //                4: Amount of paratroopers
    //                5: Unit Skill ("easy","medium","hard","extreme" or "random") ***NO effect if ai_static_skills = true;***
    //                6: Gun (0:ai_wep_assault 1:ai_wep_machine 2:ai_wep_sniper or "random")
    //                7: Magazine Count
    //                8: Backpack ("random" or "classname")
    //                9: Skin ("Hero","bandit","random","special" or "classname")
    //                10: Gear (0:ai_gear0, 1:ai_gear1, 2:ai_gear2, 3:ai_gear3, 4:ai_gear4 or "random")
    //                11: AI Type ("bandit","Hero" or "special") ***Used to determine humanity gain or loss***
    //                12: Heli stay and fight after troop deployment? (true or false)
    //                13: Mission variable from line 9 (_mission)
    [[(_position select 0), (_position select 1), 0],[0,0,0],400,"UH1H_DZ",10,"random","random",4,"random","bandit","random","bandit",true,_mission] spawn heli_para;

    // Assassination target example
    // This is the same as normal group spawns but we assign it to a variable instead for use in the trigger below (if there are multiple units in this group you'll need to kill them all)
    _assassinate = [[_position select 0, _position select 1, 0],1,"hard","random",4,"random","special","random","bandit",_mission] call spawn_group;

    // Mission objective options and messages
    [
        [_mission,_crate],    // mission variable (from line 9) and crate
        ["crate"],             // Mission objective type (["crate"], or ["kill"], or ["assassinate", _assassinate])
        [_baserunover],     // buildings to cleanup after mission is complete, does not include the crate
        "A Mission has spawned, hurry up to claim the loot!",    // mission announcement
        "The mission was complete/objective reached",            // mission success
        "The mission timed out and nobody was in the vicinity"    // mission fail
    ] call mission_winorfail;

    // End of mission
    diag_log format["WAI: Mission bandit base ended at %1 ended",_position];

    h_missionsrunning = h_missionsrunning - 1;
};

 

Link to comment
Share on other sites

you can add more AI if you want, example

Spoiler

///AI SECTION// use this way or spawn groups if u really know groups works

_this = createCenter east;
_this setFriend [west, 0];
_this setFriend [civilian, 0];
_center_1 = _this;

_group_1 = createGroup _center_1;

 

_unit_1 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Soldier_SL_EP1", [8333.0879, 6015.5435], [], 0, "CAN_COLLIDE"];
  _unit_1 = _this;
  _this setDir -57.881279;
  _this setVehicleVarName "guner1";
  guner1 = _this;
  _this setVehicleInit "this MoveInGunner gun1;";
  _this setUnitAbility 0.60000002;
  if (true) then {_group_1 selectLeader _this;};
};

_unit_2 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Soldier_SL_EP1", [8384.0527, 5971.8218, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _unit_2 = _this;
  _this setVehicleInit "this MoveInGunner gun2;";
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_3 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Soldier_SL_EP1", [8380.4658, 5994.8701], [], 0, "CAN_COLLIDE"];
  _unit_3 = _this;
  _this setDir 108.31656;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_4 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Soldier_SL_EP1", [8380.5576, 5995.8911], [], 0, "CAN_COLLIDE"];
  _unit_4 = _this;
  _this setDir 78.154213;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_5 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Soldier_SL_EP1", [8355.9727, 6000.3862, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _unit_5 = _this;
  _this setDir -175.85504;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_6 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Soldier_SL_EP1", [8360.6797, 5999.2939, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _unit_6 = _this;
  _this setDir 95.54171;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_7 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Soldier_SL_EP1", [8337.8174, 6004.7495, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _unit_7 = _this;
  _this setDir 70.031464;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_8 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Soldier_SL_EP1", [8317.127, 5976.9526, -0.00015258789], [], 0, "CAN_COLLIDE"];
  _unit_8 = _this;
  _this setDir -55.314289;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_9 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Soldier_SL_EP1", [8317.2861, 5975.1768], [], 0, "CAN_COLLIDE"];
  _unit_9 = _this;
  _this setDir -98.051659;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

about hero and bandits really dont know,, all this AI are bandits i guess cuz side east is opfor   and blufor (players) are enemys of opfor. 

Link to comment
Share on other sites

you can crate waypoints in arma2 editor for each group of units

see here. script create two pilots and one jet...  and by waypoints say to pilots get in the jet and fly to specific coords

Spoiler

if (isServer) then {

_this = createCenter east;
_center_1 = _this;

_group_1 = createGroup _center_1;


//PILOT 1/// can`t be killed

_unit_1 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["Ins_Soldier_Pilot", [12533.064, 12569.429], [], 0, "CAN_COLLIDE"];
  _unit_1 = _this;
  _this setDir -105.85972;
  _this setVehicleVarName "pilot1";
  pilot1 = _this;
  _this addEventHandler ["handleDamage", {false}];
  _this setUnitAbility 0.60000002;
  if (true) then {_group_1 selectLeader _this;};
};

//PILOT 2// can`t be killed

_unit_2 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["Ins_Soldier_Pilot", [12525.443, 12538.768], [], 0, "CAN_COLLIDE"];
  _unit_2 = _this;
  _this setVehicleVarName "pilot2";
  pilot2 = _this;
  _this addEventHandler ["handleDamage", {false}];
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

//su34// can´t be destroyed

_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["Su34", [12538.105, 12574.021], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setDir -69.253487;
  _this setVehicleVarName "bomber";
  bomber = _this;
  _this addEventHandler ["handleDamage", {false}];
  _this setVehicleAmmo 0;
  _this setVehicleLock "LOCKED";
  _this setPos [12538.105, 12574.021];
};

//Pilots get in jet!!!

_this = _group_1 addWaypoint [[12527.354, 12569.374, -0.00010681152], 0];
_this setWaypointType "GETIN NEAREST";
_waypoint_0 = _this;

_this = _group_1 addWaypoint [[12247.22, 9480.1494], 0];
_waypoint_1 = _this;

 

Link to comment
Share on other sites

Now i have all in  one SQF, all work good, but no AI 

_this = createCenter east;
_this setFriend [west, 0];
_this setFriend [resistance, 0];
_this setFriend [civilian, 0];
_center_1 = _this;

_group_1 = createGroup _center_1;

_group_2 = createGroup _center_1;

_unit_1 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Commander_EP1", [1192.0481,6.0667281,2450.366], [], 0, "CAN_COLLIDE"];
  _unit_1 = _this;
  _this setUnitAbility 0.60000002;
  if (true) then {_group_1 selectLeader _this;};
};

_unit_2 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Commander_EP1", [1192.0481,6.0667281,2450.366], [], 0, "CAN_COLLIDE"];
  _unit_2 = _this;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_3 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Commander_EP1", [1192.0481,6.0667281,2450.366], [], 0, "CAN_COLLIDE"];
  _unit_3 = _this;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_4 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["Ins_Commander", [1192.0481,6.0667281,2450.366], [], 0, "CAN_COLLIDE"];
  _unit_4 = _this;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_6 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Commander_EP1", [1192.0481,6.0667281,2450.366], [], 0, "CAN_COLLIDE"];
  _unit_6 = _this;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_7 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Commander_EP1", [1192.0481,6.0667281,2450.366], [], 0, "CAN_COLLIDE"];
  _unit_7 = _this;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_8 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Commander_EP1", [1192.0481,6.0667281,2450.366], [], 0, "CAN_COLLIDE"];
  _unit_8 = _this;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_9 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Commander_EP1", [1192.0481,6.0667281,2450.366], [], 0, "CAN_COLLIDE"];
  _unit_9 = _this;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_10 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Commander_EP1", [1192.0481,6.0667281,2450.366], [], 0, "CAN_COLLIDE"];
  _unit_10 = _this;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_11 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Commander_EP1", [1192.0481,6.0667281,2450.366], [], 0, "CAN_COLLIDE"];
  _unit_11 = _this;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_12 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["TK_Commander_EP1", [1192.0481,6.0667281,2450.366], [], 0, "CAN_COLLIDE"];
  _unit_12 = _this;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_13 = objNull;
if (true) then
{
  _this = _group_2 createUnit ["RU_Soldier_TL", [1192.0481,6.0667281,2450.366], [], 0, "CAN_COLLIDE"];
  _unit_13 = _this;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_2 selectLeader _this;};
};

_unit_14 = objNull;
if (true) then
{
  _this = _group_2 createUnit ["RU_Soldier_TL", [1192.0481,6.0667281,2450.366], [], 0, "CAN_COLLIDE"];
  _unit_14 = _this;
  _this setUnitAbility 0.60000002;
  if (true) then {_group_2 selectLeader _this;};
};

_unit_15 = objNull;
if (true) then
{
  _this = _group_2 createUnit ["RU_Soldier_TL", [1192.0481,6.0667281,2450.366], [], 0, "CAN_COLLIDE"];
  _unit_15 = _this;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_2 selectLeader _this;};
};

_unit_16 = objNull;
if (true) then
{
  _this = _group_2 createUnit ["TK_Soldier_SL_EP1", [1192.0481,6.0667281,2450.366], [], 0, "CAN_COLLIDE"];
  _unit_16 = _this;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_2 selectLeader _this;};
};


_vehicle_3 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBUAVterminal", [1140.9242, 2527.5955, -2.8610229e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_3 = _this;
  _this setDir 19.009367;
  _this setPos [1140.9242, 2527.5955, -2.8610229e-006];
};

_vehicle_4 = objNull;
if (true) then
{
  _this = createVehicle ["BTR90_HQ_unfolded", [1148.3534, 2537.5293, -5.2452087e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_4 = _this;
  _this setDir 49.521225;
  _this setPos [1148.3534, 2537.5293, -5.2452087e-006];
};

_vehicle_5 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBFieldhHospital", [1175.2413, 2532.1558, -3.8146973e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_5 = _this;
  _this setDir 112.54391;
  _this setPos [1175.2413, 2532.1558, -3.8146973e-006];
};

_vehicle_6 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBVehicleServicePoint", [1141.7616, 2516.4692, 1.3828278e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_6 = _this;
  _this setDir 61.574554;
  _this setPos [1141.7616, 2516.4692, 1.3828278e-005];
};

_vehicle_7 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBLightFactory", [1152.9174, 2499.0522, 3.3378601e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_7 = _this;
  _this setDir -134.45648;
  _this setPos [1152.9174, 2499.0522, 3.3378601e-006];
};

_vehicle_9 = objNull;
if (true) then
{
  _this = createVehicle ["RU_WarfareBContructionSite1", [1180.9768, 2527.0144, -3.3378601e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_9 = _this;
  _this setDir 45.106716;
  _this setPos [1180.9768, 2527.0144, -3.3378601e-006];
};

_vehicle_10 = objNull;
if (true) then
{
  _this = createVehicle ["USMC_WarfareBContructionSite1", [1184.2617, 2525.4026, -2.0980835e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_10 = _this;
  _this setDir 40.023411;
  _this setPos [1184.2617, 2525.4026, -2.0980835e-005];
};

_vehicle_11 = objNull;
if (true) then
{
  _this = createVehicle ["CDF_WarfareBContructionSite", [1187.655, 2522.5811, 1.5258789e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_11 = _this;
  _this setDir 35.707901;
  _this setPos [1187.655, 2522.5811, 1.5258789e-005];
};

_vehicle_12 = objNull;
if (true) then
{
  _this = createVehicle ["Ins_WarfareBContructionSite", [1168.8115, 2535.5857, 1.6212463e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_12 = _this;
  _this setDir 35.446182;
  _this setPos [1168.8115, 2535.5857, 1.6212463e-005];
};

_vehicle_13 = objNull;
if (true) then
{
  _this = createVehicle ["Land_fortified_nest_big", [1163.1637, 2540.0981, -0.046755899], [], 0, "CAN_COLLIDE"];
  _vehicle_13 = _this;
  _this setDir 194.57272;
  _this setPos [1163.1637, 2540.0981, -0.046755899];
};

_vehicle_18 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Misc_Cargo1Eo_EP1", [1148.8073, 2508.8076, -5.2452087e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_18 = _this;
  _this setDir 58.994881;
  _this setPos [1148.8073, 2508.8076, -5.2452087e-006];
};

_vehicle_21 = objNull;
if (true) then
{
  _this = createVehicle ["CampEast_EP1", [1167.3418, 2490.7686, 3.8146973e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_21 = _this;
  _this setDir -144.23048;
  _this setPos [1167.3418, 2490.7686, 3.8146973e-006];
};

_vehicle_25 = objNull;
if (true) then
{
  _this = createVehicle ["CampEast_EP1", [1175.1738, 2485.3459, -6.6757202e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_25 = _this;
  _this setDir -144.23048;
  _this setPos [1175.1738, 2485.3459, -6.6757202e-006];
};

_vehicle_27 = objNull;
if (true) then
{
  _this = createVehicle ["CampEast_EP1", [1193.5358, 2517.5151, -4.7683716e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_27 = _this;
  _this setDir 52.34721;
  _this setPos [1193.5358, 2517.5151, -4.7683716e-006];
};

_vehicle_29 = objNull;
if (true) then
{
  _this = createVehicle ["CampEast_EP1", [1196.8766, 2507.3442, -1.0490417e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_29 = _this;
  _this setDir -284.18365;
  _this setPos [1196.8766, 2507.3442, -1.0490417e-005];
};

_vehicle_32 = objNull;
if (true) then
{
  _this = createVehicle ["Land_fortified_nest_big", [1180.1633, 2476.083, -1.9073486e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_32 = _this;
  _this setDir -327.08746;
  _this setPos [1180.1633, 2476.083, -1.9073486e-006];
};

_vehicle_35 = objNull;
if (true) then
{
  _this = createVehicle ["FlagCarrierINS", [1164.2135, 2518.604, -4.7683716e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_35 = _this;
  _this setPos [1164.2135, 2518.604, -4.7683716e-006];
};

_vehicle_45 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1144.7505, 2574.0779, -1.9073486e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_45 = _this;
  _this setDir 508.3844;
  _this setPos [1144.7505, 2574.0779, -1.9073486e-006];
};

_vehicle_46 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1147.1542, 2573.1001, -0.051214695], [], 0, "CAN_COLLIDE"];
  _vehicle_46 = _this;
  _this setDir 611.89746;
  _this setPos [1147.1542, 2573.1001, -0.051214695];
};

_vehicle_47 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1145.6179, 2571.062, -0.0066490173], [], 0, "CAN_COLLIDE"];
  _vehicle_47 = _this;
  _this setDir 360.93307;
  _this setPos [1145.6179, 2571.062, -0.0066490173];
};

_vehicle_51 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1167.6288, 2441.0178, 7.1525574e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_51 = _this;
  _this setPos [1167.6288, 2441.0178, 7.1525574e-006];
};

_vehicle_52 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1166.0281, 2443.0713, 0.0351758], [], 0, "CAN_COLLIDE"];
  _vehicle_52 = _this;
  _this setDir 103.26068;
  _this setPos [1166.0281, 2443.0713, 0.0351758];
};

_vehicle_53 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1169.3854, 2443.074, 0.011480331], [], 0, "CAN_COLLIDE"];
  _vehicle_53 = _this;
  _this setDir -100.85347;
  _this setPos [1169.3854, 2443.074, 0.011480331];
};

_vehicle_57 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1226.0667, 2477.9319, -5.2452087e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_57 = _this;
  _this setDir -60.552372;
  _this setPos [1226.0667, 2477.9319, -5.2452087e-006];
};

_vehicle_58 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1223.4108, 2477.5032, 0.02704668], [], 0, "CAN_COLLIDE"];
  _vehicle_58 = _this;
  _this setDir 42.708332;
  _this setPos [1223.4108, 2477.5032, 0.02704668];
};

_vehicle_59 = objNull;
if (true) then
{
  _this = createVehicle ["BagFenceRound_DZ", [1225.1349, 2480.3213, 0.025304317], [], 0, "CAN_COLLIDE"];
  _vehicle_59 = _this;
  _this setDir -161.40593;
  _this setPos [1225.1349, 2480.3213, 0.025304317];
};

_vehicle_63 = objNull;
if (true) then
{
  _this = createVehicle ["Land_CamoNetVar_EAST", [1160.8091, 2531.3533, -4.7683716e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_63 = _this;
  _this setPos [1160.8091, 2531.3533, -4.7683716e-006];
};

_vehicle_64 = objNull;
if (true) then
{
  _this = createVehicle ["DSHKM_CDF", [1145.5648, 2572.5664, -3.8146973e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_64 = _this;
  _this setPos [1145.5648, 2572.5664, -3.8146973e-006];
};

_vehicle_65 = objNull;
if (true) then
{
  _this = createVehicle ["DSHKM_CDF", [1167.8104, 2442.728, -1.3828278e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_65 = _this;
  _this setPos [1167.8104, 2442.728, -1.3828278e-005];
};

_vehicle_66 = objNull;
if (true) then
{
  _this = createVehicle ["DSHKM_CDF", [1224.5549, 2478.313, 3.3378601e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_66 = _this;
  _this setPos [1224.5549, 2478.313, 3.3378601e-006];
};

_vehicle_67 = objNull;
if (true) then
{
  _this = createVehicle ["UAZ_MG_INS", [1201.5977, 2454.1587, 3.3378601e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_67 = _this;
  _this setPos [1201.5977, 2454.1587, 3.3378601e-006];
};


_this1 = createMarker ["bandithq", [1160.0741, 2519.1294]];
_this1 setMarkerText "Bandit HQ";
_this1 setMarkerType "mil_dot";
_this1 setMarkerColor "ColorRed";
_this1 setMarkerBrush "Solid";
_marker_0 = _this1;

_box1 = createVehicle ["TKLaunchers_EP1",[1162.7145, 2530.0483, -9.5367432e-007], [], 0, "CAN_COLLIDE"];
[_box1] call spawn_ammo_box;
  clearWeaponCargoGlobal _box1; 
  clearMagazineCargoGlobal _box1; 
 _box1 addWeaponCargoGlobal ["RPG7V",1];  
 _box1 addMagazineCargoGlobal ["PG7V", 1]; 
 _box1 addMagazineCargoGlobal ["OG7", 1];
 

Link to comment
Share on other sites

i made a quick mission for you, so you can test it and start to replace with yours

 

mission1.sqf

Spoiler

if (isServer) then {


//////////////////////////////////AI START HERE///////////////////////////

/////////////////////////////////CENTER AND GROUPS///////////////////////////////
_this = createCenter east;
_center_1 = _this;
_this setFriend [west, 0];
_this setFriend [civilian, 0];

_group_1 = createGroup _center_1;


////AI SKINS ADD MORE SKINS HERE IF U WANT
_ai_skins = ["TK_Commander_EP1","RU_Soldier2","Ins_Soldier_GL","Ins_Soldier_MG","MVD_Soldier_MG","RU_Soldier_MG"] call BIS_fnc_selectRandom;
/////////////////////////////////////////

///////////////////////////////////////IF U WANNA DEFINE ONE TIME THE COORDS USE THIS EXAMPLE//IF U DONT WANT IT, DELETE ALL IN RED//
_coords=[
[7512.604, 7841.4907, -6.1035156e-005],
[7612.604, 7841.4907, -6.1035156e-005],
[7520.604, 7841.4907, 0],
[7522.604, 7841.4907, -0.032172654],
[7412.604, 7841.4907, 0],
[7532.604, 7841.4907, 0]
];
_posrand= floor random count _coords;
_positionai = _coords select _posrand;
/////////////////////////////////////////////////////////


////////////////////////SEE BELLOW AN EXAMPLE TO KNOW WHERE _positionai must be placed for each unit///////////

_unit_1 = objNull;
if (true) then
{
  _this = _group_1 createUnit [_ai_skins, _positionai, [], 0, "CAN_COLLIDE"];
  _unit_1 = _this;
  _this setUnitAbility 0.60000002;
  if (true) then {_group_1 selectLeader _this;};
};
/////////////////////////////////////////////////////////////

 

 

 

////////////////////////////UNITS FOR FIRST GROUP///////////

/////////////////////////////REMEMBER REPLACE COORDS////////////////////
_unit_1 = objNull;
if (true) then
{
  _this = _group_1 createUnit [_ai_skins, [7512.604, 7841.4907, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _unit_1 = _this;
  _this setUnitAbility 0.60000002;
  if (true) then {_group_1 selectLeader _this;};
};

_unit_2 = objNull;
if (true) then
{
  _this = _group_1 createUnit [_ai_skins, [7510.8237, 7840.6348, -0.00021362305], [], 0, "CAN_COLLIDE"];
  _unit_2 = _this;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

_unit_3 = objNull;
if (true) then
{
  _this = _group_1 createUnit [_ai_skins, [7513.3936, 7842.5591, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _unit_3 = _this;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_1 selectLeader _this;};
};

///ADD MORE UNITS FOR THIS GROUP HERE IF U WANT


//////////////////////////////////////////END FIRST GROUP/////////////////

/////////////////////////////////////UNIT FOR SECOND GROUPS/////////////////

/////////////////////////////REMEMBER REPLACE COORDS////////////////////
_group_2 = createGroup _center_1;

_unit_4 = objNull;
if (true) then
{
  _this = _group_2 createUnit [_ai_skins, [7505.7607, 7843.1563, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _unit_4 = _this;
  _this setUnitAbility 0.60000002;
  if (true) then {_group_2 selectLeader _this;};
};

_unit_5 = objNull;
if (true) then
{
  _this = _group_2 createUnit [_ai_skins, [7506.1362, 7845.3545, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _unit_5 = _this;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_2 selectLeader _this;};
};

_unit_6 = objNull;
if (true) then
{
  _this = _group_2 createUnit [_ai_skins, [7504.4556, 7847.8706], [], 0, "CAN_COLLIDE"];
  _unit_6 = _this;
  _this setUnitAbility 0.60000002;
  if (false) then {_group_2 selectLeader _this;};
};
//ADD MORE UNITS HERE FOR THIS GROUP

////////////////////////////////////////END OF SECOND GROUP///////////


///////////////////////////////END OF AI////////////////////////////////////////

 


/////////////START WAYPOINTS////////////////////////////////////////////////////

//////////REPLACE WAYPOINTS WITH YOURS

///////WAYPOINTS FOR 1ST GROUP///////////////////////////////////////////
_this = _group_1 addWaypoint [[7508.7837, 7857.8428, -6.1035156e-005], 0];
_waypoint_0 = _this;

_this = _group_1 addWaypoint [[7509.439, 7863.3584, -0.00012207031], 0];
_this setWaypointType "HOLD";
_waypoint_1 = _this;

/////////////////////END WAYPOINTS FOR 1ST GROUP///////////////////

 

///////WAYPOINTS FOR 2ND GROUP///////////////////////////////////////////

_this = _group_2 addWaypoint [[7510.5923, 7866.0508, 3.0517578e-005], 0];
_waypoint_2 = _this;

_this = _group_2 addWaypoint [[7510.4644, 7865.3599, -0.00012207031], 0];
_this setWaypointType "HOLD";
_waypoint_3 = _this;

/////////////////////END WAYPOINTS FOR 2nd GROUP///////////////////

 

////////WAYPOINTS FOR 3rd group/////////////

///

///

/////////////end 3rd group waypoints////////


/////////////////////////////WAYPOINTS END/////////////////////

 

 

//////////////////////BUILDINGS AND VEHICLES START////////////////////////////

///////////////////////////////REPLACE WITH YOURS////////////////////////
_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_CamoNet_NATO_var1", [7513.5156, 7871.8867, -9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setDir -86.294701;
  _this setPos [7513.5156, 7871.8867, -9.1552734e-005];
};

_vehicle_1 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Barbedwire", [7511.5366, 7865.3247, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_1 = _this;
  _this setPos [7511.5366, 7865.3247, 3.0517578e-005];
};

_vehicle_2 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Barbedwire", [7511.3945, 7878.7432, -9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_2 = _this;
  _this setPos [7511.3945, 7878.7432, -9.1552734e-005];
};
/////////////////////////////////END OF BUILD AND VEH//////////////////////////////

 

 

/////////////////////THE CRATE START HEREe///////////////////////////////////////////////////

/////////CONFIG AMMO CRATE LOOT ADD ANY KIND OF ITEMS.  // WEAPONS AND TOOLS CANNOT SHARE CATEGORIES WITH ITEMS /////////////
_variete = ["ItemSodaOrangeSherbet","HandGrenade_west","ItemSodaEmpty","ItemTrashRazor","ItemTrashToiletpaper","TrashJackDaniels","TrashTinCan","ItemOilBarrel","ItemFuelBarrel","ItemBriefcase50oz","ItemAluminumBar10oz","FoodSteakRaw","ItemWaterbottle","ItemAntibiotic","ItemBloodbag","ItemEpinephrine","ItemMorphine","ItemCanvas","MortarBucket","ItemLightBulb","PartWheel","ItemTent","ItemTentOld","Skin_FR_OHara_DZ","ItemGenerator","ItemComboLock","ItemMixOil","ItemKiloHemp","ItemSandbag","30Rnd_556x45_StanagSD","100Rnd_762x54_PK","20Rnd_762x51_DMR","PartGlass","ItemRuby"] call BIS_fnc_selectRandom;
_stone = ["CinderBlocks","MortarBucket","PartOreSilver"] call BIS_fnc_selectRandom;
_wood = ["PartPlywoodPack","PartWoodPile","PartWoodLumber"] call  BIS_fnc_selectRandom;
_farm =  ["FoodchickenRaw","FoodCanCorn","FoodrabbitRaw","ItemKiloHemp","FoodCanCurgon"] call BIS_fnc_selectRandom;
_aiweapon = ["M16A2","M4A1"] call BIS_fnc_selectRandom;
///////////////////////////////////////////////////////////////////


//////////////CRATE MODELS //ADD CRATES ID TO MAKE A RANDOM CHOOSE//////////////////////////
_cratemodels=["USBasicWeapons_EP1","LocalBasicAmmunitionBox"] call BIS_fnc_selectRandom;
/////////////////////////////////////////////////////////////////////////////////////////////


//THE CRATE////////////////////

/////////////////////////////REMEMBER REPLACE COORDS////////////////////
_crate1 = objNull;
            if (true) then{
               

                _this = createVehicle [_cratemodels, [7515.002, 7867.0615, -0.00021362305], [], 0, "CAN_COLLIDE"];
                _crate1 = _this;
               
                 clearWeaponCargoGlobal _crate1;
                 clearMagazineCargoGlobal _crate1;      
                 _crate1 addWeaponCargoGlobal [_aiweapon, 1];
                 _crate1 addmagazinecargoglobal [_variete, 2];
                 _crate1 addmagazinecargoglobal [_wood, 5];
                 _crate1 addmagazinecargoglobal [_stone, 3];
                 _crate1 addmagazinecargoglobal [_farm, 3];
                 _crate1 setVariable ["permaLoot",true];//this line prevent crate despawn when server time is higer
            };

/////////////////////////////////END CRATE//////////////////

 

 

};

 

for the markers.. create a new sqf

missionmarkers.sqf

Spoiler

////////REPLACE BY YOURS

_this = createMarker ["mission", [7518.125, 7861.5762, -0.00033569336]];
_this setMarkerText "mission";
_this setMarkerType "Warning";
_this setMarkerColor "ColorRed";
_this setMarkerBrush "Solid";
_this setMarkerSize [0.5, 0.5];
_marker_100 = _this;

 

*Now put this 2 sqfs into mpmissions\instance_11.chernarus\missions\

*Go to your init.sqf at bottom paste:

//my mssions//
[] execVM "missions\missionmarkers.sqf";
[] execVM "missions\mission1.sqf";

 

Link to comment
Share on other sites

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
  • Advertisement
  • Discord

×
×
  • Create New...