• 0
Sign in to follow this  
geekm0nkey

DMS Water Stash

Question

3 answers to this question

  • 0

What map is this on? Post your mission in a spoiler. I think you have your mission set up wrong. Here is what I use for Altis.

 

Spoiler

/*
    "Underwater Stash" mission for Altis
    Created by Super J
*/

// For logging purposes
_num = DMS_MissionCount;


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

_pos = [19000,21729,0];

// This mission should spawn on server start. Otherwise, if somebody is dumb enough to wait for it to spawn, then they're gonna get killed lol.
if ([_pos,DMS_StaticMinPlayerDistance] call DMS_fnc_IsPlayerNearby) exitWith {"delay"};


DMS_CrateCase_DiverGear =
[
    [
        "arifle_SDAR_F",
        "arifle_SDAR_F",
        "arifle_SDAR_F",
        "arifle_SDAR_F",
        "arifle_SDAR_F",
        "launch_RPG32_F",
        "launch_Titan_F",
        "CUP_launch_Javelin",
        "CUP_launch_NLAW"
    ],
    [
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",        
        "RPG32_HE_F",
        "RPG32_HE_F",
        "RPG32_HE_F",
        "RPG32_HE_F",
        "RPG32_HE_F",        
        "Titan_AA",
        "Titan_AA",
        "Titan_AA",
        "Titan_AA",
        "Titan_AA",
        "CUP_Javelin_M",
        "CUP_Javelin_M",
        "CUP_Javelin_M",
        "CUP_Javelin_M",
        "CUP_NLAW_M",
        "CUP_NLAW_M",
        "CUP_NLAW_M",
        "CUP_NLAW_M",
        "CUP_NLAW_M",
        "Exile_Item_Knife",
        "Exile_Item_Knife",
        "Exile_Item_Knife",
        "Exile_Item_Knife",
        "U_O_Wetsuit",
        "U_O_Wetsuit",
        "U_O_Wetsuit",
        "U_O_Wetsuit",
        "U_O_Wetsuit",
        "V_RebreatherIA",
        "V_RebreatherIA",
        "V_RebreatherIA",
        "V_RebreatherIA",
        "V_RebreatherIA"
    ],
    [
        "B_Carryall_oli",
        "B_Bergen_tna_F",
        "B_ViperHarness_oli_F"
    ]
];

// I only made some of the variables in this file "private" because I couldn't bother making all of them private :P
private _crate = ["Exile_Container_SupplyBox",[19000,21729,0]] call DMS_fnc_SpawnCrate;
_crate setVariable ["DMS_AllowSmoke", false];


[_crate, "DiverGear"] call DMS_fnc_FillCrate;

