Super Jerome

[Guide] Creating DMS static AI mission

63 posts in this topic

I added a section within my Exile Server Owner Guide for creating your own DMS static AI mission. You will need the sample mission files as well.

Sample_Mission

Sample_Objects

*Please read the guide before changing anything. I explain everthing you need to do.*

Edited by Super Jerome
Added spawning helicopter AI
  • Like 6

Share this post


Link to post
Share on other sites
Advertisement

Ok few questions... lol

////////////////////////////////
Q1) If I wanted more than one crate, would I do it like this...
////////////////////////////////
DMS_CrateCase_SuperGear1 =
[
    [
        "CUP_launch_Igla",
        "CUP_launch_Igla"
    ],
    [
        "CUP_Igla_M",
        "CUP_Igla_M"
    ],
    [
        "B_Carryall_oli",
        "B_ViperHarness_oli_F"
    ]
];

DMS_CrateCase_SuperGear2 =
[
    [
        "CUP_launch_Igla",
        "CUP_launch_Igla"
    ],
    [
        "CUP_Igla_M",
        "CUP_Igla_M"
    ],
    [
        "B_Carryall_oli",
        "B_ViperHarness_oli_F"
    ]
];

// Crate 1
private _crate1 = ["Exile_Container_SupplyBox",[0,0,0]] call DMS_fnc_SpawnCrate;
_crate1 setPosATL [54321,54321,21]; // *Change This*
_crate1 setVariable ["DMS_AllowSmoke", true];
[_crate1, "SuperGear1"] call DMS_fnc_FillCrate;

// Crate 2
private _crate2 = ["Exile_Container_SupplyBox",[0,0,0]] call DMS_fnc_SpawnCrate;
_crate2 setPosATL [12345,12345,12]; // *Change This*
_crate2 setVariable ["DMS_AllowSmoke", true];
[_crate2, "SuperGear2"] call DMS_fnc_FillCrate;


////////////////////////////////
Q2) If I wanted a C130 instad of a Heli...
////////////////////////////////

Would I still use:
private _heli1 =

but change the heli to....
["CUP_I_C130J_RACS",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;


////////////////////////////////
Q3) Can I just change this to what ever weapon I like?...
////////////////////////////////
private _AIGearSet =
[
    "CUP_lmg_L110A1", // "Weapon"
    

////////////////////////////////
Q4) If I use this code would the AI not bunch in the center?...
////////////////////////////////


//////////////////////////////////////////////////////////////////////////////////////////////
//////////// The below group spawns multiple AI around a specific position. You can utilize
//////////// this if you have a big open area you just want AI to spawn around. The number
//////////// "5" states how many AI will spawn in this area.
//////////////////////////////////////////////////////////////////////////////////////////////
/*
private _SniperGroup =
[
    [13137.7,10329.7,0],
    5,
    "hardcore",
    "sniper",
    "bandit"
] call DMS_fnc_SpawnAIGroup;
*/


or do I use this to keep them there?....
// Uncomment this if you don't want your AI wandering around.
/*
{
    _x disableAI "PATH";
} forEach (units _AIGroup);
*/

Edited by Liqu1dShadow

Share this post


Link to post
Share on other sites

@Liqu1dShadow Ok, that's alot I will do my best to answer.

1. Yes, that is exactly what you would do to create another crate.

2. If you want a C130 just replace the class name inside of the quotation marks,  _heli1 is does not mean it will spawn a helicopter it is just a way to for the script to track vehicles.

3. I don't think you read the guide carefully, I explain you can change the class names of the weapons it it.

4. Using the group AI spawner, the AI will spawn within 10 meters of each other. The AI path removal only works for the _AIGroup and not the _SniperGroup. Just look at the name of the group it states.

It appears that you just took the Sample_Mission without reading the guide. Most of these questions can be answered by reading the section in the guide.

  • Like 1

Share this post


Link to post
Share on other sites

I read the guide, three times lol. First thing I did, then looked at the mission example.

Currently going through it now putting a mission in.

Last question I hope as I couldn't find the answer...

 

1) If I want 9 groups killed to finish the mission allowing the 10th group to still be alive, do I do this?...

