So I am unable to get the kill percent function to work for dms on a static mission that I have for our server. I am unsure on how to implement this function in the script for the mission. Here is what I have so far.
Spoiler
/*
Skalisty Castle
wernerz
NOTE: Yo this shit just works
*/
// For logging purposes
_num = DMS_MissionCount;
// Set mission side (only "bandit" is supported for now)
_side = "bandit";
_pos = [13686.5,2874.51,0];
if ([_pos,DMS_StaticMinPlayerDistance] call DMS_fnc_IsPlayerNearby) exitWith {"delay"};
// Set general mission difficulty
_difficulty = "hardcore";
// Define spawn locations for AI Soldiers. These will be used for the initial spawning of AI as well as reinforcements.
// The center spawn location is added 3 times so at least 3 AI will spawn initially at the center location, and so that future reinforcements are more likely to spawn at the center.
_AISoldierSpawnLocations =
[
[13339.276, 2757.524, 0],
[13418.875, 2801.5, 0],
[13500.842, 2895.169, 0],
[13441.342, 3050.217, 0],
[13274.625, 3080.125, 0],
[13138.625, 3133, 0],
[13511.25, 3339.875, 0],
[13657.522, 3204.537, 0],
[13769.162, 3061.094, 0],
[14015.24, 2966.217, 0],
[14013, 2752.5, 0],
[13745.423, 2907.166, 0],
[13682.344, 2856.94, 0],
[13676.25, 2917.125, 0],
[13659.875, 2974.25, 0]
];
// Define the classnames and locations where the crates can spawn (at least 2, since we're spawning 2 crates)
_crateClasses_and_Positions =
[
[[13733.2,2907.872,0.5],"B_CargoNet_01_ammo_F"],
[[13703.427,2858.627,0.5],"B_CargoNet_01_ammo_F"],
[[13662.138,2985.017,0.5],"B_CargoNet_01_ammo_F"],
[[13664,2915.375,0.5],"B_CargoNet_01_ammo_F"],
[[13691.625,2917.375,0.5],"B_CargoNet_01_ammo_F"]
];
{
deleteVehicle (nearestObject _x); // Make sure to remove any previous crates.
} forEach _crateClasses_and_Positions;
// Shuffle the list
_crateClasses_and_Positions = _crateClasses_and_Positions call ExileClient_util_array_shuffle;
// Disable smoke on the crates so that the players have to search for them >:D
{
_x setVariable ["DMS_AllowSmoke", true];
} forEach [_crate0,_crate1];
// Don't think an armed AI vehicle fit the idea behind the mission. You're welcome to uncomment this if you want.
_veh =
[
[
[13699.7,2976.9,0]
],
_group,
"assault",
_difficulty,
_side,
"CUP_B_MH60S_FFV_USMC"
] call DMS_fnc_SpawnAIVehicle;
// Define mission-spawned AI Units
_missionAIUnits =
[
_group // We only spawned the single group for this mission
];
// Define mission-spawned objects and loot values
_missionObjs =
[
_staticGuns, // static gun(s). Note, we don't add the base itself because it already spawns on server start.
[],
[[_crate0,[50,100,5]],[_crate1,[10,150,5]]]
];
// Define Mission Start message
_msgStart = ['#FFFF00', "Shit son!!! A group of mercenaries have setup base at Skalisty Castle and are fucking the shit out of you mom."];
// Define Mission Win message
_msgWIN = ['#0080ff',"A group of mama's boys have rescued there mothers and taken some loot!"];
// Define Mission Lose message
_msgLOSE = ['#FF0000',"Seems like the mercenaries got bored and left the castle, taking your mom with them..."];
// Define mission name (for map marker and logging)
_missionName = "Skalisty Castle";
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
_time = diag_tickTime;
// 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];
if (DMS_DEBUG) then
{
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
};
So I am unable to get the kill percent function to work for dms on a static mission that I have for our server. I am unsure on how to implement this function in the script for the mission. Here is what I have so far.
/*
Skalisty Castle
wernerz
NOTE: Yo this shit just works
*/
// For logging purposes
_num = DMS_MissionCount;
// Set mission side (only "bandit" is supported for now)
_side = "bandit";
_pos = [13686.5,2874.51,0];
if ([_pos,DMS_StaticMinPlayerDistance] call DMS_fnc_IsPlayerNearby) exitWith {"delay"};
// Set general mission difficulty
_difficulty = "hardcore";
// Define spawn locations for AI Soldiers. These will be used for the initial spawning of AI as well as reinforcements.
// The center spawn location is added 3 times so at least 3 AI will spawn initially at the center location, and so that future reinforcements are more likely to spawn at the center.
_AISoldierSpawnLocations =
[
[13339.276, 2757.524, 0],
[13418.875, 2801.5, 0],
[13500.842, 2895.169, 0],
[13441.342, 3050.217, 0],
[13274.625, 3080.125, 0],
[13138.625, 3133, 0],
[13511.25, 3339.875, 0],
[13657.522, 3204.537, 0],
[13769.162, 3061.094, 0],
[14015.24, 2966.217, 0],
[14013, 2752.5, 0],
[13745.423, 2907.166, 0],
[13682.344, 2856.94, 0],
[13676.25, 2917.125, 0],
[13659.875, 2974.25, 0]
];
// Create AI
_AICount = 50 + (round (random 5));
//_AICount = 1;
_group =
[
_AISoldierSpawnLocations+[_pos,_pos,_pos],
_AICount,
_difficulty,
"random",
_side
] call DMS_fnc_SpawnAIGroup_MultiPos;
_staticGuns =
[
[
[13598.4, 2918.24, 0],
[13596.7, 2931.94, 0],
[13642.2, 3053.48, 0],
[13657.4, 3055.99, 0],
[13782.375, 2899.375, 0],
[13784.75, 2906.5, 0],
[13361.5, 2826, 0],
[13443.156, 2941.767, 0],
[13166.463, 3354.826, 3.064],
[13133.789, 3343.181, 3]
],
_group,
"assault",
_difficulty,
"bandit",
"random"
] call DMS_fnc_SpawnAIStaticMG;
// Define the classnames and locations where the crates can spawn (at least 2, since we're spawning 2 crates)
_crateClasses_and_Positions =
[
[[13733.2,2907.872,0.5],"B_CargoNet_01_ammo_F"],
[[13703.427,2858.627,0.5],"B_CargoNet_01_ammo_F"],
[[13662.138,2985.017,0.5],"B_CargoNet_01_ammo_F"],
[[13664,2915.375,0.5],"B_CargoNet_01_ammo_F"],
[[13691.625,2917.375,0.5],"B_CargoNet_01_ammo_F"]
];
{
deleteVehicle (nearestObject _x); // Make sure to remove any previous crates.
} forEach _crateClasses_and_Positions;
// Shuffle the list
_crateClasses_and_Positions = _crateClasses_and_Positions call ExileClient_util_array_shuffle;
// Create Crates
_crate0 = [_crateClasses_and_Positions select 0 select 1, _crateClasses_and_Positions select 0 select 0] call DMS_fnc_SpawnCrate;
_crate1 = [_crateClasses_and_Positions select 1 select 1, _crateClasses_and_Positions select 1 select 0] call DMS_fnc_SpawnCrate;
_rareLootChance = [DMS_RareLootChance];
_killPercent = [DMS_AI_KillPercent];
// Disable smoke on the crates so that the players have to search for them >:D
{
_x setVariable ["DMS_AllowSmoke", true];
} forEach [_crate0,_crate1];
// Don't think an armed AI vehicle fit the idea behind the mission. You're welcome to uncomment this if you want.
_veh =
[
[
[13699.7,2976.9,0]
],
_group,
"assault",
_difficulty,
_side,
"CUP_B_MH60S_FFV_USMC"
] call DMS_fnc_SpawnAIVehicle;
// Define mission-spawned AI Units
_missionAIUnits =
[
_group // We only spawned the single group for this mission
];
// Define mission-spawned objects and loot values
_missionObjs =
[
_staticGuns, // static gun(s). Note, we don't add the base itself because it already spawns on server start.
[],
[[_crate0,[50,100,5]],[_crate1,[10,150,5]]]
];
// Define Mission Start message
_msgStart = ['#FFFF00', "Shit son!!! A group of mercenaries have setup base at Skalisty Castle and are fucking the shit out of you mom."];
// Define Mission Win message
_msgWIN = ['#0080ff',"A group of mama's boys have rescued there mothers and taken some loot!"];
// Define Mission Lose message
_msgLOSE = ['#FF0000',"Seems like the mercenaries got bored and left the castle, taking your mom with them..."];
// Define mission name (for map marker and logging)
_missionName = "Skalisty Castle";
// Create Markers
_markers =
[
_pos,
_missionName,
_difficulty
] call DMS_fnc_CreateMarker;
(_markers select 1) setMarkerSize [50,50];
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
_time = diag_tickTime;
// Parse and add mission info to missions monitor
_added =
[
_pos,
[
[
"kill",
_group
],
[
"playerNear",
[_pos,DMS_playerNearRadius]
]
],
_groupReinforcementsInfo,
[
_time,
DMS_StaticMissionTimeOut call DMS_fnc_SelectRandomVal
],
_missionAIUnits,
_missionObjs,
[_missionName,_msgWIN,_msgLOSE],
_markers,
_side,
_difficulty,
[]
] 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,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
};
Share this post
Link to post
Share on other sites