private _sub1 = ["Exile_Boat_SDV_CSAT",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
_sub1 setPosATL [19003.855,21731.86,4.562];
_sub1 setVariable ["DMS_AllowSmoke", false];

private _sub2 = ["Exile_Boat_SDV_CSAT",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
_sub2 setPosATL [18992.242,21730.32,3.571];
_sub2 setVariable ["DMS_AllowSmoke", false];

private _diverGearSet =
[
    "arifle_SDAR_F",
    [],
    [["20Rnd_556x45_UW_mag",6]],
    "",
    [],
    ["Rangefinder","ItemGPS","NVGoggles"],
    "",
    "",
    "U_O_Wetsuit",
    "V_RebreatherIA",
    "B_Bergen_mcamo"
];


private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _diverGroup =
[
    [
        [18999.1,21743.2,-119.154],
        [19000.2,21723.1,-117.065],
        [19013,21728.6,-111.065],
        [18982.4,21733.7,-112.813],
        [18999.6,21730.4,-96.4277]
    ],
    5,
    "hardcore",
    "custom",
    _side,
    _diverGearSet
] call DMS_fnc_SpawnAIGroup_MultiPos;

DMS_ai_use_launchers = _temp;


{
    _x disableAI "PATH";
} forEach (units _diverGroup);


/*
private _landGroup =
[
    [12787.96,9659.30,0],
    5,
    "hardcore",
    "sniper",
    "bandit"
] call DMS_fnc_SpawnAIGroup;

*/

// Define mission-spawned AI Units
_missionAIUnits =
[
    _diverGroup       
    //_landGroup
];

// Define the group reinforcements
_groupReinforcementsInfo =
[
    // Removed reinforcements for this because while I was testing the mission the AI took too long to get back to the objective, and that's annoying
    /*
    [
        _diverGroup,            // pass the group
        [
            [
                -1,     // Let's limit number of units instead...
                0
            ],
            [
                10,     // Maximum 10 units can be given as reinforcements.
                0
            ]
        ],
        [
            180,        // About a 3 minute delay between reinforcements.
            diag_tickTime
        ],
        [
            [5810,2874,1],
            [5933,2912,2],
            [5862,3132,0.5]
        ],
        "custom",
        "hardcore",
        _side,
        "reinforce",
        [
            5,          // Reinforcements will only trigger if there's fewer than 5 members left in the group
            3           // 3 reinforcement units per wave.
        ],
        _diverGearSet
    ]
    */
];

// Define mission-spawned objects and loot values
_missionObjs =
[
    [],
    [_sub1, _sub2],
    [
        [
            _sub1,
            [
                1,
                [2,DMS_Box_BaseParts_Concrete],
                1
            ]
        ],
        [
            _sub2,
            [
                [2,DMS_sniper_weps],                // Spawn a random 5 weapons that AI snipers can spawn with.
                [5,DMS_BoxSurvivalSupplies],
                1
            ]
        ]
    ]
];

// Define Mission Start message
_msgStart = ['#FFFF00', "The CSAT are storing money and supplies in an underwater stash! Eliminate them and take the supplies!"];

// Define Mission Win message
_msgWIN = ['#0080ff',"Convicts have successfully eliminated the CSAT and obtained the underwater stash!"];

// Define Mission Lose message
_msgLOSE = ['#FF0000',"Seems like CSAT forces moved their stash away..."];

// Define mission name (for map marker and logging)
_missionName = "Underwater Stash";

// 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",
            _diverGroup              // Only need to kill the diver group.
        ],
        [
            "playerNear",
            [_sub1,40]
        ]
    ],
    _groupReinforcementsInfo,
    [
        _time,
        DMS_StaticMissionTimeOut call DMS_fnc_SelectRandomVal
    ],
    _missionAIUnits,
    _missionObjs,
    [_missionName,_msgWIN,_msgLOSE],
    _markers,
    _side,
    "hardcore",
    [],
    [
        [
            [
                _sub1,
                {_this setVariable ["ExileMoney",25000,true]}                       // The submarine 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;
};
 

 

Share this post


Link to post
Share on other sites
  • 0

The map is Chernarus Redux, I don't think i had this issue on regular Charnarus. I did have to tweak the starting location because in redux i believe the water level has risen. Let me see if I can get my mission file (not near my development machine a this time) and ill update this post.

I'm suspecting the water model has something to do with it as my roaming boat AI had a similar issue.. When they spawned in the dove up and down in the water as well.

Spoiler

/*
    "Underwater Stash" mission for Tanoa
    Created by eraser1
*/

// For logging purposes
_num = DMS_MissionCount;


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

_pos = [13457.41, 2714.08, 0];

// This mission should spawn on server start. Otherwise, if somebody is dumb enough to wait for it to spawn, then they're gonna get killed lol.
//if ([_pos,DMS_StaticMinPlayerDistance] call DMS_fnc_IsPlayerNearby) exitWith {"delay"};


DMS_CrateCase_DiverGear =
[
    [
        "arifle_SDAR_F",
        "arifle_SDAR_F",
        "arifle_SDAR_F",
        "arifle_SDAR_F",
        "arifle_SDAR_F",
        "launch_RPG32_F",
        "launch_Titan_F",
        "CUP_launch_Javelin",
        "CUP_launch_NLAW"
    ],
    [
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",
        "20Rnd_556x45_UW_mag",        
        "RPG32_HE_F",
        "RPG32_HE_F",
        "RPG32_HE_F",
        "RPG32_HE_F",
        "RPG32_HE_F",        
        "Titan_AA",
        "Titan_AA",
        "Titan_AA",
        "Titan_AA",
        "Titan_AA",
        "CUP_Javelin_M",
        "CUP_Javelin_M",
        "CUP_Javelin_M",
        "CUP_Javelin_M",
        "CUP_NLAW_M",
        "CUP_NLAW_M",
        "CUP_NLAW_M",
        "CUP_NLAW_M",
        "CUP_NLAW_M",
        "Exile_Item_Knife",
        "Exile_Item_Knife",
        "Exile_Item_Knife",
        "Exile_Item_Knife",
        "U_O_Wetsuit",
        "U_O_Wetsuit",
        "U_O_Wetsuit",
        "U_O_Wetsuit",
        "U_O_Wetsuit",
        "V_RebreatherIA",
        "V_RebreatherIA",
        "V_RebreatherIA",
        "V_RebreatherIA",
        "V_RebreatherIA"
    ],
    [
        "B_Carryall_oli",
        "B_Bergen_tna_F",
        "B_ViperHarness_oli_F"
    ]
];

// I only made some of the variables in this file "private" because I couldn't bother making all of them private :P
// private _crate = ["Exile_Container_SupplyBox",[13457.41, 2714.08, 0]] call DMS_fnc_SpawnCrate;
// _crate setVariable ["DMS_AllowSmoke", false];

// [_crate, "DiverGear"] call DMS_fnc_FillCrate;

private _sub1 = ["Exile_Boat_SDV_CSAT",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
_sub1 setPosASL [13450.15, 2704.98, -2];
_sub1 setVariable ["DMS_AllowSmoke", false];

private _sub2 = ["Exile_Boat_SDV_CSAT",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
_sub2 setPosASL [13454.68, 2704.98, -2];
_sub2 setVariable ["DMS_AllowSmoke", false];

private _diverGearSet =
[
    "arifle_SDAR_F",
    [],
    [["20Rnd_556x45_UW_mag",6]],
    "",
    [],
    ["Rangefinder","ItemGPS","NVGoggles"],
    "",
    "",
    "U_O_Wetsuit",
    "V_RebreatherIA",
    "B_Bergen_mcamo"
];

private _temp = DMS_ai_use_launchers;
DMS_ai_use_launchers = false;

private _diverGroup =
[
    [13476.47, 2725.00,-10],
    10,
    "hardcore",
    "custom",
    _side,
    _diverGearSet
] call DMS_fnc_SpawnAIGroup;

DMS_ai_use_launchers = _temp;

{
  _x disableAI "PATH";
} forEach (units _diverGroup);

private _landGroup =
[
    [13485.8,2806.38,0],
    4,
    "hardcore",
    "sniper",
    _side
] call DMS_fnc_SpawnAIGroup;

// Define mission-spawned AI Units
_missionAIUnits =
[
    _diverGroup,       
    _landGroup
];

// Define the group reinforcements
_groupReinforcementsInfo =
[
    // Removed reinforcements for this because while I was testing the mission the AI took too long to get back to the objective, and that's annoying
    /*
    [
        _diverGroup,            // pass the group
        [
            [
                -1,     // Let's limit number of units instead...
                0
            ],
            [
                10,     // Maximum 10 units can be given as reinforcements.
                0
            ]
        ],
        [
            180,        // About a 3 minute delay between reinforcements.
            diag_tickTime
        ],
        [
            [5810,2874,1],
            [5933,2912,2],
            [5862,3132,0.5]
        ],
        "custom",
        "hardcore",
        _side,
        "reinforce",
        [
            5,          // Reinforcements will only trigger if there's fewer than 5 members left in the group
            3           // 3 reinforcement units per wave.
        ],
        _diverGearSet
    ]
    */
];

// Define mission-spawned objects and loot values
_missionObjs =
[
    [],
    [_sub1, _sub2],
    [
        [
            _sub1,
            [
                1,
                [10,DMS_Box_BaseParts_Concrete],
                1
            ]
        ],
        [
            _sub2,
            [
                [2,DMS_sniper_weps],                // Spawn a random 5 weapons that AI snipers can spawn with.
                [8,DMS_BoxSurvivalSupplies],
                1
            ]
        ]
    ]
];

// Define Mission Start message
_msgStart = ['#FFFF00', "The CSAT are storing money and supplies in an underwater stash! Eliminate them and take the supplies!"];

// Define Mission Win message
_msgWIN = ['#0080ff',"Convicts have successfully eliminated the CSAT and obtained the underwater stash!"];

// Define Mission Lose message
_msgLOSE = ['#FF0000',"Seems like CSAT forces moved their stash away..."];

// Define mission name (for map marker and logging)
_missionName = "Underwater Stash";

// 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",
            _diverGroup
        ],
        [
            "playerNear",
            [_sub1,40]
        ]
    ],
    _groupReinforcementsInfo,
    [
        _time,
        DMS_StaticMissionTimeOut call DMS_fnc_SelectRandomVal
    ],
    _missionAIUnits,
    _missionObjs,
    [_missionName,_msgWIN,_msgLOSE],
    _markers,
    _side,
    "hardcore",
    [],
    [
        [
            [
                _sub1,
                {_this setVariable ["ExileMoney",50000,true]}                       // The submarine 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 geekm0nkey

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  

  • Recently Browsing   0 members

    No registered users viewing this page.