// Parse and add mission info to missions monitor
_added =
[
    _pos,
    [
        [
            "kill",
            _AIGroup1,
            _AIGroup2,
            _AIGroup3,
            _AIGroup4,
            _AIGroup5,
            _AIGroup6,
            _AIGroup7,
            _AIGroup8,
            _AIGroup9          // _AIGroup10 are outside the wall and its too much agro to go kill them
        ],
        [
            "playerNear",
            [_crate,40]
        ]

Share this post


Link to post
Share on other sites

Ok so this is what I have, I am so hoping I have understood it properly

  • 10 AI groups,
  • 9 That need to be killed to complete mission
  • 1 Gunner emplacements
  • Reward heli
  • Reward ural
  • 4 Gear crates

I have left coordinates as [xxxxx,xxxxx,xx] as I haven't put them in yet, and left the gear crates with place holder names as I need to put items in them.

Any glaring mistakes?

Spoiler

/*
    "Sample Mission" mission for any map.
    Created by Super J
*/

// For logging purposes
_num = DMS_MissionCount;


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

_pos = [xxxxx,xxxxx,xx]; // *Change This* This is where your Missions Marker will be

_difficulty = "hardcore";

//////////////////////////////////////////////////////////////////////////////////////////////
//////////// We will create our own gear crate. It is best to pull items that are actually
//////////// within your trader tables. Otherwise you risk putting items in your server you
//////////// might not actually want or don't exist.
//////////////////////////////////////////////////////////////////////////////////////////////
DMS_CrateCase_SuperGear1 =
[
    [
        "Weapon Name",
        "Weapon Name",
        "Weapon Name"
    ],
    [
        "Magazine/Item Name",
        "Magazine/Item Name",
        "Magazine/Item Name"
    ],
    [
        "backpack Name",
        "backpack Name",
        "backpack Name"
    ]
];

DMS_CrateCase_SuperGear2 =
[
    [
        "Weapon Name",
        "Weapon Name",
        "Weapon Name"
    ],
    [
        "Magazine/Item Name",
        "Magazine/Item Name",
        "Magazine/Item Name"
    ],
    [
        "backpack Name",
        "backpack Name",
        "backpack Name"
    ]
];

DMS_CrateCase_SuperGear3 =
[
    [
        "Weapon Name",
        "Weapon Name",
        "Weapon Name"
    ],
    [
        "Magazine/Item Name",
        "Magazine/Item Name",
        "Magazine/Item Name"
    ],
    [
        "backpack Name",
        "backpack Name",
        "backpack Name"
    ]
];

DMS_CrateCase_SuperGear4 =
[
    [
        "Weapon Name",
        "Weapon Name",
        "Weapon Name"
    ],
    [
        "Magazine/Item Name",
        "Magazine/Item Name",
        "Magazine/Item Name"
    ],
    [
        "backpack Name",
        "backpack Name",
        "backpack Name"
    ]
];

// This is our actual crate you can disable or enable smoke
private _crate1 = ["Exile_Container_SupplyBox",[0,0,0]] call DMS_fnc_SpawnCrate;
_crate1 setPosATL [xxxxx,xxxxx,xx]; // *Change This*
_crate1 setVariable ["DMS_AllowSmoke", true];
[_crate1, "SuperGear1"] call DMS_fnc_FillCrate;

private _crate2 = ["Exile_Container_SupplyBox",[0,0,0]] call DMS_fnc_SpawnCrate;
_crate2 setPosATL [xxxxx,xxxxx,xx]; // *Change This*
_crate2 setVariable ["DMS_AllowSmoke", true];
[_crate2, "SuperGear2"] call DMS_fnc_FillCrate;

private _crate3 = ["Exile_Container_SupplyBox",[0,0,0]] call DMS_fnc_SpawnCrate;
_crate3 setPosATL [xxxxx,xxxxx,xx]; // *Change This*
_crate3 setVariable ["DMS_AllowSmoke", true];
[_crate3, "SuperGear3"] call DMS_fnc_FillCrate;

private _crate4 = ["Exile_Container_SupplyBox",[0,0,0]] call DMS_fnc_SpawnCrate;
_crate4 setPosATL [xxxxx,xxxxx,xx]; // *Change This*
_crate4 setVariable ["DMS_AllowSmoke", true];
[_crate4, "SuperGear4"] call DMS_fnc_FillCrate;

//////////////////////////////////////////////////////////////////////////////////////////////
//////////// If you do not want vehicles to be a reward for completing mission comment this
//////////// section out. Make sure to remove the lines in mission objective as well. You can
//////////// add as many vehicles as you want as long as they all have thier own private name.
//////////////////////////////////////////////////////////////////////////////////////////////
private _heli1 = ["CUP_O_C130J_TKA",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
_heli1 setDir (0);
_heli1 setPosATL [xxxxx,xxxxx,xx];
_heli1 setVariable ["DMS_AllowSmoke", false];

private _truck1 = ["CUP_I_Ural_UN",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
_truck1 setDir (300);
_truck1 setPosATL [xxxxx,xxxxx,xx];
_truck1 setVariable ["DMS_AllowSmoke", false];

private _truck2 = ["CUP_I_Ural_UN",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
_truck2 setDir (300);
_truck2 setPosATL [xxxxx,xxxxx,xx];
_truck2 setVariable ["DMS_AllowSmoke", false];

private _truck3 = ["CUP_I_Ural_UN",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
_truck3 setDir (300);
_truck3 setPosATL [xxxxx,xxxxx,xx];
_truck3 setVariable ["DMS_AllowSmoke", false];

 

private _AIGearSet =
[
    "CUP_lmg_L110A1", // "Weapon"
    [],
    [["CUP_200Rnd_TE4_Red_Tracer_556x45_L110A1",3]], // "Ammo","clips"
    "",
    [],
    ["Rangefinder","ItemGPS","NVGoggles"],
    "",
    "H_HelmetSpecO_blk", // "Helmet"
    "U_O_SpecopsUniform_blk", // "Uniform"
    "V_PlateCarrierSpec_blk", // "Vest"
    "B_TacticalPack_blk"    // "Backpack"
];


private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup1 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    3,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup2 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    3,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup3 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    5,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup4 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    3,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup5 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    6,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup6 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    3,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup7 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    3,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup8 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    4,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup9 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    2,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup10 =
[
    [    
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],    
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],    
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],    
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],    
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx]
    ],
    19,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

 

// Static gun emplacements

private _staticGuns =
[
    [
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    _AIGroup11,
    "assault",
    _difficulty,
    "bandit",
    "random"
] call DMS_fnc_SpawnAIStaticMG;


// Define mission-spawned AI Units
_missionAIUnits =
[
    _AIGroup1
    _AIGroup2
    _AIGroup3
    _AIGroup4
    _AIGroup5
    _AIGroup6
    _AIGroup7
    _AIGroup8
    _AIGroup9     
    _AIGroup10
    _AIGroup11    
    //_SniperGroup // Uncomment if using Snipers and make sure to put a comma after _AIGroup
];


// Define mission-spawned objects and loot values. You can pull the DMS class names out of config.sqf.
_missionObjs =
[    
    [],
    [_heli1, _truck1],
    [
        [
            _heli1,
            [
                1,
                [2,DMS_sniper_weps],
                1
            ]
        ],
        [
            _truck1,
            [
                1,
                [2,DMS_sniper_weps],
                1
            ]
        ],
        [
            _truck2,
            [
                1,
                [2,DMS_sniper_weps],
                1
            ]
        ],
        [
            _truck3,
            [
                1,
                [2,DMS_sniper_weps],
                1
            ]
        ]        
    ]
];

// Define Mission Start message
_msgStart = ['#FFFF00', "Reports show activity in Sector B, a lot of high end goods are moving through"]; // *Change This*

// Define Mission Win message
_msgWIN = ['#0080ff',"Sector B is now complete, no PVP at this location until next restart"]; // *Change This*

// Define Mission Lose message
_msgLOSE = ['#FF0000',"Looks like the Sector B guards moved their goods without trouble"]; // *Change This*

// Define mission name (for map marker and logging)
_missionName = "Sector B"; // *Change This*

// Create Markers
_markers =
[
    _pos,
    _missionName,
    "hardcore"
] 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",
            _AIGroup
            _AIGroup1
            _AIGroup2
            _AIGroup3
            _AIGroup4
            _AIGroup5
            _AIGroup6
            _AIGroup7
            _AIGroup8
            _AIGroup9            // No AI Group 10 as they are outside the wall and its too much agro to go kill them
        ],
        [
            "playerNear",
            [_crate1,40],[_crate2,40],[_crate3,40],[_crate4,40]
        ]
    ],
    _groupReinforcementsInfo,
    [
        _time,
        DMS_StaticMissionTimeOut call DMS_fnc_SelectRandomVal
    ],
    _missionAIUnits,
    _missionObjs,
    [_missionName,_msgWIN,_msgLOSE],
    _markers,
    _side,
    "hardcore",
    [],
    [
        [
            [
                _heli1,
                {_this setVariable ["ExileMoney",25000,true]}                       // The helicopter will have 25,000 poptabs after the mission completes. The capacity is actually 5000, but I just overload it.
            ]
        ],
        [],
        {},
        {}
    ]
] call DMS_fnc_AddMissionToMonitor_Static;

// 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_fnc_AddMissionToMonitor_Static! Deleting mission objects and resetting DMS_MissionCount.",_missionName];

    _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,26,"hardcore",_time]) call DMS_fnc_DebugLog;
};

 

 

Edited by Liqu1dShadow

Share this post


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

Ok so this is what I have, I am so hoping I have understood it properly

  • 10 AI groups,
  • 9 That need to be killed to complete mission
  • 1 Gunner emplacements
  • Reward heli
  • Reward ural
  • 4 Gear crates

I have left coordinates as [xxxxx,xxxxx,xx] as I haven't put them in yet, and left the gear crates with place holder names as I need to put items in them.

Any glaring mistakes?

  Reveal hidden contents

/*
    "Sample Mission" mission for any map.
    Created by Super J
*/

// For logging purposes
_num = DMS_MissionCount;


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

_pos = [xxxxx,xxxxx,xx]; // *Change This* This is where your Missions Marker will be

_difficulty = "hardcore";

//////////////////////////////////////////////////////////////////////////////////////////////
//////////// We will create our own gear crate. It is best to pull items that are actually
//////////// within your trader tables. Otherwise you risk putting items in your server you
//////////// might not actually want or don't exist.
//////////////////////////////////////////////////////////////////////////////////////////////
DMS_CrateCase_SuperGear1 =
[
    [
        "Weapon Name",
        "Weapon Name",
        "Weapon Name"
    ],
    [
        "Magazine/Item Name",
        "Magazine/Item Name",
        "Magazine/Item Name"
    ],
    [
        "backpack Name",
        "backpack Name",
        "backpack Name"
    ]
];

DMS_CrateCase_SuperGear2 =
[
    [
        "Weapon Name",
        "Weapon Name",
        "Weapon Name"
    ],
    [
        "Magazine/Item Name",
        "Magazine/Item Name",
        "Magazine/Item Name"
    ],
    [
        "backpack Name",
        "backpack Name",
        "backpack Name"
    ]
];

DMS_CrateCase_SuperGear3 =
[
    [
        "Weapon Name",
        "Weapon Name",
        "Weapon Name"
    ],
    [
        "Magazine/Item Name",
        "Magazine/Item Name",
        "Magazine/Item Name"
    ],
    [
        "backpack Name",
        "backpack Name",
        "backpack Name"
    ]
];

DMS_CrateCase_SuperGear4 =
[
    [
        "Weapon Name",
        "Weapon Name",
        "Weapon Name"
    ],
    [
        "Magazine/Item Name",
        "Magazine/Item Name",
        "Magazine/Item Name"
    ],
    [
        "backpack Name",
        "backpack Name",
        "backpack Name"
    ]
];

// This is our actual crate you can disable or enable smoke
private _crate1 = ["Exile_Container_SupplyBox",[0,0,0]] call DMS_fnc_SpawnCrate;
_crate1 setPosATL [xxxxx,xxxxx,xx]; // *Change This*
_crate1 setVariable ["DMS_AllowSmoke", true];
[_crate1, "SuperGear1"] call DMS_fnc_FillCrate;

private _crate2 = ["Exile_Container_SupplyBox",[0,0,0]] call DMS_fnc_SpawnCrate;
_crate2 setPosATL [xxxxx,xxxxx,xx]; // *Change This*
_crate2 setVariable ["DMS_AllowSmoke", true];
[_crate2, "SuperGear2"] call DMS_fnc_FillCrate;

private _crate3 = ["Exile_Container_SupplyBox",[0,0,0]] call DMS_fnc_SpawnCrate;
_crate3 setPosATL [xxxxx,xxxxx,xx]; // *Change This*
_crate3 setVariable ["DMS_AllowSmoke", true];
[_crate3, "SuperGear3"] call DMS_fnc_FillCrate;

private _crate4 = ["Exile_Container_SupplyBox",[0,0,0]] call DMS_fnc_SpawnCrate;
_crate4 setPosATL [xxxxx,xxxxx,xx]; // *Change This*
_crate4 setVariable ["DMS_AllowSmoke", true];
[_crate4, "SuperGear4"] call DMS_fnc_FillCrate;

//////////////////////////////////////////////////////////////////////////////////////////////
//////////// If you do not want vehicles to be a reward for completing mission comment this
//////////// section out. Make sure to remove the lines in mission objective as well. You can
//////////// add as many vehicles as you want as long as they all have thier own private name.
//////////////////////////////////////////////////////////////////////////////////////////////
private _heli1 = ["CUP_O_C130J_TKA",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
_heli1 setDir (0);
_heli1 setPosATL [xxxxx,xxxxx,xx];
_heli1 setVariable ["DMS_AllowSmoke", false];

private _truck1 = ["CUP_I_Ural_UN",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
_truck1 setDir (300);
_truck1 setPosATL [xxxxx,xxxxx,xx];
_truck1 setVariable ["DMS_AllowSmoke", false];

private _truck2 = ["CUP_I_Ural_UN",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
_truck2 setDir (300);
_truck2 setPosATL [xxxxx,xxxxx,xx];
_truck2 setVariable ["DMS_AllowSmoke", false];

private _truck3 = ["CUP_I_Ural_UN",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
_truck3 setDir (300);
_truck3 setPosATL [xxxxx,xxxxx,xx];
_truck3 setVariable ["DMS_AllowSmoke", false];

 

private _AIGearSet =
[
    "CUP_lmg_L110A1", // "Weapon"
    [],
    [["CUP_200Rnd_TE4_Red_Tracer_556x45_L110A1",3]], // "Ammo","clips"
    "",
    [],
    ["Rangefinder","ItemGPS","NVGoggles"],
    "",
    "H_HelmetSpecO_blk", // "Helmet"
    "U_O_SpecopsUniform_blk", // "Uniform"
    "V_PlateCarrierSpec_blk", // "Vest"
    "B_TacticalPack_blk"    // "Backpack"
];


private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup1 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    3,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup2 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    3,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup3 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    5,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup4 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    3,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup5 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    6,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup6 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    3,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup7 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    3,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup8 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    4,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup9 =
[
    [    
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    2,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _AIGroup10 =
[
    [    
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],    
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],    
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],    
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],    
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx],
    [xxxxx,xxxxx,xx]
    ],
    19,
    "hardcore",
    "custom",
    _side,
    _AIGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

 

// Static gun emplacements

private _staticGuns =
[
    [
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx],
        [xxxxx,xxxxx,xx]
    ],
    _AIGroup11,
    "assault",
    _difficulty,
    "bandit",
    "random"
] call DMS_fnc_SpawnAIStaticMG;


// Define mission-spawned AI Units
_missionAIUnits =
[
    _AIGroup1
    _AIGroup2
    _AIGroup3
    _AIGroup4
    _AIGroup5
    _AIGroup6
    _AIGroup7
    _AIGroup8
    _AIGroup9     
    _AIGroup10
    _AIGroup11    
    //_SniperGroup // Uncomment if using Snipers and make sure to put a comma after _AIGroup
];


// Define mission-spawned objects and loot values. You can pull the DMS class names out of config.sqf.
_missionObjs =
[    
    [],
    [_heli1, _truck1],
    [
        [
            _heli1,
            [
                1,
                [2,DMS_sniper_weps],
                1
            ]
        ],
        [
            _truck1,
            [
                1,
                [2,DMS_sniper_weps],
                1
            ]
        ],
        [
            _truck2,
            [
                1,
                [2,DMS_sniper_weps],
                1
            ]
        ],
        [
            _truck3,
            [
                1,
                [2,DMS_sniper_weps],
                1
            ]
        ]        
    ]
];

// Define Mission Start message
_msgStart = ['#FFFF00', "Reports show activity in Sector B, a lot of high end goods are moving through"]; // *Change This*

// Define Mission Win message
_msgWIN = ['#0080ff',"Sector B is now complete, no PVP at this location until next restart"]; // *Change This*

// Define Mission Lose message
_msgLOSE = ['#FF0000',"Looks like the Sector B guards moved their goods without trouble"]; // *Change This*

// Define mission name (for map marker and logging)
_missionName = "Sector B"; // *Change This*

// Create Markers
_markers =
[
    _pos,
    _missionName,
    "hardcore"
] 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",
            _AIGroup
            _AIGroup1
            _AIGroup2
            _AIGroup3
            _AIGroup4
            _AIGroup5
            _AIGroup6
            _AIGroup7
            _AIGroup8
            _AIGroup9            // No AI Group 10 as they are outside the wall and its too much agro to go kill them
        ],
        [
            "playerNear",
            [_crate1,40],[_crate2,40],[_crate3,40],[_crate4,40]
        ]
    ],
    _groupReinforcementsInfo,
    [
        _time,
        DMS_StaticMissionTimeOut call DMS_fnc_SelectRandomVal
    ],
    _missionAIUnits,
    _missionObjs,
    [_missionName,_msgWIN,_msgLOSE],
    _markers,
    _side,
    "hardcore",
    [],
    [
        [
            [
                _heli1,
                {_this setVariable ["ExileMoney",25000,true]}                       // The helicopter will have 25,000 poptabs after the mission completes. The capacity is actually 5000, but I just overload it.
            ]
        ],
        [],
        {},
        {}
    ]
] call DMS_fnc_AddMissionToMonitor_Static;

// 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_fnc_AddMissionToMonitor_Static! Deleting mission objects and resetting DMS_MissionCount.",_missionName];

    _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,26,"hardcore",_time]) call DMS_fnc_DebugLog;
};

 

 

Looks good, however, why so many groups? Why not just have all your AI in the same group and change the positions accordingly. 

  • Like 1

Share this post


Link to post
Share on other sites

When did that all the AI ran to the middle of the mission and bunched up.

 

one RPG from a building and 80% were killed. so I need to keep them in the areas of the island. I thought this was the only way of doing it

Share this post


Link to post
Share on other sites

@Liqu1dShadow Wait I was wrong your mission objectives is wrong

This:

Quote

_ _missionObjs =
[    
    [],
    [_heli1, _truck1],
    [
        [
            _heli1,
            [
                1,
                [2,DMS_sniper_weps],
                1
            ]
        ],
        [
            _truck1,
            [
                1,
                [2,DMS_sniper_weps],
                1
            ]
        ],
        [
            _truck2,
            [
                1,
                [2,DMS_sniper_weps],
                1
            ]
        ],
        [
            _truck3,
            [
                1,
                [2,DMS_sniper_weps],
                1
            ]
        ]        
    ]
];

Should be:

Quote

_missionObjs =
[    
    [],
    [_heli1, _truck1, _truck2, _truck3],
    [
        [
            _heli1,
            [
                1,
                [2,DMS_sniper_weps],
                1
            ]
        ],
        [
            _truck1,
            [
                1,
                [2,DMS_sniper_weps],
                1
            ]
        ],
        [
            _truck2,
            [
                1,
                [2,DMS_sniper_weps],
                1
            ]
        ],
        [
            _truck3,
            [
                1,
                [2,DMS_sniper_weps],
                1
            ]
        ]        
    ]
];

Here's a section from one of my other missions:

Quote

_missionObjs =
[
    [],
    [_heli1, _truck1, _truck2, _truck3, _truck4, _truck5, _truck6],
    [
        [
            _heli1,
            [
                1,
                [2,DMS_Box_BaseParts_Concrete],
                1
            ]
        ],       
        [
            _truck1,
            [
                1,
                [2,DMS_Box_BaseParts_Concrete],
                1
            ]
        ],
        [
            _truck2,
            [
                [2,DMS_sniper_weps],                // Spawn a random 5 weapons that AI snipers can spawn with.
                [5,DMS_BoxSurvivalSupplies],
                1
            ]
        ],
        [
            _truck3,
            [
                1,
                [2,DMS_Box_BaseParts_Concrete],
                1
            ]
        ],
        [
            _truck4,
            [
                [2,DMS_sniper_weps],                // Spawn a random 5 weapons that AI snipers can spawn with.
                [5,DMS_BoxSurvivalSupplies],
                1
            ]
        ],
        [
            _truck5,
            [
                1,
                [2,DMS_Box_BaseParts_Concrete],
                1
            ]
        ],
        [
            _truck6,
            [
                [2,DMS_sniper_weps],                // Spawn a random 5 weapons that AI snipers can spawn with.
                [5,DMS_BoxSurvivalSupplies],
                1
            ]
        ]    
    ],

 

  • Like 1

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

  • Recently Browsing   0 members

    No registered users viewing this page.