mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
Merge pull request #38 from Defent/Testing
Implement all Testing Features
This commit is contained in:
commit
5eddd23f44
@ -1,4 +1,4 @@
|
|||||||
/*%FSM<COMPILE "scriptedFSM.cfg, missions">*/
|
/*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, missions">*/
|
||||||
/*%FSM<HEAD>*/
|
/*%FSM<HEAD>*/
|
||||||
/*
|
/*
|
||||||
item0[] = {"",7,210,743.923157,366.553040,751.923157,374.553040,0.000000,""};
|
item0[] = {"",7,210,743.923157,366.553040,751.923157,374.553040,0.000000,""};
|
||||||
@ -16,9 +16,9 @@ item11[] = {"Mission_Cleanup",2,250,697.923035,248.598328,797.923035,298.598328,
|
|||||||
item12[] = {"INITIALIZE",4,218,638.875183,-106.463760,728.875183,-56.463760,0.000000,"INITIALIZE"};
|
item12[] = {"INITIALIZE",4,218,638.875183,-106.463760,728.875183,-56.463760,0.000000,"INITIALIZE"};
|
||||||
item13[] = {"PREPARE",2,250,763.528931,-107.864372,853.528931,-57.864372,0.000000,"PREPARE"};
|
item13[] = {"PREPARE",2,250,763.528931,-107.864372,853.528931,-57.864372,0.000000,"PREPARE"};
|
||||||
item14[] = {"___min_loop",4,218,838.578918,171.729218,928.578918,221.729218,3.000000,"1 min loop"};
|
item14[] = {"___min_loop",4,218,838.578918,171.729218,928.578918,221.729218,3.000000,"1 min loop"};
|
||||||
item15[] = {"Select_Mission",2,250,839.279602,248.118042,929.279663,298.118042,0.000000,"Select Mission"};
|
item15[] = {"Select_Mission",2,4346,839.279602,248.118042,929.279663,298.118042,0.000000,"Select Mission"};
|
||||||
item16[] = {"",7,210,880.582092,366.639160,888.582092,374.639160,0.000000,""};
|
item16[] = {"",7,210,880.582092,366.639160,888.582092,374.639160,0.000000,""};
|
||||||
item17[] = {"___min_loop__AI",4,4314,975.237671,175.934219,1065.237793,225.934219,0.000000,"1 min loop (AI)"};
|
item17[] = {"___min_loop__AI",4,218,975.237671,175.934219,1065.237793,225.934219,0.000000,"1 min loop (AI)"};
|
||||||
item18[] = {"Set_AI_Ownership",2,250,975.237732,250.921417,1065.237305,300.921417,0.000000,"Set AI Ownership"};
|
item18[] = {"Set_AI_Ownership",2,250,975.237732,250.921417,1065.237305,300.921417,0.000000,"Set AI Ownership"};
|
||||||
item19[] = {"",7,210,1016.540222,366.725281,1024.540283,374.725281,0.000000,""};
|
item19[] = {"",7,210,1016.540222,366.725281,1024.540283,374.725281,0.000000,""};
|
||||||
link0[] = {0,10};
|
link0[] = {0,10};
|
||||||
@ -44,8 +44,8 @@ link19[] = {16,0};
|
|||||||
link20[] = {17,18};
|
link20[] = {17,18};
|
||||||
link21[] = {18,19};
|
link21[] = {18,19};
|
||||||
link22[] = {19,16};
|
link22[] = {19,16};
|
||||||
globals[] = {0.000000,0,0,0,0,640,480,2,454,6316128,1,432.812775,1219.813965,504.306030,-50.239235,799,563,1};
|
globals[] = {0.000000,0,0,0,0,640,480,2,454,6316128,1,432.812775,1219.813965,504.306030,-50.239235,799,589,1};
|
||||||
window[] = {0,-1,-1,-1,-1,1045,285,1579,311,1,817};
|
window[] = {0,-1,-1,-1,-1,834,100,1394,100,1,817};
|
||||||
*//*%FSM</HEAD>*/
|
*//*%FSM</HEAD>*/
|
||||||
class FSM
|
class FSM
|
||||||
{
|
{
|
||||||
@ -56,7 +56,6 @@ class FSM
|
|||||||
class INIT
|
class INIT
|
||||||
{
|
{
|
||||||
name = "INIT";
|
name = "INIT";
|
||||||
itemno = 1;
|
|
||||||
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
|
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
|
||||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||||
class Links
|
class Links
|
||||||
@ -64,7 +63,6 @@ class FSM
|
|||||||
/*%FSM<LINK "INITIALIZE">*/
|
/*%FSM<LINK "INITIALIZE">*/
|
||||||
class INITIALIZE
|
class INITIALIZE
|
||||||
{
|
{
|
||||||
itemno = 12;
|
|
||||||
priority = 0.000000;
|
priority = 0.000000;
|
||||||
to="PREPARE";
|
to="PREPARE";
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
@ -79,7 +77,6 @@ class FSM
|
|||||||
class Waiting
|
class Waiting
|
||||||
{
|
{
|
||||||
name = "Waiting";
|
name = "Waiting";
|
||||||
itemno = 3;
|
|
||||||
init = /*%FSM<STATEINIT""">*/"// Waiting for next task to proceed with."/*%FSM</STATEINIT""">*/;
|
init = /*%FSM<STATEINIT""">*/"// Waiting for next task to proceed with."/*%FSM</STATEINIT""">*/;
|
||||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||||
class Links
|
class Links
|
||||||
@ -87,7 +84,6 @@ class FSM
|
|||||||
/*%FSM<LINK "___min_loop">*/
|
/*%FSM<LINK "___min_loop">*/
|
||||||
class ___min_loop
|
class ___min_loop
|
||||||
{
|
{
|
||||||
itemno = 14;
|
|
||||||
priority = 3.000000;
|
priority = 3.000000;
|
||||||
to="Select_Mission";
|
to="Select_Mission";
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
@ -99,7 +95,6 @@ class FSM
|
|||||||
/*%FSM<LINK "___min_loop_1">*/
|
/*%FSM<LINK "___min_loop_1">*/
|
||||||
class ___min_loop_1
|
class ___min_loop_1
|
||||||
{
|
{
|
||||||
itemno = 8;
|
|
||||||
priority = 2.000000;
|
priority = 2.000000;
|
||||||
to="Mission_Cleanup";
|
to="Mission_Cleanup";
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
@ -110,7 +105,6 @@ class FSM
|
|||||||
/*%FSM<LINK "__5_sec_loop_">*/
|
/*%FSM<LINK "__5_sec_loop_">*/
|
||||||
class __5_sec_loop_
|
class __5_sec_loop_
|
||||||
{
|
{
|
||||||
itemno = 5;
|
|
||||||
priority = 1.000000;
|
priority = 1.000000;
|
||||||
to="Check_Mission_Running";
|
to="Check_Mission_Running";
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
@ -121,7 +115,6 @@ class FSM
|
|||||||
/*%FSM<LINK "___min_loop__AI">*/
|
/*%FSM<LINK "___min_loop__AI">*/
|
||||||
class ___min_loop__AI
|
class ___min_loop__AI
|
||||||
{
|
{
|
||||||
itemno = 17;
|
|
||||||
priority = 0.000000;
|
priority = 0.000000;
|
||||||
to="Set_AI_Ownership";
|
to="Set_AI_Ownership";
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
@ -136,7 +129,6 @@ class FSM
|
|||||||
class Check_Mission_Running
|
class Check_Mission_Running
|
||||||
{
|
{
|
||||||
name = "Check_Mission_Running";
|
name = "Check_Mission_Running";
|
||||||
itemno = 6;
|
|
||||||
init = /*%FSM<STATEINIT""">*/"//(format [""FSM CHECK :: calling DMS_fnc_MissionsMonitor""]) call DMS_fnc_DebugLog;" \n
|
init = /*%FSM<STATEINIT""">*/"//(format [""FSM CHECK :: calling DMS_fnc_MissionsMonitor""]) call DMS_fnc_DebugLog;" \n
|
||||||
"" \n
|
"" \n
|
||||||
"_missionsMonitor = diag_tickTime;" \n
|
"_missionsMonitor = diag_tickTime;" \n
|
||||||
@ -147,7 +139,6 @@ class FSM
|
|||||||
/*%FSM<LINK "true">*/
|
/*%FSM<LINK "true">*/
|
||||||
class true
|
class true
|
||||||
{
|
{
|
||||||
itemno = 2;
|
|
||||||
priority = 0.000000;
|
priority = 0.000000;
|
||||||
to="Waiting";
|
to="Waiting";
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
@ -162,7 +153,6 @@ class FSM
|
|||||||
class Mission_Cleanup
|
class Mission_Cleanup
|
||||||
{
|
{
|
||||||
name = "Mission_Cleanup";
|
name = "Mission_Cleanup";
|
||||||
itemno = 11;
|
|
||||||
init = /*%FSM<STATEINIT""">*/"//(format [""FSM CHECK :: calling DMS_fnc_CleanUpManager""]) call DMS_fnc_DebugLog;" \n
|
init = /*%FSM<STATEINIT""">*/"//(format [""FSM CHECK :: calling DMS_fnc_CleanUpManager""]) call DMS_fnc_DebugLog;" \n
|
||||||
"" \n
|
"" \n
|
||||||
"_cleanupTime = diag_tickTime;" \n
|
"_cleanupTime = diag_tickTime;" \n
|
||||||
@ -173,7 +163,6 @@ class FSM
|
|||||||
/*%FSM<LINK "true">*/
|
/*%FSM<LINK "true">*/
|
||||||
class true
|
class true
|
||||||
{
|
{
|
||||||
itemno = 2;
|
|
||||||
priority = 0.000000;
|
priority = 0.000000;
|
||||||
to="Waiting";
|
to="Waiting";
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
@ -188,7 +177,6 @@ class FSM
|
|||||||
class PREPARE
|
class PREPARE
|
||||||
{
|
{
|
||||||
name = "PREPARE";
|
name = "PREPARE";
|
||||||
itemno = 13;
|
|
||||||
init = /*%FSM<STATEINIT""">*/"private [""_missionsMonitor"",""_cleanupTime"",""_selectMission""];" \n
|
init = /*%FSM<STATEINIT""">*/"private [""_missionsMonitor"",""_cleanupTime"",""_selectMission""];" \n
|
||||||
"diag_log (""DMS :: Initializing FSM mission script"");" \n
|
"diag_log (""DMS :: Initializing FSM mission script"");" \n
|
||||||
"" \n
|
"" \n
|
||||||
@ -202,7 +190,6 @@ class FSM
|
|||||||
/*%FSM<LINK "true">*/
|
/*%FSM<LINK "true">*/
|
||||||
class true
|
class true
|
||||||
{
|
{
|
||||||
itemno = 2;
|
|
||||||
priority = 0.000000;
|
priority = 0.000000;
|
||||||
to="Waiting";
|
to="Waiting";
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
@ -217,18 +204,23 @@ class FSM
|
|||||||
class Select_Mission
|
class Select_Mission
|
||||||
{
|
{
|
||||||
name = "Select_Mission";
|
name = "Select_Mission";
|
||||||
itemno = 15;
|
|
||||||
init = /*%FSM<STATEINIT""">*/"//(format [""FSM CHECK :: calling DMS_fnc_SelectMission""]) call DMS_fnc_DebugLog;" \n
|
init = /*%FSM<STATEINIT""">*/"//(format [""FSM CHECK :: calling DMS_fnc_SelectMission""]) call DMS_fnc_DebugLog;" \n
|
||||||
"" \n
|
"" \n
|
||||||
"_selectMission = diag_tickTime;" \n
|
"_selectMission = diag_tickTime;" \n
|
||||||
"call DMS_fnc_SelectMission;"/*%FSM</STATEINIT""">*/;
|
"if (DMS_SpawnMissions_Scheduled) then" \n
|
||||||
|
"{" \n
|
||||||
|
" [] spawn DMS_fnc_SelectMission;" \n
|
||||||
|
"}" \n
|
||||||
|
"else" \n
|
||||||
|
"{" \n
|
||||||
|
" call DMS_fnc_SelectMission;" \n
|
||||||
|
"};"/*%FSM</STATEINIT""">*/;
|
||||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||||
class Links
|
class Links
|
||||||
{
|
{
|
||||||
/*%FSM<LINK "true">*/
|
/*%FSM<LINK "true">*/
|
||||||
class true
|
class true
|
||||||
{
|
{
|
||||||
itemno = 2;
|
|
||||||
priority = 0.000000;
|
priority = 0.000000;
|
||||||
to="Waiting";
|
to="Waiting";
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
@ -243,7 +235,6 @@ class FSM
|
|||||||
class Set_AI_Ownership
|
class Set_AI_Ownership
|
||||||
{
|
{
|
||||||
name = "Set_AI_Ownership";
|
name = "Set_AI_Ownership";
|
||||||
itemno = 18;
|
|
||||||
init = /*%FSM<STATEINIT""">*/"//(format [""FSM CHECK :: calling DMS_fnc_AILocalityManager""]) call DMS_fnc_DebugLog;" \n
|
init = /*%FSM<STATEINIT""">*/"//(format [""FSM CHECK :: calling DMS_fnc_AILocalityManager""]) call DMS_fnc_DebugLog;" \n
|
||||||
"" \n
|
"" \n
|
||||||
"_aiLocality = diag_tickTime;" \n
|
"_aiLocality = diag_tickTime;" \n
|
||||||
@ -254,7 +245,6 @@ class FSM
|
|||||||
/*%FSM<LINK "true">*/
|
/*%FSM<LINK "true">*/
|
||||||
class true
|
class true
|
||||||
{
|
{
|
||||||
itemno = 2;
|
|
||||||
priority = 0.000000;
|
priority = 0.000000;
|
||||||
to="Waiting";
|
to="Waiting";
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
class CfgPatches
|
class CfgPatches
|
||||||
{
|
{
|
||||||
class A3_dms
|
class a3_dms
|
||||||
{
|
{
|
||||||
units[] = {};
|
units[] = {};
|
||||||
weapons[] = {};
|
weapons[] = {};
|
||||||
a3_DMS_version = 3.0;
|
a3_DMS_version = "April 27, 2016";
|
||||||
requiredVersion = 1.36;
|
requiredVersion = 1.36;
|
||||||
requiredAddons[] = {"exile_client","exile_server_config"};
|
requiredAddons[] = {"exile_client","exile_server_config"};
|
||||||
};
|
};
|
||||||
@ -39,11 +39,13 @@ class CfgFunctions
|
|||||||
class DebugLog {};
|
class DebugLog {};
|
||||||
class FillCrate {};
|
class FillCrate {};
|
||||||
class FindSafePos {};
|
class FindSafePos {};
|
||||||
|
class FindSafePos_InRange {};
|
||||||
class FindSuppressor {};
|
class FindSuppressor {};
|
||||||
class GetAllUnits {};
|
class GetAllUnits {};
|
||||||
|
class GetEmptySeats {};
|
||||||
class GroupReinforcementsManager {};
|
class GroupReinforcementsManager {};
|
||||||
//class HandleMissionEvents {};
|
//class HandleMissionEvents {};
|
||||||
//class HeliParatroopers {};
|
class HeliParatroopers_Monitor {};
|
||||||
//class HeliPatrol {};
|
//class HeliPatrol {};
|
||||||
class ImportFromM3E {};
|
class ImportFromM3E {};
|
||||||
class ImportFromM3E_Convert {};
|
class ImportFromM3E_Convert {};
|
||||||
@ -72,11 +74,12 @@ class CfgFunctions
|
|||||||
class SpawnAISoldier {};
|
class SpawnAISoldier {};
|
||||||
class SpawnAIStaticMG {};
|
class SpawnAIStaticMG {};
|
||||||
class SpawnBanditMission {};
|
class SpawnBanditMission {};
|
||||||
class SpawnStaticMission {};
|
|
||||||
class SpawnCrate {};
|
class SpawnCrate {};
|
||||||
|
class SpawnHeliReinforcement {};
|
||||||
class SpawnMinefield {};
|
class SpawnMinefield {};
|
||||||
class SpawnPersistentVehicle {};
|
|
||||||
class SpawnNonPersistentVehicle {};
|
class SpawnNonPersistentVehicle {};
|
||||||
|
class SpawnPersistentVehicle {};
|
||||||
|
class SpawnStaticMission {};
|
||||||
class TargetsKilled {};
|
class TargetsKilled {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -16,7 +16,7 @@ DMS_DEBUG = false;
|
|||||||
|
|
||||||
DMS_Use_Map_Config = true; // Whether or not to use config overwrites specific to the map.
|
DMS_Use_Map_Config = true; // Whether or not to use config overwrites specific to the map.
|
||||||
/*
|
/*
|
||||||
If you are using a map other than Altis, Bornholm, Esseker, or Tavi (Taviana) you should set this to false OR create a new file within the map_configs folder for the map so that you don't get a missing file error.
|
If you are using a map other than a map listed in the "map_configs" folder, you should set this to false OR create a new file within the map_configs folder for the map so that you don't get a missing file error.
|
||||||
To share your map-specific config, please create a merge request on GitHub and/or leave a message on the DMS thread in the Exile forums.
|
To share your map-specific config, please create a merge request on GitHub and/or leave a message on the DMS thread in the Exile forums.
|
||||||
For any questions regarding map-specific configs, please leave a reply in the DMS thread on the Exile forums.
|
For any questions regarding map-specific configs, please leave a reply in the DMS thread on the Exile forums.
|
||||||
*/
|
*/
|
||||||
@ -28,6 +28,8 @@ DMS_Enable_RankChange = false; // Whether or not to use Rank Changes.
|
|||||||
|
|
||||||
DMS_Add_AIKill2DB = false; // Adds killstat for player in the database ;)
|
DMS_Add_AIKill2DB = false; // Adds killstat for player in the database ;)
|
||||||
|
|
||||||
|
DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a scheduled environment. Setting to true may help with lag when certain missions spawn.
|
||||||
|
|
||||||
/* Mission System Settings */
|
/* Mission System Settings */
|
||||||
/*General settings for dynamic missions*/
|
/*General settings for dynamic missions*/
|
||||||
DMS_DynamicMission = true; // Enable/disable dynamic mission system.
|
DMS_DynamicMission = true; // Enable/disable dynamic mission system.
|
||||||
@ -357,10 +359,10 @@ DMS_Add_AIKill2DB = false; // Adds killstat for player in the database ;)
|
|||||||
DMS_ai_skill_randomDifficult = ["hardcore","hardcore","difficult","difficult","difficult"]; // 60% chance for "difficult", 40% chance for "hardcore" AI.
|
DMS_ai_skill_randomDifficult = ["hardcore","hardcore","difficult","difficult","difficult"]; // 60% chance for "difficult", 40% chance for "hardcore" AI.
|
||||||
DMS_ai_skill_randomEasy = ["moderate","moderate","easy","easy","easy"]; // 60% chance for "easy", 40% chance for "moderate" AI.
|
DMS_ai_skill_randomEasy = ["moderate","moderate","easy","easy","easy"]; // 60% chance for "easy", 40% chance for "moderate" AI.
|
||||||
DMS_ai_skill_randomIntermediate = ["difficult","difficult","moderate","moderate","moderate"]; // 60% chance for "moderate", 40% chance for "difficult" AI.
|
DMS_ai_skill_randomIntermediate = ["difficult","difficult","moderate","moderate","moderate"]; // 60% chance for "moderate", 40% chance for "difficult" AI.
|
||||||
DMS_AI_WP_Radius_easy = 20; // Waypoint radius for "easy" AI
|
DMS_AI_WP_Radius_easy = 20; // Waypoint radius for "easy" AI.
|
||||||
DMS_AI_WP_Radius_moderate = 30; // Waypoint radius for "moderate" AI
|
DMS_AI_WP_Radius_moderate = 30; // Waypoint radius for "moderate" AI.
|
||||||
DMS_AI_WP_Radius_difficult = 50; // Waypoint radius for "difficult" AI
|
DMS_AI_WP_Radius_difficult = 50; // Waypoint radius for "difficult" AI.
|
||||||
DMS_AI_WP_Radius_hardcore = 75; // Waypoint radius for "hardcore" AI
|
DMS_AI_WP_Radius_hardcore = 75; // Waypoint radius for "hardcore" AI.
|
||||||
DMS_AI_AimCoef_easy = 0.9; // "Custom Aim Coefficient" (weapon sway multiplier) for "easy" AI
|
DMS_AI_AimCoef_easy = 0.9; // "Custom Aim Coefficient" (weapon sway multiplier) for "easy" AI
|
||||||
DMS_AI_AimCoef_moderate = 0.65; // "Custom Aim Coefficient" (weapon sway multiplier) for "moderate" AI
|
DMS_AI_AimCoef_moderate = 0.65; // "Custom Aim Coefficient" (weapon sway multiplier) for "moderate" AI
|
||||||
DMS_AI_AimCoef_difficult = 0.4; // "Custom Aim Coefficient" (weapon sway multiplier) for "difficult" AI
|
DMS_AI_AimCoef_difficult = 0.4; // "Custom Aim Coefficient" (weapon sway multiplier) for "difficult" AI
|
||||||
@ -369,7 +371,10 @@ DMS_Add_AIKill2DB = false; // Adds killstat for player in the database ;)
|
|||||||
DMS_AI_EnableStamina_moderate = true; // Whether or not to keep the stamina system for "moderate" AI.
|
DMS_AI_EnableStamina_moderate = true; // Whether or not to keep the stamina system for "moderate" AI.
|
||||||
DMS_AI_EnableStamina_difficult = false; // Whether or not to keep the stamina system for "difficult" AI.
|
DMS_AI_EnableStamina_difficult = false; // Whether or not to keep the stamina system for "difficult" AI.
|
||||||
DMS_AI_EnableStamina_hardcore = false; // Whether or not to keep the stamina system for "hardcore" AI.
|
DMS_AI_EnableStamina_hardcore = false; // Whether or not to keep the stamina system for "hardcore" AI.
|
||||||
DMS_AI_WP_Radius_base = 5; // Waypoint radius for AI in bases
|
DMS_AI_WP_Radius_base = 5; // Waypoint radius for AI in bases.
|
||||||
|
DMS_AI_WP_Radius_heli = 500; // Waypoint radius for AI in helis.
|
||||||
|
|
||||||
|
DMS_AI_destroyVehicleChance = 75; // Percent chance that an AI vehicle will be destroyed after the AI have been killed. Set to 100 for always, or 0 for never.
|
||||||
|
|
||||||
DMS_AI_destroyStaticWeapon = true; // Whether or not to destroy static HMGs after AI death.
|
DMS_AI_destroyStaticWeapon = true; // Whether or not to destroy static HMGs after AI death.
|
||||||
DMS_AI_destroyStaticWeapon_chance = 95; // Percent chance that a static weapon will be destroyed (only applied if "DMS_AI_destroyStaticWeapon" is true)
|
DMS_AI_destroyStaticWeapon_chance = 95; // Percent chance that a static weapon will be destroyed (only applied if "DMS_AI_destroyStaticWeapon" is true)
|
||||||
@ -693,6 +698,11 @@ DMS_Add_AIKill2DB = false; // Adds killstat for player in the database ;)
|
|||||||
"launch_B_Titan_F"
|
"launch_B_Titan_F"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
DMS_RHeli_Height = 500; // Altitude of the heli when flying to drop point.
|
||||||
|
DMS_RHeli_MinDistFromDrop = 500; // Minimum distance for the reinforcement heli to spawn from drop point.
|
||||||
|
DMS_RHeli_MaxDistFromDrop = 5000; // Maximum distance for the reinforcement heli to spawn from drop point.
|
||||||
|
DMS_RHeli_MinDistFromPlayers = 1000; // Minimum distance for the reinforcement heli to spawn from players.
|
||||||
|
|
||||||
/* AI Settings */
|
/* AI Settings */
|
||||||
|
|
||||||
|
|
||||||
@ -837,6 +847,7 @@ DMS_Add_AIKill2DB = false; // Adds killstat for player in the database ;)
|
|||||||
DMS_BoxItems = DMS_BoxSurvivalSupplies+DMS_BoxBuildingSupplies+DMS_BoxOptics; // Random "items" can spawn optics, survival supplies, or building supplies
|
DMS_BoxItems = DMS_BoxSurvivalSupplies+DMS_BoxBuildingSupplies+DMS_BoxOptics; // Random "items" can spawn optics, survival supplies, or building supplies
|
||||||
|
|
||||||
DMS_RareLoot = true; // Potential chance to spawn rare loot in any crate.
|
DMS_RareLoot = true; // Potential chance to spawn rare loot in any crate.
|
||||||
|
DMS_RareLootAmount = 1; // How many rare loot items to add.
|
||||||
DMS_RareLootList = [ // List of rare loot to spawn
|
DMS_RareLootList = [ // List of rare loot to spawn
|
||||||
"Exile_Item_SafeKit",
|
"Exile_Item_SafeKit",
|
||||||
"Exile_Item_CodeLock"
|
"Exile_Item_CodeLock"
|
||||||
@ -891,6 +902,10 @@ DMS_Add_AIKill2DB = false; // Adds killstat for player in the database ;)
|
|||||||
"Exile_Chopper_Taru_Transport_Black"
|
"Exile_Chopper_Taru_Transport_Black"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
DMS_ReinforcementHelis = [ // List of helis that can spawn for AI paratrooper reinforcements.
|
||||||
|
//"B_Heli_Transport_01_camo_F" // Ghosthawk: You'll have to whitelist this in infistar if you want to use it.
|
||||||
|
] + DMS_TransportHelis;
|
||||||
|
|
||||||
DMS_CarThievesVehicles = [ // List of vehicles that can spawn in the "car thieves" mission. By default, it's just "DMS_MilitaryVehicles" and "DMS_TransportTrucks".
|
DMS_CarThievesVehicles = [ // List of vehicles that can spawn in the "car thieves" mission. By default, it's just "DMS_MilitaryVehicles" and "DMS_TransportTrucks".
|
||||||
//"Exile_Car_Offroad_Armed_Guerilla01"
|
//"Exile_Car_Offroad_Armed_Guerilla01"
|
||||||
] + DMS_MilitaryVehicles + DMS_TransportTrucks;
|
] + DMS_MilitaryVehicles + DMS_TransportTrucks;
|
||||||
|
@ -18,7 +18,7 @@ if (isNil "DMS_DynamicMission") exitWith
|
|||||||
{
|
{
|
||||||
for "_i" from 0 to 99 do
|
for "_i" from 0 to 99 do
|
||||||
{
|
{
|
||||||
diag_log "DMS ERROR :: You have made an error in your DMS config.sqf! Cancelling DMS Launch.";
|
diag_log "DMS ERROR :: You have made an error in your DMS config.sqf! Please look for any script errors. Cancelling DMS Launch.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -226,6 +226,10 @@ if (DMS_ShowDifficultyColorLegend) then
|
|||||||
} forEach DMS_StaticMissionsOnServerStart;
|
} forEach DMS_StaticMissionsOnServerStart;
|
||||||
|
|
||||||
|
|
||||||
|
// Add heli paratroopers monitor to the thread system.
|
||||||
|
[5, DMS_fnc_HeliParatroopers_Monitor, [], true] call ExileServer_system_thread_addTask;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ DMS_HC_Object = objNull;
|
|||||||
|
|
||||||
DMS_CleanUpList = [];
|
DMS_CleanUpList = [];
|
||||||
|
|
||||||
DMS_Version = "February 19 2016";
|
DMS_Version = getText (configFile >> "CfgPatches" >> "a3_dms" >> "a3_DMS_version");
|
||||||
|
|
||||||
|
|
||||||
//Load main config
|
//Load main config
|
||||||
@ -105,6 +105,9 @@ DMS_MaxSurfaceNormal = DMS_MinSurfaceNormal;
|
|||||||
|
|
||||||
DMS_AttemptsUntilThrottle = DMS_AttemptsUntilThrottle + 1;
|
DMS_AttemptsUntilThrottle = DMS_AttemptsUntilThrottle + 1;
|
||||||
|
|
||||||
|
DMS_HelisToClean = [];
|
||||||
|
DMS_HeliParatrooper_Arr = [];
|
||||||
|
|
||||||
|
|
||||||
// Initialize mission variables...
|
// Initialize mission variables...
|
||||||
call compileFinal preprocessFileLineNumbers "\x\addons\dms\missions\static_init.sqf";
|
call compileFinal preprocessFileLineNumbers "\x\addons\dms\missions\static_init.sqf";
|
||||||
|
@ -65,7 +65,7 @@ _crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
|||||||
|
|
||||||
_rndDir = random 180;
|
_rndDir = random 180;
|
||||||
|
|
||||||
_wreck = createVehicle ["Land_FuelStation_Build_F",[_pos,10+(random 5),_rndDir+90] call DMS_fnc_SelectOffsetPos,[], 0, "CAN_COLLIDE"];
|
_wreck = createVehicle ["Land_FuelStation_Build_F",_pos getPos [10+(random 5),_rndDir+90],[], 0, "CAN_COLLIDE"];
|
||||||
|
|
||||||
|
|
||||||
_vehClass1 = "Exile_Car_SUV_Red";
|
_vehClass1 = "Exile_Car_SUV_Red";
|
||||||
@ -90,12 +90,10 @@ if !(_extraParams isEqualTo []) then
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
_vehicle1 = [_vehClass1, [_pos,5+(random 3),_rndDir] call DMS_fnc_SelectOffsetPos] call DMS_fnc_SpawnNonPersistentVehicle;
|
_vehicle1 = [_vehClass1, _pos getPos [5+(random 3),_rndDir]] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||||
//_vehicle1 setPosATL ([_pos,5+(random 3),_rndDir] call DMS_fnc_SelectOffsetPos);
|
|
||||||
|
|
||||||
|
|
||||||
_vehicle2 = [_vehClass2, [_pos,5+(random 3),_rndDir+180] call DMS_fnc_SelectOffsetPos] call DMS_fnc_SpawnNonPersistentVehicle;
|
_vehicle2 = [_vehClass2, _pos getPos [5+(random 3),_rndDir+180]] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||||
//_vehicle2 setPosATL ([_pos,5+(random 3),_rndDir+180] call DMS_fnc_SelectOffsetPos);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ _crate = [_crateClassname, _pos] call DMS_fnc_SpawnCrate;
|
|||||||
_veh =
|
_veh =
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
[_pos,100,random 360] call DMS_fnc_SelectOffsetPos,
|
_pos getPos [100,random 360],
|
||||||
_pos
|
_pos
|
||||||
],
|
],
|
||||||
_group,
|
_group,
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private ["_added", "_pos", "_onEndingScripts", "_completionInfo", "_timeOutInfo", "_units", "_inputUnits", "_missionObjs", "_mines", "_difficulty", "_side", "_messages", "_markers", "_arr", "_timeStarted", "_timeUntilFail", "_buildings", "_vehs", "_crate_info_array", "_missionName", "_msgWIN", "_msgLose", "_markerDot", "_markerCircle", "_missionEvents", "_onSuccessScripts", "_onFailScripts"];
|
private ["_added", "_pos", "_onEndingScripts", "_completionInfo", "_timeOutInfo", "_units", "_missionObjs", "_mines", "_difficulty", "_side", "_messages", "_markers", "_arr", "_timeStarted", "_timeUntilFail", "_buildings", "_vehs", "_crate_info_array", "_missionName", "_msgWIN", "_msgLose", "_markerDot", "_markerCircle", "_missionEvents", "_onSuccessScripts", "_onFailScripts"];
|
||||||
|
|
||||||
|
|
||||||
_added = false;
|
_added = false;
|
||||||
@ -68,7 +68,7 @@ if !(params
|
|||||||
["_pos","",[[]],[2,3]],
|
["_pos","",[[]],[2,3]],
|
||||||
["_completionInfo","",[[]]],
|
["_completionInfo","",[[]]],
|
||||||
["_timeOutInfo","",[[]],[1,2]],
|
["_timeOutInfo","",[[]],[1,2]],
|
||||||
["_inputUnits","",[[]]],
|
["_units","",[[]]],
|
||||||
["_missionObjs","",[[]],[3,4]],
|
["_missionObjs","",[[]],[3,4]],
|
||||||
["_messages","",[[]],[3]],
|
["_messages","",[[]],[3]],
|
||||||
["_markers","",[[]],[DMS_MissionMarkerCount]],
|
["_markers","",[[]],[DMS_MissionMarkerCount]],
|
||||||
@ -103,9 +103,6 @@ try
|
|||||||
["_timeUntilFail",DMS_MissionTimeOut call DMS_fnc_SelectRandomVal,[0]]
|
["_timeUntilFail",DMS_MissionTimeOut call DMS_fnc_SelectRandomVal,[0]]
|
||||||
];
|
];
|
||||||
|
|
||||||
_units = _inputUnits call DMS_fnc_GetAllUnits;
|
|
||||||
|
|
||||||
|
|
||||||
if !(_missionObjs params
|
if !(_missionObjs params
|
||||||
[
|
[
|
||||||
["_buildings","",[[]]],
|
["_buildings","",[[]]],
|
||||||
@ -117,11 +114,14 @@ try
|
|||||||
throw format["_missionObjs |%1|",_missionObjs];
|
throw format["_missionObjs |%1|",_missionObjs];
|
||||||
};
|
};
|
||||||
|
|
||||||
_mines = [];
|
_mines =
|
||||||
|
|
||||||
if ((count _missionObjs)>3) then
|
if ((count _missionObjs)>3) then
|
||||||
{
|
{
|
||||||
_mines = _missionObjs param [3,[],[[]]];
|
_missionObjs param [3,[],[[]]]
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[]
|
||||||
};
|
};
|
||||||
|
|
||||||
// Don't spawn a minefield if there is one already defined in _missionObjs.
|
// Don't spawn a minefield if there is one already defined in _missionObjs.
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private ["_added", "_pos", "_onEndingScripts", "_completionInfo", "_timeOutInfo", "_units", "_inputUnits", "_missionObjs", "_mines", "_difficulty", "_side", "_messages", "_markers", "_arr", "_timeStarted", "_timeUntilFail", "_buildings", "_vehs", "_crate_info_array", "_missionName", "_msgWIN", "_msgLose", "_markerDot", "_markerCircle", "_missionEvents", "_onSuccessScripts", "_onFailScripts"];
|
private ["_added", "_pos", "_onEndingScripts", "_completionInfo", "_timeOutInfo", "_units", "_missionObjs", "_mines", "_difficulty", "_side", "_messages", "_markers", "_arr", "_timeStarted", "_timeUntilFail", "_buildings", "_vehs", "_crate_info_array", "_missionName", "_msgWIN", "_msgLose", "_markerDot", "_markerCircle", "_missionEvents", "_onSuccessScripts", "_onFailScripts"];
|
||||||
|
|
||||||
|
|
||||||
_added = false;
|
_added = false;
|
||||||
@ -78,7 +78,7 @@ if !(params
|
|||||||
["_completionInfo","",[[]]],
|
["_completionInfo","",[[]]],
|
||||||
["_groupReinforcementsInfo","",[[]]],
|
["_groupReinforcementsInfo","",[[]]],
|
||||||
["_timeOutInfo","",[[]],[1,2]],
|
["_timeOutInfo","",[[]],[1,2]],
|
||||||
["_inputUnits","",[[]]],
|
["_units","",[[]]],
|
||||||
["_missionObjs","",[[]],[3,4]],
|
["_missionObjs","",[[]],[3,4]],
|
||||||
["_messages","",[[]],[3]],
|
["_messages","",[[]],[3]],
|
||||||
["_markers","",[[]],[DMS_MissionMarkerCount]],
|
["_markers","",[[]],[DMS_MissionMarkerCount]],
|
||||||
@ -166,7 +166,7 @@ try
|
|||||||
_timeStarted,
|
_timeStarted,
|
||||||
_timeUntilFail
|
_timeUntilFail
|
||||||
],
|
],
|
||||||
_inputUnits,
|
_units,
|
||||||
[
|
[
|
||||||
_buildings,
|
_buildings,
|
||||||
_vehs,
|
_vehs,
|
||||||
@ -192,10 +192,10 @@ try
|
|||||||
DMS_StaticMission_Arr pushBack _arr;
|
DMS_StaticMission_Arr pushBack _arr;
|
||||||
_added = true;
|
_added = true;
|
||||||
|
|
||||||
if (DMS_MarkerText_ShowAICount) then
|
if (DMS_MarkerText_ShowAICount_Static) then
|
||||||
{
|
{
|
||||||
_markerDot = _markers select 0;
|
_markerDot = _markers select 0;
|
||||||
_markerDot setMarkerText (format ["%1 (%2 %3 remaining)",markerText _markerDot,count (_inputUnits call DMS_fnc_GetAllUnits),DMS_MarkerText_AIName]);
|
_markerDot setMarkerText (format ["%1 (%2 %3 remaining)",markerText _markerDot,count (_units call DMS_fnc_GetAllUnits),DMS_MarkerText_AIName]);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
if (DMS_DEBUG) then
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
A single object can also be used for (_this select 0)
|
A single object can also be used for (_this select 0)
|
||||||
*/
|
*/
|
||||||
if (DMS_CleanUpList isEqualTo []) exitWith {}; // Empty array, no objects to clean :)
|
|
||||||
|
|
||||||
{
|
{
|
||||||
if (DMS_DEBUG) then
|
if (DMS_DEBUG) then
|
||||||
|
@ -87,7 +87,7 @@ if (_randomMarker) then
|
|||||||
{
|
{
|
||||||
_dir = random 360;
|
_dir = random 360;
|
||||||
_dis = DMS_MarkerPosRandomRadius call DMS_fnc_SelectRandomVal;
|
_dis = DMS_MarkerPosRandomRadius call DMS_fnc_SelectRandomVal;
|
||||||
_npos = [_pos,_dis,_dir] call DMS_fnc_SelectOffsetPos;
|
_npos = _pos getPos [_dis,_dir];
|
||||||
|
|
||||||
_circle setMarkerPos _npos;
|
_circle setMarkerPos _npos;
|
||||||
_dot setMarkerPos _npos;
|
_dot setMarkerPos _npos;
|
||||||
|
@ -168,7 +168,7 @@ if ((_lootValues isEqualType []) && {!((_lootValues select 1) isEqualType {})})
|
|||||||
// Add weapons + mags
|
// Add weapons + mags
|
||||||
for "_i" from 1 to _wepCount do
|
for "_i" from 1 to _wepCount do
|
||||||
{
|
{
|
||||||
_weapon = _weps call BIS_fnc_selectRandom;
|
_weapon = selectRandom _weps;
|
||||||
_ammo = _weapon call DMS_fnc_selectMagazine;
|
_ammo = _weapon call DMS_fnc_selectMagazine;
|
||||||
if (_weapon isEqualType "") then
|
if (_weapon isEqualType "") then
|
||||||
{
|
{
|
||||||
@ -188,7 +188,7 @@ if ((_lootValues isEqualType []) && {!((_lootValues select 1) isEqualType {})})
|
|||||||
// Add items
|
// Add items
|
||||||
for "_i" from 1 to _itemCount do
|
for "_i" from 1 to _itemCount do
|
||||||
{
|
{
|
||||||
_item = _items call BIS_fnc_selectRandom;
|
_item = selectRandom _items;
|
||||||
if (_item isEqualType "") then
|
if (_item isEqualType "") then
|
||||||
{
|
{
|
||||||
_item = [_item,1];
|
_item = [_item,1];
|
||||||
@ -203,7 +203,7 @@ if ((_lootValues isEqualType []) && {!((_lootValues select 1) isEqualType {})})
|
|||||||
// Add backpacks
|
// Add backpacks
|
||||||
for "_i" from 1 to _backpackCount do
|
for "_i" from 1 to _backpackCount do
|
||||||
{
|
{
|
||||||
_backpack = _backpacks call BIS_fnc_selectRandom;
|
_backpack = selectRandom _backpacks;
|
||||||
if (_backpack isEqualType "") then
|
if (_backpack isEqualType "") then
|
||||||
{
|
{
|
||||||
_backpack = [_backpack,1];
|
_backpack = [_backpack,1];
|
||||||
@ -270,7 +270,7 @@ else
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if(DMS_RareLoot && {count DMS_RareLootList>0}) then
|
if (DMS_RareLoot) then
|
||||||
{
|
{
|
||||||
_rareLootChance =
|
_rareLootChance =
|
||||||
if ((count _this)>2) then
|
if ((count _this)>2) then
|
||||||
@ -285,7 +285,9 @@ if(DMS_RareLoot && {count DMS_RareLootList>0}) then
|
|||||||
// (Maybe) Add rare loot
|
// (Maybe) Add rare loot
|
||||||
if(random 100 < _rareLootChance) then
|
if(random 100 < _rareLootChance) then
|
||||||
{
|
{
|
||||||
_item = DMS_RareLootList call BIS_fnc_selectRandom;
|
for "_i" from 1 to DMS_RareLootAmount do
|
||||||
|
{
|
||||||
|
_item = selectRandom DMS_RareLootList;
|
||||||
if (_item isEqualType "") then
|
if (_item isEqualType "") then
|
||||||
{
|
{
|
||||||
_item = [_item,1];
|
_item = [_item,1];
|
||||||
@ -293,6 +295,7 @@ if(DMS_RareLoot && {count DMS_RareLootList>0}) then
|
|||||||
_crate addItemCargoGlobal _item;
|
_crate addItemCargoGlobal _item;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
// You can choose if you want to enable/disable smoke individually using setVariable.
|
// You can choose if you want to enable/disable smoke individually using setVariable.
|
||||||
if (_crate getVariable ["DMS_AllowSmoke", true]) then
|
if (_crate getVariable ["DMS_AllowSmoke", true]) then
|
||||||
|
@ -109,6 +109,11 @@ while{!_isValidSpot} do
|
|||||||
};
|
};
|
||||||
|
|
||||||
_isValidSpot = [_pos, _waterNearLimit, _minSurfaceNormal, _spawnZoneNearLimit, _traderZoneNearLimit, _missionNearLimit, _playerNearLimit, _territoryNearLimit, _waterSpawn] call DMS_fnc_IsValidPosition;
|
_isValidSpot = [_pos, _waterNearLimit, _minSurfaceNormal, _spawnZoneNearLimit, _traderZoneNearLimit, _missionNearLimit, _playerNearLimit, _territoryNearLimit, _waterSpawn] call DMS_fnc_IsValidPosition;
|
||||||
|
|
||||||
|
if (_attempts>5000) exitWith
|
||||||
|
{
|
||||||
|
diag_log format["DMS ERROR :: Number of attempts in DMS_fnc_findSafePos (%1) exceeded maximum number of attempts!",_attempts];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_pos set [2,0];
|
_pos set [2,0];
|
||||||
|
@ -0,0 +1,77 @@
|
|||||||
|
/*
|
||||||
|
DMS_fnc_FindSafePos_InRange
|
||||||
|
Created by eraser1
|
||||||
|
|
||||||
|
Exactly the same as DMS_fnc_FindSafePos except it only searches in a specific area as opposed to the whole map (minus the constraints of minimum distance from borders).
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
[
|
||||||
|
_centerPos, // ARRAY (position): 2D or 3D center position to search around.
|
||||||
|
_distanceMin, // SCALAR (distance): Minimum distance from the center position to search around. See note below for actual calculation of distance.
|
||||||
|
_distanceMax, // SCALAR (distance): Maximum distance from the center position to search around. NOTE: Due to the way this function works (because of efficiency) the practical maximum distance is actually distance*sqrt(2). Therefore, the distance parameter is not wholly accurate.
|
||||||
|
_posParameters // ARRAY: The parameters to determine the position you want. More detail below.
|
||||||
|
] call DMS_fnc_FindSafePos_InRange;
|
||||||
|
|
||||||
|
NOTE: I don't check to make sure "_distanceMax" is greater than "_distanceMin", so if you goof up, it's not on me. Also, if you set the values too close to each other, there's a good chance it's gonna result in performance issues and quite possibly no resulting position.
|
||||||
|
|
||||||
|
"_posParameters" is simply passed to "DMS_fnc_FindSafePos". See the usage of that function for more detail: https://github.com/Defent/DMS_Exile/blob/master/%40ExileServer/addons/a3_dms/scripts/fn_FindSafePos.sqf
|
||||||
|
|
||||||
|
Returns a position.
|
||||||
|
*/
|
||||||
|
|
||||||
|
private ["_centerPos", "_distance", "_posParameters", "_original_x", "_original_y", "_original_Blacklist", "_center_x", "_center_y", "_usePresetOriginal", "_pos"];
|
||||||
|
|
||||||
|
if !(params
|
||||||
|
[
|
||||||
|
["_centerPos", 0, [[]], [2,3]],
|
||||||
|
["_distanceMin", 0, [0]],
|
||||||
|
["_distanceMax", 0, [0]],
|
||||||
|
["_posParameters", 0, [[]]]
|
||||||
|
])
|
||||||
|
exitWith
|
||||||
|
{
|
||||||
|
diag_log format["DMS ERROR :: Calling DMS_fnc_FindSafePos_InRange with invalid parameters: %1",_this];
|
||||||
|
[]
|
||||||
|
};
|
||||||
|
|
||||||
|
// Save the original values
|
||||||
|
_original_x = DMS_MinMax_X_Coords;
|
||||||
|
_original_y = DMS_MinMax_Y_Coords;
|
||||||
|
_original_Blacklist = DMS_findSafePosBlacklist;
|
||||||
|
|
||||||
|
// Get the center values
|
||||||
|
_center_x = _centerPos select 0;
|
||||||
|
_center_y = _centerPos select 1;
|
||||||
|
|
||||||
|
// Set the restrictions
|
||||||
|
DMS_MinMax_X_Coords = [_center_x - _distanceMax, _center_x + _distanceMax];
|
||||||
|
DMS_MinMax_Y_Coords = [_center_y - _distanceMax, _center_y + _distanceMax];
|
||||||
|
|
||||||
|
DMS_findSafePosBlacklist =
|
||||||
|
if (_distanceMin>0) then
|
||||||
|
{
|
||||||
|
[
|
||||||
|
[
|
||||||
|
[_center_x - _distanceMin, _center_y - _distanceMin],
|
||||||
|
[_center_x + _distanceMin, _center_y + _distanceMin]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[]
|
||||||
|
};
|
||||||
|
|
||||||
|
_usePresetOriginal = DMS_UsePredefinedMissionLocations;
|
||||||
|
DMS_UsePredefinedMissionLocations = false;
|
||||||
|
|
||||||
|
// NOW we get the position (hopefully)
|
||||||
|
_pos = _posParameters call DMS_fnc_findSafePos;
|
||||||
|
|
||||||
|
// Reset the original values
|
||||||
|
DMS_MinMax_X_Coords = _original_x;
|
||||||
|
DMS_MinMax_Y_Coords = _original_y;
|
||||||
|
DMS_findSafePosBlacklist = _original_Blacklist;
|
||||||
|
DMS_UsePredefinedMissionLocations = _usePresetOriginal;
|
||||||
|
|
||||||
|
_pos
|
@ -38,9 +38,9 @@ switch (true) do
|
|||||||
|
|
||||||
case ((_weaponName find "9 mm") > -1) : {_result = "muzzle_snds_L";};
|
case ((_weaponName find "9 mm") > -1) : {_result = "muzzle_snds_L";};
|
||||||
|
|
||||||
case ((_weaponName find ".338") > -1) : {_result = ["muzzle_snds_338_black","muzzle_snds_338_green","muzzle_snds_338_sand"] call BIS_fnc_selectRandom;};
|
case ((_weaponName find ".338") > -1) : {_result = selectRandom ["muzzle_snds_338_black","muzzle_snds_338_green","muzzle_snds_338_sand"];};
|
||||||
|
|
||||||
case ((_weaponName find "9.3 mm") > -1) : {_result = ["muzzle_snds_93mmg","muzzle_snds_93mmg_tan"] call BIS_fnc_selectRandom;};
|
case ((_weaponName find "9.3 mm") > -1) : {_result = selectRandom ["muzzle_snds_93mmg","muzzle_snds_93mmg_tan"];};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Zafir accepts no suppressors :(
|
// Zafir accepts no suppressors :(
|
||||||
|
@ -39,28 +39,15 @@ _units = [];
|
|||||||
|
|
||||||
case "OBJECT":
|
case "OBJECT":
|
||||||
{
|
{
|
||||||
if (!(isNull _parameter) && {alive _parameter}) then
|
[
|
||||||
{
|
[],
|
||||||
[_parameter]
|
[_parameter]
|
||||||
}
|
] select (alive _parameter);
|
||||||
else
|
|
||||||
{
|
|
||||||
[]
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
case "GROUP":
|
case "GROUP":
|
||||||
{
|
{
|
||||||
if (!isNull _parameter) then
|
(units _parameter) select {alive _x};
|
||||||
{
|
|
||||||
{
|
|
||||||
if (alive _x) then
|
|
||||||
{
|
|
||||||
_units pushBack _x;
|
|
||||||
};
|
|
||||||
} forEach (units _parameter);
|
|
||||||
};
|
|
||||||
[]
|
|
||||||
};
|
};
|
||||||
|
|
||||||
default
|
default
|
||||||
|
35
@ExileServer/addons/a3_dms/scripts/fn_GetEmptySeats.sqf
Normal file
35
@ExileServer/addons/a3_dms/scripts/fn_GetEmptySeats.sqf
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
DMS_fnc_GetEmptySeats
|
||||||
|
Created by eraser1
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
_vehicle call DMS_fnc_GetEmptySeats;
|
||||||
|
or
|
||||||
|
[_vehicle] call DMS_fnc_GetEmptySeats;
|
||||||
|
|
||||||
|
Returns a list of empty cargo seats in the form of [[<Object>unit,<String>role,<Number>cargoIndex,<Array>turretPath,<Boolean>personTurret], ...].
|
||||||
|
"unit" will always be objNull.
|
||||||
|
|
||||||
|
See https://community.bistudio.com/wiki/fullCrew and https://community.bistudio.com/wiki/moveInCargo for more info.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if !(params
|
||||||
|
[
|
||||||
|
["_vehicle",objNull,[objNull]]
|
||||||
|
])
|
||||||
|
exitWith
|
||||||
|
{
|
||||||
|
diag_log format ["DMS ERROR :: Calling DMS_fnc_GetEmptySeats with invalid parameter(s): %1",_this];
|
||||||
|
};
|
||||||
|
|
||||||
|
(fullCrew [_vehicle, "", true]) select
|
||||||
|
{
|
||||||
|
_x params
|
||||||
|
[
|
||||||
|
"_unit",
|
||||||
|
"_role",
|
||||||
|
"_cargoIndex"
|
||||||
|
];
|
||||||
|
|
||||||
|
isNull _unit
|
||||||
|
};
|
@ -92,6 +92,19 @@
|
|||||||
]
|
]
|
||||||
NOTE: Every reinforcement vehicle counts as one unit given for monitor type "armed_vehicle" and "armed_vehicle_replace"
|
NOTE: Every reinforcement vehicle counts as one unit given for monitor type "armed_vehicle" and "armed_vehicle_replace"
|
||||||
|
|
||||||
|
"heli_troopers":
|
||||||
|
_monitorParams =
|
||||||
|
[
|
||||||
|
_AICount, // SCALAR: If the AI Group has fewer than "_AICount" living units, then the group will receive reinforcements.
|
||||||
|
_ejectFFVGunners, // BOOLEAN: Whether or not to eject Fire-From-Vehicle (FFV) gunners.
|
||||||
|
_maxJumpers, // SCALAR: Maximum number of AI to eject from the aircraft. Set to a really high # to ignore (like 999).
|
||||||
|
_remainAsGunship, // BOOLEAN: Whether or not to keep the heli flying around as a gunship.
|
||||||
|
_dropPoint, // OBJECT or ARRAY (OPTIONAL - Position2D or 3D): The location to drop the reinforcements at. The drop point will default to the group leader.
|
||||||
|
_heliClass, // STRING (OPTIONAL): The classname of the heli to spawn.
|
||||||
|
_spawnPos // ARRAY (OPTIONAL - Position2D or 3D): The position for the heli to spawn at.
|
||||||
|
]
|
||||||
|
This reinforcement type will attempt to drop the AI off at the group leader's position. The heli will spawn in the air 500-5000 meters away from the leader's position and 1000 meters away from a player (default).
|
||||||
|
|
||||||
Returns whether or not reinforcement waves or units given exceeds/matches maximum wave or unit reinforcements. If true, then no more reinforcements will be spawned (so the passed info should be deleted from the available reinforcements list).
|
Returns whether or not reinforcement waves or units given exceeds/matches maximum wave or unit reinforcements. If true, then no more reinforcements will be spawned (so the passed info should be deleted from the available reinforcements list).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -371,7 +384,7 @@ if (!_reinforcementsDepleted && {(diag_tickTime-_lastUpdated)>_updateDelay}) the
|
|||||||
_veh =
|
_veh =
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
if (_spawnLocations isEqualTo []) then {[_leaderPos,100+(random 200),random 360] call DMS_fnc_SelectOffsetPos} else {_spawnLocations call BIS_fnc_selectRandom},
|
if (_spawnLocations isEqualTo []) then {_leaderPos getPos [100+(random 200),random 360]} else {selectRandom _spawnLocations},
|
||||||
_leaderPos
|
_leaderPos
|
||||||
],
|
],
|
||||||
_AIGroup,
|
_AIGroup,
|
||||||
@ -417,7 +430,7 @@ if (!_reinforcementsDepleted && {(diag_tickTime-_lastUpdated)>_updateDelay}) the
|
|||||||
_vehicle =
|
_vehicle =
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
if (_spawnLocations isEqualTo []) then {[_leaderPos,100+(random 200),random 360] call DMS_fnc_SelectOffsetPos} else {_spawnLocations call BIS_fnc_selectRandom},
|
if (_spawnLocations isEqualTo []) then {[_leaderPos,100+(random 200),random 360] call DMS_fnc_SelectOffsetPos} else {selectRandom _spawnLocations},
|
||||||
_leaderPos
|
_leaderPos
|
||||||
],
|
],
|
||||||
_AIGroup,
|
_AIGroup,
|
||||||
@ -488,6 +501,58 @@ if (!_reinforcementsDepleted && {(diag_tickTime-_lastUpdated)>_updateDelay}) the
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
case "heli_troopers":
|
||||||
|
{
|
||||||
|
if !(_monitorParams params
|
||||||
|
[
|
||||||
|
["_AICount",0,[0]],
|
||||||
|
["_ejectFFVGunners",false,[false]],
|
||||||
|
["_maxJumpers",0,[0]],
|
||||||
|
["_remainAsGunship", 0, [false]]
|
||||||
|
])
|
||||||
|
exitWith
|
||||||
|
{
|
||||||
|
_reinforcementsDepleted = true;
|
||||||
|
diag_log format ["DMS ERROR :: Calling DMS_fnc_GroupReinforcementsManager with invalid _monitorParams: %1 | _monitorType: %2 | Setting _reinforcementsDepleted to true.",_monitorParams,_monitorType];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_remainingUnits<_AICount) then
|
||||||
|
{
|
||||||
|
private _dropPoint = if ((count _monitorParams)>4) then {_monitorParams param [4, getPosATL (leader _AIGroup), [objNull,[]], [2,3]]} else {getPosATL (leader _AIGroup)};
|
||||||
|
private _heliClass = if ((count _monitorParams)>5) then {_monitorParams param [5, "", [""]]} else {selectRandom DMS_ReinforcementHelis};
|
||||||
|
|
||||||
|
private _params =
|
||||||
|
[
|
||||||
|
_AIGroup,
|
||||||
|
_class,
|
||||||
|
_difficulty,
|
||||||
|
_side,
|
||||||
|
_dropPoint,
|
||||||
|
_ejectFFVGunners,
|
||||||
|
_maxJumpers,
|
||||||
|
_remainAsGunship,
|
||||||
|
_heliClass
|
||||||
|
];
|
||||||
|
|
||||||
|
if ((count _monitorParams)>6) then
|
||||||
|
{
|
||||||
|
_params pushBack (_monitorParams select 6);
|
||||||
|
};
|
||||||
|
|
||||||
|
private _heli = _params call DMS_fnc_SpawnHeliReinforcement;
|
||||||
|
|
||||||
|
// Every vehicle counts as one unit given, so the number of units given is equivalent to number of waves given.
|
||||||
|
_reinforcementWavesGiven = _reinforcementWavesGiven + 1;
|
||||||
|
_reinforcementUnitsGiven = _reinforcementWavesGiven;
|
||||||
|
|
||||||
|
|
||||||
|
if (DMS_DEBUG) then
|
||||||
|
{
|
||||||
|
(format["GroupReinforcementsManager :: Group %1 received a ""%2"" vehicle (%3) as reinforcements.", _AIGroup, typeOf _heliClass, _heli]) call DMS_fnc_DebugLog;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
default
|
default
|
||||||
{
|
{
|
||||||
_reinforcementsDepleted = true;
|
_reinforcementsDepleted = true;
|
||||||
|
@ -0,0 +1,163 @@
|
|||||||
|
/*
|
||||||
|
DMS_fnc_HeliParatroopers_Monitor
|
||||||
|
Created by eraser1
|
||||||
|
|
||||||
|
Used in Exile's thread system.
|
||||||
|
Every heli to be used as paratroopers has an index in "DMS_HeliParatrooper_Arr".
|
||||||
|
Every index has the values:
|
||||||
|
[
|
||||||
|
_heli, // OBJECT: The heli that holds the units.
|
||||||
|
_dropPoint, // ARRAY (POSITION2D or 3D): The position (or object) to which the troopers need to be dropped near.
|
||||||
|
_remainAsGunship // BOOLEAN: Whether or not to keep the heli flying around as a gunship.
|
||||||
|
]
|
||||||
|
|
||||||
|
This function also monitors "DMS_HelisToClean", which is a list that contains all helis to be deleted (after dropping paratroopers).
|
||||||
|
*/
|
||||||
|
|
||||||
|
{
|
||||||
|
private _heli = _x;
|
||||||
|
|
||||||
|
if (isNull _heli) then // Remove from list if the heli got deleted in some other way.
|
||||||
|
{
|
||||||
|
DMS_HelisToClean deleteAt _forEachIndex;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ // Then check to see if it's already destroyed somehow...
|
||||||
|
if !(alive _heli) exitWith
|
||||||
|
{
|
||||||
|
deleteVehicle _heli;
|
||||||
|
DMS_HelisToClean deleteAt _forEachIndex;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Otherwise check if there's a player within 1km.
|
||||||
|
if !([_heli, 1000] call DMS_fnc_IsPlayerNearby) then
|
||||||
|
{
|
||||||
|
{
|
||||||
|
deleteVehicle _x;
|
||||||
|
} forEach ((crew _heli) + [_heli]);
|
||||||
|
|
||||||
|
DMS_HelisToClean deleteAt _forEachIndex;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach DMS_HelisToClean;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
if !(_x params
|
||||||
|
[
|
||||||
|
["_heli", objNull, [objNull]],
|
||||||
|
["_dropPoint", 0, [[], objNull], [2,3]],
|
||||||
|
["_remainAsGunship", false, [false]]
|
||||||
|
])
|
||||||
|
exitWith
|
||||||
|
{
|
||||||
|
diag_log format["DMS ERROR :: Invalid index (%1) in DMS_HeliParatrooper_Arr: %2", _forEachIndex, DMS_HeliParatrooper_Arr deleteAt _forEachIndex];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (isNull _heli) exitWith
|
||||||
|
{
|
||||||
|
diag_log format["DMS ERROR :: Null _heli in DMS_HeliParatrooper_Arr (index %1). Parameters: %2", _forEachIndex, DMS_HeliParatrooper_Arr deleteAt _forEachIndex];
|
||||||
|
};
|
||||||
|
|
||||||
|
if !(alive _heli) exitWith
|
||||||
|
{
|
||||||
|
if (DMS_DEBUG) then
|
||||||
|
{
|
||||||
|
format["HeliParatroopers_Monitor :: Heli died before it could reach drop point. Parameters: %1", DMS_HeliParatrooper_Arr deleteAt _forEachIndex] call DMS_fnc_DebugLog;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if ((_heli distance2D _dropPoint)<200) then
|
||||||
|
{
|
||||||
|
private["_groupOwner","_AIGroup"];
|
||||||
|
|
||||||
|
_AIGroup = group _heli;
|
||||||
|
|
||||||
|
// Grab and lock locality to control AI if necessary.
|
||||||
|
if !(local _AIGroup) then
|
||||||
|
{
|
||||||
|
_groupOwner = groupOwner _AIGroup;
|
||||||
|
_AIGroup setVariable ["DMS_LockLocality", true];
|
||||||
|
_AIGroup setGroupOwner 2;
|
||||||
|
};
|
||||||
|
|
||||||
|
{
|
||||||
|
private _unit = _x;
|
||||||
|
|
||||||
|
if ((alive _unit) && {_unit getVariable ["DMS_Paratrooper", false]}) then
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
moveOut _unit;
|
||||||
|
private ["_parachute", "_dir"];
|
||||||
|
_parachute = createVehicle ["Steerable_Parachute_F", (getPosATL _unit), [], 0, "CAN_COLLIDE"];
|
||||||
|
_parachute setDir (getDir _unit);
|
||||||
|
_parachute enableSimulationGlobal true;
|
||||||
|
|
||||||
|
_unit moveInDriver _parachute;
|
||||||
|
*/
|
||||||
|
_unit action ["Eject", _heli];
|
||||||
|
_unit setDestination [_dropPoint, "LEADER DIRECT", true];
|
||||||
|
|
||||||
|
_unit setVariable ["DMS_AISpawnPos", _dropPoint];
|
||||||
|
};
|
||||||
|
} forEach (crew _heli);
|
||||||
|
|
||||||
|
if (_remainAsGunship) then
|
||||||
|
{
|
||||||
|
[
|
||||||
|
[driver _heli],
|
||||||
|
_AIGroup,
|
||||||
|
_dropPoint,
|
||||||
|
"heli",
|
||||||
|
"COMBAT"
|
||||||
|
] call DMS_fnc_SetGroupBehavior_Separate;
|
||||||
|
|
||||||
|
if (DMS_DEBUG) then
|
||||||
|
{
|
||||||
|
format["HeliParatroopers_Monitor :: Ordering heli (%1) to defend drop point position %2", _heli, _dropPoint] call DMS_fnc_DebugLog;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
private _pilot = driver _heli;
|
||||||
|
private _pilotGrp = createGroup (side _pilot);
|
||||||
|
private _newPos = _dropPoint getPos [2 * worldSize, random 360];
|
||||||
|
|
||||||
|
[_pilot] joinSilent _pilotGrp;
|
||||||
|
|
||||||
|
_pilot setDestination [_newPos, "VEHICLE PLANNED", true];
|
||||||
|
|
||||||
|
for "_i" from count (waypoints _pilotGrp) to 1 step -1 do
|
||||||
|
{
|
||||||
|
deleteWaypoint ((waypoints _pilotGrp) select _i);
|
||||||
|
};
|
||||||
|
|
||||||
|
private _wp = _pilotGrp addWaypoint [_newPos,5];
|
||||||
|
_wp setWaypointType "MOVE";
|
||||||
|
//{_pilot disableAI _x} forEach ["FSM", "AUTOCOMBAT", "CHECKVISIBLE", "TARGET", "AUTOTARGET"];
|
||||||
|
|
||||||
|
DMS_HelisToClean pushBack _heli;
|
||||||
|
|
||||||
|
if (DMS_DEBUG) then
|
||||||
|
{
|
||||||
|
format["HeliParatroopers_Monitor :: Ordering heli (%1) to fly away from drop point position %2", _heli, _dropPoint] call DMS_fnc_DebugLog;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
DMS_HeliParatrooper_Arr deleteAt _forEachIndex;
|
||||||
|
|
||||||
|
|
||||||
|
// Revert and unlock locality if necessary.
|
||||||
|
if !(isNil "_groupOwner") then
|
||||||
|
{
|
||||||
|
_AIGroup setGroupOwner _groupOwner;
|
||||||
|
_AIGroup setVariable ["DMS_LockLocality", false];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
(driver _heli) setDestination [_dropPoint, "VEHICLE PLANNED", true];
|
||||||
|
_heli flyInHeight DMS_RHeli_Height;
|
||||||
|
};
|
||||||
|
} forEach DMS_HeliParatrooper_Arr;
|
@ -43,12 +43,12 @@ if ((count _pos)<3) then
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
_objs = [];
|
|
||||||
|
|
||||||
|
|
||||||
_export = call compile preprocessFileLineNumbers (format ["\x\addons\DMS\objects\%1.sqf",_file]);
|
_export = call compile preprocessFileLineNumbers (format ["\x\addons\DMS\objects\%1.sqf",_file]);
|
||||||
|
|
||||||
|
_objs = _export apply
|
||||||
{
|
{
|
||||||
// Create the object
|
// Create the object
|
||||||
_obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
|
_obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||||
@ -69,8 +69,10 @@ _export = call compile preprocessFileLineNumbers (format ["\x\addons\DMS\objects
|
|||||||
_obj setPos _objPos;
|
_obj setPos _objPos;
|
||||||
};
|
};
|
||||||
|
|
||||||
_objs pushBack _obj;
|
_obj enableSimulationGlobal false;
|
||||||
} foreach _export;
|
|
||||||
|
_obj;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
_objs
|
_objs
|
@ -44,12 +44,12 @@ if ((count _missionPos)<3) then
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
_objs = [];
|
|
||||||
|
|
||||||
|
|
||||||
_export = call compile preprocessFileLineNumbers (format ["\x\addons\DMS\objects\static\%1.sqf",_file]);
|
_export = call compile preprocessFileLineNumbers (format ["\x\addons\DMS\objects\static\%1.sqf",_file]);
|
||||||
|
|
||||||
|
_objs = _export apply
|
||||||
{
|
{
|
||||||
private ["_obj","_pos"];
|
private ["_obj","_pos"];
|
||||||
_obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
|
_obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||||
@ -65,8 +65,11 @@ _export = call compile preprocessFileLineNumbers (format ["\x\addons\DMS\objects
|
|||||||
_obj setPosATL _pos;
|
_obj setPosATL _pos;
|
||||||
_obj setVectorDirAndUp (_x select 3);
|
_obj setVectorDirAndUp (_x select 3);
|
||||||
};
|
};
|
||||||
_objs pushBack _obj;
|
|
||||||
} foreach _export;
|
_obj enableSimulationGlobal false;
|
||||||
|
|
||||||
|
_obj;
|
||||||
|
};
|
||||||
|
|
||||||
[_objs,_missionPos] call DMS_fnc_setRelPositions;
|
[_objs,_missionPos] call DMS_fnc_setRelPositions;
|
||||||
|
|
||||||
|
@ -48,8 +48,7 @@ if ((isNil "_export") || {!(_export isEqualType [])}) exitWith
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
_objs = [];
|
_objs = _export apply
|
||||||
|
|
||||||
{
|
{
|
||||||
private ["_obj","_pos"];
|
private ["_obj","_pos"];
|
||||||
|
|
||||||
@ -68,8 +67,10 @@ _objs = [];
|
|||||||
_obj setVectorDirAndUp (_x select 3);
|
_obj setVectorDirAndUp (_x select 3);
|
||||||
};
|
};
|
||||||
|
|
||||||
_objs pushBack _obj;
|
_obj enableSimulationGlobal false;
|
||||||
} foreach _export;
|
|
||||||
|
_obj;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
_objs
|
_objs
|
@ -38,7 +38,7 @@ try
|
|||||||
|
|
||||||
for "_i" from 0 to 359 step 45 do
|
for "_i" from 0 to 359 step 45 do
|
||||||
{
|
{
|
||||||
if (surfaceIsWater ([_position,_radius,_i] call DMS_fnc_SelectOffsetPos)) then
|
if (surfaceIsWater (_position getPos [_radius,_i])) then
|
||||||
{
|
{
|
||||||
throw true;
|
throw true;
|
||||||
};
|
};
|
||||||
|
@ -85,7 +85,7 @@ else
|
|||||||
private "_dir";
|
private "_dir";
|
||||||
for "_dir" from 0 to 359 step 45 do
|
for "_dir" from 0 to 359 step 45 do
|
||||||
{
|
{
|
||||||
if (((surfaceNormal ([_pos,5,_dir] call DMS_fnc_SelectOffsetPos)) select 2)<_minSurfaceNormal) then
|
if (((surfaceNormal (_pos getPos [5,_dir])) select 2)<_minSurfaceNormal) then
|
||||||
{
|
{
|
||||||
throw ("a nearby steep location");
|
throw ("a nearby steep location");
|
||||||
};
|
};
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
|
|
||||||
A semi-full breakdown can be found in fn_AddMissionToMonitor.sqf
|
A semi-full breakdown can be found in fn_AddMissionToMonitor.sqf
|
||||||
*/
|
*/
|
||||||
if (DMS_Mission_Arr isEqualTo []) exitWith {}; // Empty array, no missions running
|
|
||||||
|
|
||||||
private ["_pos", "_completionInfo", "_timeStarted", "_failTime", "_units", "_buildings", "_vehs", "_crate_info_array", "_mines", "_missionName", "_msgWIN", "_msgLose", "_markers", "_missionSide", "_arr", "_cleanupList"];
|
private ["_pos", "_completionInfo", "_timeStarted", "_failTime", "_units", "_buildings", "_vehs", "_crate_info_array", "_mines", "_missionName", "_msgWIN", "_msgLose", "_markers", "_missionSide", "_arr", "_cleanupList"];
|
||||||
|
|
||||||
@ -228,8 +227,6 @@ private ["_pos", "_completionInfo", "_timeStarted", "_failTime", "_units", "_bui
|
|||||||
_dot setMarkerText (format ["%1 (%2 %3 remaining)",_text,count (_units call DMS_fnc_GetAllUnits),DMS_MarkerText_AIName]);
|
_dot setMarkerText (format ["%1 (%2 %3 remaining)",_text,count (_units call DMS_fnc_GetAllUnits),DMS_MarkerText_AIName]);
|
||||||
};
|
};
|
||||||
|
|
||||||
if !(_missionEvents isEqualTo []) then
|
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
Coming soon...
|
Coming soon...
|
||||||
|
|
||||||
@ -237,7 +234,6 @@ private ["_pos", "_completionInfo", "_timeStarted", "_failTime", "_units", "_bui
|
|||||||
_x call DMS_fnc_HandleMissionEvents;
|
_x call DMS_fnc_HandleMissionEvents;
|
||||||
} forEach _missionEvents;
|
} forEach _missionEvents;
|
||||||
*/
|
*/
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
if !(_onMonitorEnd isEqualTo {}) then
|
if !(_onMonitorEnd isEqualTo {}) then
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
|
|
||||||
A semi-full breakdown can be found in fn_AddStaticMissionToMonitor.sqf
|
A semi-full breakdown can be found in fn_AddStaticMissionToMonitor.sqf
|
||||||
*/
|
*/
|
||||||
if (DMS_StaticMission_Arr isEqualTo []) exitWith {}; // Empty array, no static missions running
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -232,8 +231,6 @@ if (DMS_StaticMission_Arr isEqualTo []) exitWith {}; // Empty array, no stati
|
|||||||
_dot setMarkerText (format ["%1 (%2 %3 remaining)",_text,count (_inputAIUnits call DMS_fnc_GetAllUnits),DMS_MarkerText_AIName]);
|
_dot setMarkerText (format ["%1 (%2 %3 remaining)",_text,count (_inputAIUnits call DMS_fnc_GetAllUnits),DMS_MarkerText_AIName]);
|
||||||
};
|
};
|
||||||
|
|
||||||
if !(_missionEvents isEqualTo []) then
|
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
Coming soon...
|
Coming soon...
|
||||||
|
|
||||||
@ -241,7 +238,6 @@ if (DMS_StaticMission_Arr isEqualTo []) exitWith {}; // Empty array, no stati
|
|||||||
_x call DMS_fnc_HandleMissionEvents;
|
_x call DMS_fnc_HandleMissionEvents;
|
||||||
} forEach _missionEvents;
|
} forEach _missionEvents;
|
||||||
*/
|
*/
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_AllowStaticReinforcements) then
|
if (DMS_AllowStaticReinforcements) then
|
||||||
|
@ -60,7 +60,7 @@ if (DMS_clear_AI_body && {(random 100) <= DMS_clear_AI_body_chance}) then
|
|||||||
if (DMS_ai_remove_launchers && {(_launcherVar != "") || {_launcher != ""}}) then
|
if (DMS_ai_remove_launchers && {(_launcherVar != "") || {_launcher != ""}}) then
|
||||||
{
|
{
|
||||||
// Because arma is stupid sometimes
|
// Because arma is stupid sometimes
|
||||||
if (_launcher=="") then
|
if (_launcher isEqualTo "") then
|
||||||
{
|
{
|
||||||
_launcher = _launcherVar;
|
_launcher = _launcherVar;
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ _grpUnits = (units _grp) - [_unit];
|
|||||||
// Give the AI a new leader if the killed unit was the leader
|
// Give the AI a new leader if the killed unit was the leader
|
||||||
if (!(_grpUnits isEqualTo []) && {(leader _grp) isEqualTo _unit}) then
|
if (!(_grpUnits isEqualTo []) && {(leader _grp) isEqualTo _unit}) then
|
||||||
{
|
{
|
||||||
_grp selectLeader (_grpUnits call BIS_fnc_selectRandom);
|
_grp selectLeader (selectRandom _grpUnits);
|
||||||
};
|
};
|
||||||
|
|
||||||
_av = _unit getVariable ["DMS_AssignedVeh",objNull];
|
_av = _unit getVariable ["DMS_AssignedVeh",objNull];
|
||||||
@ -114,9 +114,20 @@ if (!isNull _av) then
|
|||||||
|
|
||||||
|
|
||||||
// Destroy the vehicle and add it to cleanup if there are no active crew members of the vehicle.
|
// Destroy the vehicle and add it to cleanup if there are no active crew members of the vehicle.
|
||||||
if (_memCount<1) then
|
if (_memCount isEqualTo 0) then
|
||||||
{
|
{
|
||||||
if ((DMS_AI_destroyStaticWeapon && {(random 100)<DMS_AI_destroyStaticWeapon_chance}) || {!(_av isKindOf "StaticWeapon")}) then
|
/*
|
||||||
|
This is some pretty funky code because this is about the fastest way to do the task.
|
||||||
|
An "if-statement" inside another "if-statement" is almost as fast, but it isn't as slick ;)
|
||||||
|
*/
|
||||||
|
if
|
||||||
|
(
|
||||||
|
call
|
||||||
|
([
|
||||||
|
{ (random 100)<(_av getVariable ["DMS_DestructionChance",DMS_AI_destroyVehicleChance]) },
|
||||||
|
{ DMS_AI_destroyStaticWeapon && {(random 100)<(_av getVariable ["DMS_DestructionChance",DMS_AI_destroyStaticWeapon_chance])} }
|
||||||
|
] select (_av isKindOf "StaticWeapon"))
|
||||||
|
) then
|
||||||
{
|
{
|
||||||
_av setDamage 1;
|
_av setDamage 1;
|
||||||
_av setVariable ["ExileDiedAt",time];
|
_av setVariable ["ExileDiedAt",time];
|
||||||
@ -127,6 +138,15 @@ if (!isNull _av) then
|
|||||||
{
|
{
|
||||||
(format["OnKilled :: Destroying used AI vehicle %1, and disabling simulation.",typeOf _av]) call DMS_fnc_DebugLog;
|
(format["OnKilled :: Destroying used AI vehicle %1, and disabling simulation.",typeOf _av]) call DMS_fnc_DebugLog;
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_av lock 1;
|
||||||
|
|
||||||
|
if (DMS_DEBUG) then
|
||||||
|
{
|
||||||
|
(format["OnKilled :: Unlocking used AI vehicle (%1).",typeOf _av]) call DMS_fnc_DebugLog;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -156,6 +156,8 @@ if ((!isNull _playerObj) && {(_playerUID != "") && {_playerObj isKindOf "Exile_U
|
|||||||
(owner _playerObj) publicVariableClient "ExileClientPlayerScore";
|
(owner _playerObj) publicVariableClient "ExileClientPlayerScore";
|
||||||
ExileClientPlayerScore = nil;
|
ExileClientPlayerScore = nil;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//DONKEYPUNCH CUSTOM KILL STAT ADD FOR AI KILL
|
//DONKEYPUNCH CUSTOM KILL STAT ADD FOR AI KILL
|
||||||
if (DMS_Add_AIKill2DB) then
|
if (DMS_Add_AIKill2DB) then
|
||||||
{
|
{
|
||||||
@ -167,6 +169,7 @@ if ((!isNull _playerObj) && {(_playerUID != "") && {_playerObj isKindOf "Exile_U
|
|||||||
(owner _playerObj) publicVariableClient "ExileClientPlayerKills";
|
(owner _playerObj) publicVariableClient "ExileClientPlayerKills";
|
||||||
ExileClientPlayerKills = nil;
|
ExileClientPlayerKills = nil;
|
||||||
};
|
};
|
||||||
|
|
||||||
//DONKEYPUNCH CUSTOM KILL RANK CHANGE FOR AI KILL
|
//DONKEYPUNCH CUSTOM KILL RANK CHANGE FOR AI KILL
|
||||||
if (DMS_Enable_RankChange) then
|
if (DMS_Enable_RankChange) then
|
||||||
{
|
{
|
||||||
@ -180,6 +183,8 @@ if ((!isNull _playerObj) && {(_playerUID != "") && {_playerObj isKindOf "Exile_U
|
|||||||
ExileClientPlayerHumanity = nil;
|
ExileClientPlayerHumanity = nil;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
if (DMS_DEBUG) then
|
||||||
{
|
{
|
||||||
format ["PlayerAwardOnAIKill :: %1 (%2) awarded %3 poptabs and %4 respect for killing %5. Player's money is now %6, and respect is now %7. Roadkill: %8", name _playerObj, _playerUID, _moneyChange, _repChange, _unit, _playerMoney, _playerRespect, _roadKilled] call DMS_fnc_DebugLog;
|
format ["PlayerAwardOnAIKill :: %1 (%2) awarded %3 poptabs and %4 respect for killing %5. Player's money is now %6, and respect is now %7. Roadkill: %8", name _playerObj, _playerUID, _moneyChange, _repChange, _unit, _playerMoney, _playerRespect, _roadKilled] call DMS_fnc_DebugLog;
|
||||||
|
@ -40,7 +40,7 @@ if (_status == "win") then
|
|||||||
_markerDot setMarkerColor DMS_MissionMarkerWinDotColor;
|
_markerDot setMarkerColor DMS_MissionMarkerWinDotColor;
|
||||||
_markerDot setMarkerType DMS_MissionMarkerWinDot_Type;
|
_markerDot setMarkerType DMS_MissionMarkerWinDot_Type;
|
||||||
//_markerDot spawn {sleep DMS_MissionMarkerWinDotTime;deleteMarker _this;};
|
//_markerDot spawn {sleep DMS_MissionMarkerWinDotTime;deleteMarker _this;};
|
||||||
[DMS_MissionMarkerWinDotTime, {deleteMarker _this;}, _markerDot, false] call ExileServer_system_thread_addTask;
|
[DMS_MissionMarkerWinDotTime, {deleteMarker (_this select 0);}, [_markerDot], false] call ExileServer_system_thread_addTask;
|
||||||
if (DMS_DEBUG) then
|
if (DMS_DEBUG) then
|
||||||
{
|
{
|
||||||
(format ["RemoveMarkers :: %1 Marker will be removed in %2 seconds!",_markerDot,DMS_MissionMarkerWinDotTime]) call DMS_fnc_DebugLog;
|
(format ["RemoveMarkers :: %1 Marker will be removed in %2 seconds!",_markerDot,DMS_MissionMarkerWinDotTime]) call DMS_fnc_DebugLog;
|
||||||
@ -56,7 +56,7 @@ else
|
|||||||
_markerDot setMarkerColor DMS_MissionMarkerLoseDotColor;
|
_markerDot setMarkerColor DMS_MissionMarkerLoseDotColor;
|
||||||
_markerDot setMarkerType DMS_MissionMarkerLoseDot_Type;
|
_markerDot setMarkerType DMS_MissionMarkerLoseDot_Type;
|
||||||
//_markerDot spawn {sleep DMS_MissionMarkerLoseDotTime;deleteMarker _this;};
|
//_markerDot spawn {sleep DMS_MissionMarkerLoseDotTime;deleteMarker _this;};
|
||||||
[DMS_MissionMarkerLoseDotTime, {deleteMarker _this;}, _markerDot, false] call ExileServer_system_thread_addTask;
|
[DMS_MissionMarkerLoseDotTime, {deleteMarker (_this select 0);}, [_markerDot], false] call ExileServer_system_thread_addTask;
|
||||||
if (DMS_DEBUG) then
|
if (DMS_DEBUG) then
|
||||||
{
|
{
|
||||||
(format ["RemoveMarkers :: %1 Marker will be removed in %2 seconds!",_markerDot,DMS_MissionMarkerLoseDotTime]) call DMS_fnc_DebugLog;
|
(format ["RemoveMarkers :: %1 Marker will be removed in %2 seconds!",_markerDot,DMS_MissionMarkerLoseDotTime]) call DMS_fnc_DebugLog;
|
||||||
|
@ -26,7 +26,7 @@ if (diag_fps >= DMS_MinServerFPS && {(count allPlayers) >= DMS_MinPlayerCount})
|
|||||||
if (DMS_DynamicMission && {_time - DMS_BMissionLastStart > DMS_BMissionDelay}) then
|
if (DMS_DynamicMission && {_time - DMS_BMissionLastStart > DMS_BMissionDelay}) then
|
||||||
{
|
{
|
||||||
private "_mission";
|
private "_mission";
|
||||||
_mission = DMS_BanditMissionTypesArray call BIS_fnc_selectRandom;
|
_mission = selectRandom DMS_BanditMissionTypesArray;
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
if (DMS_DEBUG) then
|
||||||
{
|
{
|
||||||
@ -57,7 +57,7 @@ if (diag_fps >= DMS_MinServerFPS && {(count allPlayers) >= DMS_MinPlayerCount})
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_mission = _availableMissions call BIS_fnc_selectRandom;
|
_mission = selectRandom _availableMissions;
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
if (DMS_DEBUG) then
|
||||||
{
|
{
|
||||||
|
@ -4,21 +4,23 @@
|
|||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
[
|
[
|
||||||
_pos,
|
_origin, // OBJECT, or POSITION (2D or 3D): Center from which the offset position will be calculated.
|
||||||
_distance,
|
_distance, // SCALAR: Distance from the origin (meters)
|
||||||
_direction
|
_direction // SCALAR: Direction from the origin (degrees)
|
||||||
] call DMS_fnc_SelectOffsetPos;
|
] call DMS_fnc_SelectOffsetPos;
|
||||||
|
|
||||||
Returns a new position offset from the provided position with the provided distance and direction. Position provided is at ground level in ATL
|
Returns a new position offset from the provided position with the provided distance and direction. Position provided is at ground level in AGL
|
||||||
|
|
||||||
|
This function has been deprecated by the new functionality of the "getPos" command (https://community.bistudio.com/wiki/getPos). This function has been updated for efficiency and compatibility.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private ["_pos","_dis","_dir","_npos"];
|
private ["_origin","_dis","_dir","_npos"];
|
||||||
|
|
||||||
|
|
||||||
if !(params
|
if !(params
|
||||||
[
|
[
|
||||||
["_pos","",[[]],[2,3]],
|
["_origin","",[objNull,[]],[2,3]],
|
||||||
["_dis",0,[0]],
|
["_dis",0,[0]],
|
||||||
["_dir",0,[0]]
|
["_dir",0,[0]]
|
||||||
])
|
])
|
||||||
@ -28,9 +30,12 @@ exitWith
|
|||||||
[0,0,0]
|
[0,0,0]
|
||||||
};
|
};
|
||||||
|
|
||||||
if ((count _pos) isEqualTo 2) then
|
/*
|
||||||
|
if ((count _origin) isEqualTo 2) then
|
||||||
{
|
{
|
||||||
_pos set [2,0];
|
_origin set [2,0];
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
_pos vectorAdd [sin(_dir)*_dis,cos(_dir)*_dis,0]
|
//_origin vectorAdd [sin(_dir)*_dis,cos(_dir)*_dis,0] <-- Old code
|
||||||
|
_origin getPos [_dis,_dir]
|
||||||
|
@ -64,22 +64,22 @@ _difficulty =
|
|||||||
{
|
{
|
||||||
case "random":
|
case "random":
|
||||||
{
|
{
|
||||||
DMS_ai_skill_random call BIS_fnc_selectRandom;
|
selectRandom DMS_ai_skill_random;
|
||||||
};
|
};
|
||||||
|
|
||||||
case "randomdifficult":
|
case "randomdifficult":
|
||||||
{
|
{
|
||||||
DMS_ai_skill_randomDifficult call BIS_fnc_selectRandom;
|
selectRandom DMS_ai_skill_randomDifficult;
|
||||||
};
|
};
|
||||||
|
|
||||||
case "randomeasy":
|
case "randomeasy":
|
||||||
{
|
{
|
||||||
DMS_ai_skill_randomEasy call BIS_fnc_selectRandom;
|
selectRandom DMS_ai_skill_randomEasy;
|
||||||
};
|
};
|
||||||
|
|
||||||
case "randomintermediate":
|
case "randomintermediate":
|
||||||
{
|
{
|
||||||
DMS_ai_skill_randomIntermediate call BIS_fnc_selectRandom;
|
selectRandom DMS_ai_skill_randomIntermediate;
|
||||||
};
|
};
|
||||||
|
|
||||||
default
|
default
|
||||||
@ -100,12 +100,12 @@ for "_i" from count (waypoints _group) to 1 step -1 do
|
|||||||
// Add waypoints around the center position.
|
// Add waypoints around the center position.
|
||||||
for "_i" from 0 to 359 step 45 do
|
for "_i" from 0 to 359 step 45 do
|
||||||
{
|
{
|
||||||
_npos = [_pos,_radius,_i] call DMS_fnc_SelectOffsetPos;
|
_npos = _pos getPos [_radius,_i];
|
||||||
_wp = _group addWaypoint [_npos,5];
|
_wp = _group addWaypoint [_npos,5];
|
||||||
_wp setWaypointType "MOVE";
|
_wp setWaypointType "MOVE";
|
||||||
};
|
};
|
||||||
|
|
||||||
_wp = _group addWaypoint [[_pos,_radius,0] call DMS_fnc_SelectOffsetPos,0];
|
_wp = _group addWaypoint [_pos,0];
|
||||||
_wp setWaypointType "CYCLE";
|
_wp setWaypointType "CYCLE";
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,7 +40,8 @@ _tmpGroup = createGroup (side _finalGroup);
|
|||||||
|
|
||||||
_units joinSilent _tmpGroup;
|
_units joinSilent _tmpGroup;
|
||||||
|
|
||||||
_return = [
|
_return =
|
||||||
|
[
|
||||||
_tmpGroup,
|
_tmpGroup,
|
||||||
_pos,
|
_pos,
|
||||||
_difficulty,
|
_difficulty,
|
||||||
|
@ -95,7 +95,7 @@ if ((!isNil "_launcherType") || {DMS_ai_use_launchers && {DMS_ai_launchers_per_g
|
|||||||
{
|
{
|
||||||
_unit = _units select _i;
|
_unit = _units select _i;
|
||||||
|
|
||||||
_launcher = ((missionNamespace getVariable [format ["DMS_AI_wep_launchers_%1",_launcherType],["launch_NLAW_F"]]) call BIS_fnc_selectRandom);
|
_launcher = (selectRandom (missionNamespace getVariable [format ["DMS_AI_wep_launchers_%1",_launcherType],["launch_NLAW_F"]]));
|
||||||
|
|
||||||
removeBackpackGlobal _unit;
|
removeBackpackGlobal _unit;
|
||||||
_unit addBackpack "B_Carryall_mcamo";
|
_unit addBackpack "B_Carryall_mcamo";
|
||||||
|
@ -112,7 +112,7 @@ if ((!isNil "_launcherType") || {DMS_ai_use_launchers && {DMS_ai_launchers_per_g
|
|||||||
{
|
{
|
||||||
_unit = _units select _i;
|
_unit = _units select _i;
|
||||||
|
|
||||||
_launcher = ((missionNamespace getVariable [format ["DMS_AI_wep_launchers_%1",_launcherType],["launch_NLAW_F"]]) call BIS_fnc_selectRandom);
|
_launcher = (selectRandom (missionNamespace getVariable [format ["DMS_AI_wep_launchers_%1",_launcherType],["launch_NLAW_F"]]));
|
||||||
|
|
||||||
removeBackpackGlobal _unit;
|
removeBackpackGlobal _unit;
|
||||||
_unit addBackpack "B_Carryall_mcamo";
|
_unit addBackpack "B_Carryall_mcamo";
|
||||||
|
@ -65,22 +65,22 @@ _difficulty =
|
|||||||
{
|
{
|
||||||
case "random":
|
case "random":
|
||||||
{
|
{
|
||||||
DMS_ai_skill_random call BIS_fnc_selectRandom;
|
selectRandom DMS_ai_skill_random;
|
||||||
};
|
};
|
||||||
|
|
||||||
case "randomdifficult":
|
case "randomdifficult":
|
||||||
{
|
{
|
||||||
DMS_ai_skill_randomDifficult call BIS_fnc_selectRandom;
|
selectRandom DMS_ai_skill_randomDifficult;
|
||||||
};
|
};
|
||||||
|
|
||||||
case "randomeasy":
|
case "randomeasy":
|
||||||
{
|
{
|
||||||
DMS_ai_skill_randomEasy call BIS_fnc_selectRandom;
|
selectRandom DMS_ai_skill_randomEasy;
|
||||||
};
|
};
|
||||||
|
|
||||||
case "randomintermediate":
|
case "randomintermediate":
|
||||||
{
|
{
|
||||||
DMS_ai_skill_randomIntermediate call BIS_fnc_selectRandom;
|
selectRandom DMS_ai_skill_randomIntermediate;
|
||||||
};
|
};
|
||||||
|
|
||||||
default
|
default
|
||||||
@ -106,8 +106,6 @@ removeVest _unit;
|
|||||||
removeBackpackGlobal _unit;
|
removeBackpackGlobal _unit;
|
||||||
|
|
||||||
// Give default items
|
// Give default items
|
||||||
if !(DMS_ai_default_items isEqualTo []) then
|
|
||||||
{
|
|
||||||
{
|
{
|
||||||
// "Why doesn't linkItem work with any of these? Because fuck you, that's why" - BIS
|
// "Why doesn't linkItem work with any of these? Because fuck you, that's why" - BIS
|
||||||
if (_x in ["Binocular","Rangefinder","Laserdesignator","Laserdesignator_02","Laserdesignator_03"]) then
|
if (_x in ["Binocular","Rangefinder","Laserdesignator","Laserdesignator_02","Laserdesignator_03"]) then
|
||||||
@ -119,7 +117,6 @@ if !(DMS_ai_default_items isEqualTo []) then
|
|||||||
_unit linkItem _x;
|
_unit linkItem _x;
|
||||||
};
|
};
|
||||||
} forEach DMS_ai_default_items;
|
} forEach DMS_ai_default_items;
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
if (_class == "unarmed") then
|
if (_class == "unarmed") then
|
||||||
@ -131,7 +128,7 @@ else
|
|||||||
{
|
{
|
||||||
if (_class in DMS_ai_SupportedRandomClasses) then
|
if (_class in DMS_ai_SupportedRandomClasses) then
|
||||||
{
|
{
|
||||||
_class = (missionNamespace getVariable [format["DMS_%1_AI",_class], DMS_random_AI]) call BIS_fnc_selectRandom;
|
_class = selectRandom (missionNamespace getVariable [format["DMS_%1_AI",_class], DMS_random_AI]);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -165,10 +162,10 @@ if (!_useCustomGear) then
|
|||||||
|
|
||||||
|
|
||||||
// Clothes
|
// Clothes
|
||||||
_unit addHeadgear ((missionNamespace getVariable [format ["DMS_%1_helmets",_class],DMS_assault_helmets]) call BIS_fnc_selectRandom);
|
_unit addHeadgear (selectRandom (missionNamespace getVariable [format ["DMS_%1_helmets",_class],DMS_assault_helmets]));
|
||||||
_unit forceAddUniform ((missionNamespace getVariable [format ["DMS_%1_clothes",_class],DMS_assault_clothes]) call BIS_fnc_selectRandom);
|
_unit forceAddUniform (selectRandom (missionNamespace getVariable [format ["DMS_%1_clothes",_class],DMS_assault_clothes]));
|
||||||
_unit addVest ((missionNamespace getVariable [format ["DMS_%1_vests",_class],DMS_assault_vests]) call BIS_fnc_selectRandom);
|
_unit addVest (selectRandom (missionNamespace getVariable [format ["DMS_%1_vests",_class],DMS_assault_vests]));
|
||||||
_unit addBackpack ((missionNamespace getVariable [format ["DMS_%1_backpacks",_class],DMS_assault_backpacks]) call BIS_fnc_selectRandom);
|
_unit addBackpackGlobal (selectRandom (missionNamespace getVariable [format ["DMS_%1_backpacks",_class],DMS_assault_backpacks]));
|
||||||
|
|
||||||
// Make AI effective at night
|
// Make AI effective at night
|
||||||
_nighttime = (sunOrMoon != 1);
|
_nighttime = (sunOrMoon != 1);
|
||||||
@ -179,24 +176,24 @@ if (!_useCustomGear) then
|
|||||||
|
|
||||||
if (!_unarmed) then
|
if (!_unarmed) then
|
||||||
{
|
{
|
||||||
_weapon = (missionNamespace getVariable [format ["DMS_%1_weps",_class],DMS_assault_weps]) call BIS_fnc_selectRandom;
|
_weapon = selectRandom (missionNamespace getVariable [format ["DMS_%1_weps",_class],DMS_assault_weps]);
|
||||||
[_unit, _weapon, 6 + floor(random 3)] call BIS_fnc_addWeapon;
|
[_unit, _weapon, 6 + floor(random 3)] call BIS_fnc_addWeapon;
|
||||||
_unit selectWeapon _weapon;
|
_unit selectWeapon _weapon;
|
||||||
|
|
||||||
|
|
||||||
if((random 100) <= (missionNamespace getVariable [format["DMS_%1_optic_chance",_class],0])) then
|
if((random 100) <= (missionNamespace getVariable [format["DMS_%1_optic_chance",_class],0])) then
|
||||||
{
|
{
|
||||||
_unit addPrimaryWeaponItem ((missionNamespace getVariable [format ["DMS_%1_optics",_class],DMS_assault_optics]) call BIS_fnc_selectRandom);
|
_unit addPrimaryWeaponItem (selectRandom (missionNamespace getVariable [format ["DMS_%1_optics",_class],DMS_assault_optics]));
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_nighttime && {(random 100) <= DMS_ai_nighttime_accessory_chance}) then
|
if (_nighttime && {(random 100) <= DMS_ai_nighttime_accessory_chance}) then
|
||||||
{
|
{
|
||||||
_unit addPrimaryWeaponItem (["acc_pointer_IR","acc_flashlight"] call BIS_fnc_selectRandom);
|
_unit addPrimaryWeaponItem (selectRandom ["acc_pointer_IR","acc_flashlight"]);
|
||||||
};
|
};
|
||||||
|
|
||||||
if((random 100) <= (missionNamespace getVariable [format["DMS_%1_bipod_chance",_class],0])) then
|
if((random 100) <= (missionNamespace getVariable [format["DMS_%1_bipod_chance",_class],0])) then
|
||||||
{
|
{
|
||||||
_unit addPrimaryWeaponItem (DMS_ai_BipodList call BIS_fnc_selectRandom);
|
_unit addPrimaryWeaponItem (selectRandom DMS_ai_BipodList);
|
||||||
};
|
};
|
||||||
|
|
||||||
if((random 100) <= (missionNamespace getVariable [format["DMS_%1_suppressor_chance",_class],0])) then
|
if((random 100) <= (missionNamespace getVariable [format["DMS_%1_suppressor_chance",_class],0])) then
|
||||||
@ -222,7 +219,7 @@ if (!_useCustomGear) then
|
|||||||
_pistols = missionNamespace getVariable [format ["DMS_%1_pistols",_class],[]];
|
_pistols = missionNamespace getVariable [format ["DMS_%1_pistols",_class],[]];
|
||||||
if !(_pistols isEqualTo []) then
|
if !(_pistols isEqualTo []) then
|
||||||
{
|
{
|
||||||
_pistol = _pistols call BIS_fnc_selectRandom;
|
_pistol = selectRandom _pistols;
|
||||||
[_unit, _pistol, 2 + floor(random 2)] call BIS_fnc_addWeapon;
|
[_unit, _pistol, 2 + floor(random 2)] call BIS_fnc_addWeapon;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -275,7 +272,7 @@ else
|
|||||||
|
|
||||||
if !(_backpack isEqualTo "") then
|
if !(_backpack isEqualTo "") then
|
||||||
{
|
{
|
||||||
_unit addBackpack _backpack;
|
_unit addBackpackGlobal _backpack;
|
||||||
};
|
};
|
||||||
|
|
||||||
if !(_launcher isEqualTo "") then
|
if !(_launcher isEqualTo "") then
|
||||||
@ -374,16 +371,24 @@ _unit setCustomAimCoef (missionNamespace getVariable [format["DMS_AI_AimCoef_%1"
|
|||||||
_unit enableStamina (missionNamespace getVariable [format["DMS_AI_EnableStamina_%1",_difficulty], true]);
|
_unit enableStamina (missionNamespace getVariable [format["DMS_AI_EnableStamina_%1",_difficulty], true]);
|
||||||
|
|
||||||
|
|
||||||
_unit setVariable ["DMS_AISpawnTime", time];
|
|
||||||
_unit setVariable ["DMS_AI_Side", _side];
|
|
||||||
_unit setVariable ["DMS_AI_Type", _type];
|
|
||||||
|
|
||||||
if (_type=="Soldier") then
|
if (_type=="Soldier") then
|
||||||
{
|
{
|
||||||
_unit setVariable ["DMS_AISpawnPos",_pos];
|
_unit setVariable ["DMS_AISpawnPos",_pos];
|
||||||
_unit setVariable ["DMS_LastAIDistanceCheck",time];
|
_unit setVariable ["DMS_LastAIDistanceCheck",time];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Just use "Soldier" type for everything else.
|
||||||
|
if (_type == "Paratroopers") then
|
||||||
|
{
|
||||||
|
_type = "Soldier";
|
||||||
|
_unit addBackpackGlobal "B_Parachute";
|
||||||
|
};
|
||||||
|
|
||||||
|
_unit setVariable ["DMS_AISpawnTime", time];
|
||||||
|
_unit setVariable ["DMS_AI_Side", _side];
|
||||||
|
_unit setVariable ["DMS_AI_Type", _type];
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
if (DMS_DEBUG) then
|
||||||
{
|
{
|
||||||
(format ["SpawnAISoldier :: Spawned a %1 %2 %6 AI at %3 with %4 difficulty to group %5",_class,_side,_pos,_difficulty,_group,_type]) call DMS_fnc_DebugLog;
|
(format ["SpawnAISoldier :: Spawned a %1 %2 %6 AI at %3 with %4 difficulty to group %5",_class,_side,_pos,_difficulty,_group,_type]) call DMS_fnc_DebugLog;
|
||||||
|
@ -52,13 +52,12 @@ _guns = [];
|
|||||||
_MGClass = _MGClassInput;
|
_MGClass = _MGClassInput;
|
||||||
if (_MGClass == "random") then
|
if (_MGClass == "random") then
|
||||||
{
|
{
|
||||||
_MGClass = DMS_static_weapons call BIS_fnc_selectRandom;
|
_MGClass = selectRandom DMS_static_weapons;
|
||||||
};
|
};
|
||||||
|
|
||||||
_gun = createVehicle [_MGClass, [0,0,0], [], 0, "CAN_COLLIDE"];
|
_gun = createVehicle [_MGClass, [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||||
_gun setDir (random 360);
|
_gun setDir (random 360);
|
||||||
_gun setPosATL _pos;
|
_gun setPosATL _pos;
|
||||||
_gun addEventHandler ["GetOut",{(_this select 0) setDamage 1;}];
|
|
||||||
_gun lock 2;
|
_gun lock 2;
|
||||||
|
|
||||||
_group addVehicle _gun;
|
_group addVehicle _gun;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
[
|
[
|
||||||
[
|
[
|
||||||
_spawnPos, // The position at which the AI vehicle will spawn
|
_spawnPos, // The position at which the AI vehicle will spawn
|
||||||
_gotoPos // (OPTIONAL) The position to which the AI vehicle will drive to. If it isn't defined, _spawnPos is used
|
_gotoPos // (OPTIONAL) The position to which the AI vehicle will drive to. If it isn't defined, _spawnPos is used. <--- THIS IS NOT USED. I'm not sure why I included this.
|
||||||
],
|
],
|
||||||
_group, // Group to which the AI units belongs to
|
_group, // Group to which the AI units belongs to
|
||||||
_class, // Class: "random","assault","MG","sniper" or "unarmed"
|
_class, // Class: "random","assault","MG","sniper" or "unarmed"
|
||||||
@ -18,7 +18,7 @@
|
|||||||
Returns the spawned vehicle.
|
Returns the spawned vehicle.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private ["_OK", "_positions", "_veh", "_spawnPos", "_gotoPos", "_vehClass", "_driver", "_gunner", "_group", "_class", "_difficulty", "_side", "_crewCount"];
|
private ["_OK", "_positions", "_veh", "_spawnPos", "_vehClass", "_driver", "_gunner", "_group", "_class", "_difficulty", "_side", "_crewCount"];
|
||||||
|
|
||||||
|
|
||||||
if !(params
|
if !(params
|
||||||
@ -45,24 +45,25 @@ exitWith
|
|||||||
diag_log format ["DMS ERROR :: Calling DMS_fnc_SpawnAIVehicle with invalid _positions parameters: %1",_positions];
|
diag_log format ["DMS ERROR :: Calling DMS_fnc_SpawnAIVehicle with invalid _positions parameters: %1",_positions];
|
||||||
};
|
};
|
||||||
|
|
||||||
_gotoPos = if ((count _positions)>1) then {_positions param [1,_spawnPos,[[]],[2,3]]} else {_spawnPos};
|
_vehClass =
|
||||||
|
|
||||||
_vehClass = "random";
|
|
||||||
if ((count _this)>5) then
|
if ((count _this)>5) then
|
||||||
{
|
{
|
||||||
_vehClass = param [5,"random",[""]];
|
param [5,"random",[""]]
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
"random"
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_vehClass == "random") then
|
if (_vehClass == "random") then
|
||||||
{
|
{
|
||||||
_vehClass = DMS_ArmedVehicles call BIS_fnc_selectRandom;
|
_vehClass = selectRandom DMS_ArmedVehicles;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
_veh = createVehicle [_vehClass, _spawnPos, [], 0, "NONE"];
|
_veh = createVehicle [_vehClass, _spawnPos, [], 0, "NONE"];
|
||||||
_veh setFuel 1;
|
_veh setFuel 1;
|
||||||
_veh engineOn true;
|
_veh engineOn true;
|
||||||
_veh setDir (random 360);
|
|
||||||
_veh lock 2;
|
_veh lock 2;
|
||||||
|
|
||||||
_group addVehicle _veh;
|
_group addVehicle _veh;
|
||||||
@ -73,7 +74,7 @@ _driver setVariable ["DMS_AssignedVeh",_veh];
|
|||||||
|
|
||||||
_crewCount =
|
_crewCount =
|
||||||
{
|
{
|
||||||
_unit = [_group,_spawnPos,_class,_difficulty,_side,"Vehicle"] call DMS_fnc_SpawnAISoldier;
|
private _unit = [_group,_spawnPos,_class,_difficulty,_side,"Vehicle"] call DMS_fnc_SpawnAISoldier;
|
||||||
_unit moveInTurret [_veh, _x];
|
_unit moveInTurret [_veh, _x];
|
||||||
_unit setVariable ["DMS_AssignedVeh",_veh];
|
_unit setVariable ["DMS_AssignedVeh",_veh];
|
||||||
true
|
true
|
||||||
@ -82,7 +83,7 @@ _crewCount =
|
|||||||
|
|
||||||
if (DMS_DEBUG) then
|
if (DMS_DEBUG) then
|
||||||
{
|
{
|
||||||
(format ["SpawnAIVehicle :: Created a %1 armed vehicle (%2) with %7 crew members at %3 going to %4 with %5 difficulty to group %6.",_side,_vehClass,_spawnPos,_gotoPos,_difficulty,_group,_crewCount+1]) call DMS_fnc_DebugLog;
|
(format ["SpawnAIVehicle :: Created a %1 armed vehicle (%2) with %3 crew members at %4 with %5 difficulty to group %6.",_side,_vehClass,_crewCount+1,_spawnPos,_difficulty,_group]) call DMS_fnc_DebugLog;
|
||||||
};
|
};
|
||||||
|
|
||||||
_veh
|
_veh
|
||||||
|
@ -21,7 +21,7 @@ _mission =
|
|||||||
missionNamespace getVariable format
|
missionNamespace getVariable format
|
||||||
[
|
[
|
||||||
"DMS_Mission_%1",
|
"DMS_Mission_%1",
|
||||||
_this param [0, DMS_BanditMissionTypesArray call BIS_fnc_selectRandom, [""]]
|
_this param [0,selectRandom DMS_BanditMissionTypesArray, [""]]
|
||||||
]
|
]
|
||||||
] param [0, "no",[{}]];
|
] param [0, "no",[{}]];
|
||||||
|
|
||||||
|
178
@ExileServer/addons/a3_dms/scripts/fn_SpawnHeliReinforcement.sqf
Normal file
178
@ExileServer/addons/a3_dms/scripts/fn_SpawnHeliReinforcement.sqf
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
/*
|
||||||
|
DMS_fnc_SpawnHeliReinforcement
|
||||||
|
Created by eraser1
|
||||||
|
|
||||||
|
This function will create a heli/aircraft within "DMS_RHeli_MinDistFromDrop" to "DMS_RHeli_MaxDistFromDrop" meters and drop units at "_dropPoint".
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
[
|
||||||
|
_AIGroup, // GROUP: The group to which the heli will be assigned.
|
||||||
|
_class, // STRING: The class of AI to spawn in the heli.
|
||||||
|
_difficulty, // STRING: The difficulty of the AI to spawn in the heli.
|
||||||
|
_side, // STRING: The "side" that the AI are on.
|
||||||
|
_dropPoint, // OBJECT or ARRAY (Position2D or 3D): The location to drop the reinforcements at.
|
||||||
|
_ejectFFVGunners, // BOOLEAN: Whether or not to eject Fire-From-Vehicle (FFV) gunners.
|
||||||
|
_maxJumpers, // SCALAR: Maximum number of AI to eject from the aircraft. Set to a really high # to ignore (like 999).
|
||||||
|
_remainAsGunship, // BOOLEAN: Whether or not to keep the heli flying around as a gunship.
|
||||||
|
_heliClass, // STRING (OPTIONAL): The classname of the heli to spawn.
|
||||||
|
_spawnPos // ARRAY (OPTIONAL - Position2D or 3D): The position for the heli to spawn at.
|
||||||
|
] call DMS_fnc_SpawnHeliReinforcement;
|
||||||
|
|
||||||
|
Returns the index of the paratrooper info in "DMS_HeliParatrooper_Arr", -1 on error.
|
||||||
|
*/
|
||||||
|
|
||||||
|
private ["_heliClass", "_groupOwner", "_spawnPos", "_heli", "_pilot", "_units", "_crewCount", "_paratrooperCount", "_unit", "_cargoIndex"];
|
||||||
|
|
||||||
|
|
||||||
|
if !(params
|
||||||
|
[
|
||||||
|
["_AIGroup", 0, [grpNull]],
|
||||||
|
["_class", 0, [""]],
|
||||||
|
["_difficulty", 0, [""]],
|
||||||
|
["_side", 0, [""]],
|
||||||
|
["_dropPoint", 0, [[],objNull], [2,3]],
|
||||||
|
["_ejectFFVGunners", 0, [false]],
|
||||||
|
["_maxJumpers",0,[0]],
|
||||||
|
["_remainAsGunship", 0, [false]]
|
||||||
|
])
|
||||||
|
exitWith
|
||||||
|
{
|
||||||
|
diag_log format["DMS ERROR :: Calling DMS_fnc_SpawnHeliReinforcement with invalid parameters: %1",_this];
|
||||||
|
-1
|
||||||
|
};
|
||||||
|
|
||||||
|
if (isNull _AIGroup) exitWith
|
||||||
|
{
|
||||||
|
diag_log format["DMS ERROR :: Calling DMS_fnc_SpawnHeliReinforcement with null ""_AIGroup""! _this: %1 ",_this];
|
||||||
|
-1
|
||||||
|
};
|
||||||
|
|
||||||
|
_heliClass = if ((count _this)>8) then {_this param [8, "", [""]]} else {selectRandom DMS_ReinforcementHelis};
|
||||||
|
|
||||||
|
// Make the AI group local to add passengers.
|
||||||
|
if !(local _AIGroup) then
|
||||||
|
{
|
||||||
|
_groupOwner = groupOwner _AIGroup;
|
||||||
|
_AIGroup setGroupOwner 2;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Get the spawn position for the heli
|
||||||
|
_spawnPos =
|
||||||
|
if ((count _this)>9) then
|
||||||
|
{
|
||||||
|
_this param [9, [0,0,0], [[]], [2,3]]
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[
|
||||||
|
_dropPoint,
|
||||||
|
DMS_RHeli_MinDistFromDrop,
|
||||||
|
DMS_RHeli_MaxDistFromDrop,
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
DMS_RHeli_MinDistFromPlayers,
|
||||||
|
true,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
] call DMS_fnc_FindSafePos_InRange
|
||||||
|
};
|
||||||
|
_spawnPos set [2,DMS_RHeli_Height];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Spawn the heli
|
||||||
|
_heli = createVehicle [_heliClass, _spawnPos, [], 0, "FLY"];
|
||||||
|
_heli setFuel 1;
|
||||||
|
_heli engineOn true;
|
||||||
|
_heli lock 2;
|
||||||
|
|
||||||
|
_AIGroup addVehicle _heli;
|
||||||
|
|
||||||
|
|
||||||
|
// Spawn the AI paratroopers
|
||||||
|
_units = [];
|
||||||
|
_paratrooperCount = 0;
|
||||||
|
_crewCount =
|
||||||
|
{
|
||||||
|
_x params
|
||||||
|
[
|
||||||
|
"_unit",
|
||||||
|
"_role",
|
||||||
|
"_cargoIndex",
|
||||||
|
"_turretPath",
|
||||||
|
"_personTurret"
|
||||||
|
];
|
||||||
|
|
||||||
|
switch (_role) do
|
||||||
|
{
|
||||||
|
case "driver":
|
||||||
|
{
|
||||||
|
_unit = [_AIGroup,_spawnPos,_class,_difficulty,_side,"Vehicle"] call DMS_fnc_SpawnAISoldier;
|
||||||
|
_unit moveInDriver _heli;
|
||||||
|
_unit setVariable ["DMS_AssignedVeh",_heli];
|
||||||
|
_pilot = _unit;
|
||||||
|
};
|
||||||
|
|
||||||
|
case "commander";
|
||||||
|
case "gunner";
|
||||||
|
case "turret":
|
||||||
|
{
|
||||||
|
if (_ejectFFVGunners && {_personTurret} && {_paratrooperCount < _maxJumpers}) then
|
||||||
|
{
|
||||||
|
_unit = [_AIGroup,_spawnPos,_class,_difficulty,_side,"Paratroopers"] call DMS_fnc_SpawnAISoldier;
|
||||||
|
|
||||||
|
_unit setVariable ["DMS_Paratrooper", true];
|
||||||
|
_paratrooperCount = _paratrooperCount + 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_unit = [_AIGroup,_spawnPos,_class,_difficulty,_side,"Vehicle"] call DMS_fnc_SpawnAISoldier;
|
||||||
|
_unit setVariable ["DMS_AssignedVeh",_heli];
|
||||||
|
};
|
||||||
|
|
||||||
|
_unit moveInTurret [_heli, _x];
|
||||||
|
};
|
||||||
|
|
||||||
|
case "cargo":
|
||||||
|
{
|
||||||
|
if (_paratrooperCount < _maxJumpers) then
|
||||||
|
{
|
||||||
|
_unit = [_AIGroup,_spawnPos,_class,_difficulty,_side,"Paratroopers"] call DMS_fnc_SpawnAISoldier;
|
||||||
|
_unit moveInCargo [_heli, _cargoIndex];
|
||||||
|
|
||||||
|
_unit setVariable ["DMS_Paratrooper", true];
|
||||||
|
_paratrooperCount = _paratrooperCount + 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
_units pushBack _unit;
|
||||||
|
|
||||||
|
true
|
||||||
|
} count (fullCrew [_heli, "", true]);
|
||||||
|
|
||||||
|
|
||||||
|
// Set the heli pilot's behavior.
|
||||||
|
_pilot setDestination [_dropPoint, "VEHICLE PLANNED", true];
|
||||||
|
_heli flyInHeight DMS_RHeli_Height;
|
||||||
|
|
||||||
|
|
||||||
|
_units joinSilent _AIGroup;
|
||||||
|
|
||||||
|
// Reset ownership if needed.
|
||||||
|
if !(isNil "_groupOwner") then
|
||||||
|
{
|
||||||
|
_AIGroup setGroupOwner _groupOwner;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (DMS_DEBUG) then
|
||||||
|
{
|
||||||
|
(format ["SpawnHeliReinforcement :: Created a %1 heli (%2) with %3 crew members at %4 with %5 difficulty to group %6, going to %7. Units: %8",_side,_heliClass,_crewCount+1,_spawnPos,_difficulty,_AIGroup,_dropPoint,_units]) call DMS_fnc_DebugLog;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Add the necessary information to the monitor.
|
||||||
|
DMS_HeliParatrooper_Arr pushBack [_heli, _dropPoint, _remainAsGunship];
|
@ -66,7 +66,7 @@ if (DMS_SpawnMinesAroundMissions) then
|
|||||||
{
|
{
|
||||||
private ["_minePos", "_mine"];
|
private ["_minePos", "_mine"];
|
||||||
|
|
||||||
_minePos = [_centerPos,random _radius,random 360] call DMS_fnc_SelectOffsetPos;
|
_minePos = _centerPos getPos [random _radius,random 360];
|
||||||
_mine = createMine ["ATMine", [0,0,0], [], 0];
|
_mine = createMine ["ATMine", [0,0,0], [], 0];
|
||||||
|
|
||||||
// Fixes players shooting the mine and causing premature 'splosions
|
// Fixes players shooting the mine and causing premature 'splosions
|
||||||
@ -92,7 +92,7 @@ if (DMS_SpawnMinesAroundMissions) then
|
|||||||
{
|
{
|
||||||
_sign = createVehicle ["Land_Sign_Mines_F", [0,0,0], [], 0, "CAN_COLLIDE"];
|
_sign = createVehicle ["Land_Sign_Mines_F", [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||||
_sign setDir (180+_i);
|
_sign setDir (180+_i);
|
||||||
_sign setPosATL ([_centerPos, _radius+2, _randDirOffset+_i] call DMS_fnc_SelectOffsetPos);
|
_sign setPosATL (_centerPos getPos [_radius+2, _randDirOffset+_i]);
|
||||||
_sign setVectorUp [0,0,1];
|
_sign setVectorUp [0,0,1];
|
||||||
|
|
||||||
// _mines array is for only cleanup atm, so just add them to the list
|
// _mines array is for only cleanup atm, so just add them to the list
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
private ["_missionType", "_mission", "_parameters", "_return"];
|
private ["_missionType", "_mission", "_parameters", "_return"];
|
||||||
|
|
||||||
|
|
||||||
_missionType = param [0, DMS_StaticMissionTypesArray call BIS_fnc_selectRandom, [""]];
|
_missionType = param [0, selectRandom DMS_StaticMissionTypesArray, [""]];
|
||||||
|
|
||||||
_mission =
|
_mission =
|
||||||
[
|
[
|
||||||
|
@ -28,9 +28,9 @@ try
|
|||||||
|
|
||||||
_lastDistanceCheckTime = _x getVariable ["DMS_LastAIDistanceCheck",time];
|
_lastDistanceCheckTime = _x getVariable ["DMS_LastAIDistanceCheck",time];
|
||||||
_pos = getPosWorld _x;
|
_pos = getPosWorld _x;
|
||||||
_spawnPos = _x getVariable ["DMS_AISpawnPos",_pos];
|
_spawnPos = _x getVariable ["DMS_AISpawnPos",0];
|
||||||
|
|
||||||
if ((DMS_MaxAIDistance>0) && {((time - _lastDistanceCheckTime)>DMS_AIDistanceCheckFrequency) && {(_pos distance2D _spawnPos)>DMS_MaxAIDistance}}) then
|
if ((DMS_MaxAIDistance>0) && {!(_spawnPos isEqualTo 0)} && {((time - _lastDistanceCheckTime)>DMS_AIDistanceCheckFrequency) && {(_pos distance2D _spawnPos)>DMS_MaxAIDistance}}) then
|
||||||
{
|
{
|
||||||
_x setDamage 1;
|
_x setDamage 1;
|
||||||
diag_log format ["Killed a runaway unit! |%1| was more than %2m away from its spawn position %3!",_x,DMS_MaxAIDistance,_spawnPos];
|
diag_log format ["Killed a runaway unit! |%1| was more than %2m away from its spawn position %3!",_x,DMS_MaxAIDistance,_spawnPos];
|
||||||
|
105
README.md
105
README.md
@ -112,12 +112,12 @@ ___
|
|||||||
- [shaworth](https://github.com/shaworth) and [KawaiiPotato](https://github.com/KawaiiPotato) for making the README all nice and pretty :)
|
- [shaworth](https://github.com/shaworth) and [KawaiiPotato](https://github.com/KawaiiPotato) for making the README all nice and pretty :)
|
||||||
- [maca134](http://maca134.co.uk/portfolio/m3editor-arma-3-map-editor/) for M3Editor Stuff
|
- [maca134](http://maca134.co.uk/portfolio/m3editor-arma-3-map-editor/) for M3Editor Stuff
|
||||||
- [Darth Rogue from SOA](http://soldiersofanarchy.net/) for the awesome base for the first DMS static mission :D
|
- [Darth Rogue from SOA](http://soldiersofanarchy.net/) for the awesome base for the first DMS static mission :D
|
||||||
- [William from Refugees of the Fallen](http://refugeesofthefallen.enjin.com/) for the amazing slums static mission base and ideas :)
|
- [William from Refugees of the Fallen](http://rtfgaming.com/) for the amazing slums static mission base and ideas :)
|
||||||
- [DONKEYPUNCH](https://github.com/donkeypunchepoch) for everything on the [February 17th 2016 commit](https://github.com/Defent/DMS_Exile#february-17-2016-600-pm-cst-america) ;)
|
- [DONKEYPUNCH](https://github.com/donkeypunchepoch) for everything on the [February 17th 2016 commit](https://github.com/Defent/DMS_Exile#february-17-2016-600-pm-cst-america) ;)
|
||||||
- Everbody's feedback on [the DMS thread on exile forums](http://www.exilemod.com/topic/61-dms-defents-mission-system/?do=findComment&comment=242)
|
- Everbody's feedback on [the DMS thread on exile forums](http://www.exilemod.com/topic/61-dms-defents-mission-system/?do=findComment&comment=242)
|
||||||
|
|
||||||
#### Testers/Reporters:
|
#### Testers/Reporters:
|
||||||
- [William from Refugees of the Fallen](http://refugeesofthefallen.enjin.com/)
|
- [William from Refugees of the Fallen](http://rtfgaming.com/)
|
||||||
- [JamieKG from Eternal Gamer](http://eternal-gamer.com/)
|
- [JamieKG from Eternal Gamer](http://eternal-gamer.com/)
|
||||||
- [Valthos from The Altis Project](https://www.thealtisproject.co.uk/)
|
- [Valthos from The Altis Project](https://www.thealtisproject.co.uk/)
|
||||||
- [Flowrider from Optimum Gaming](http://www.optimum-multigaming.com/)
|
- [Flowrider from Optimum Gaming](http://www.optimum-multigaming.com/)
|
||||||
@ -151,6 +151,105 @@ ___
|
|||||||
___
|
___
|
||||||
|
|
||||||
# Changelog:
|
# Changelog:
|
||||||
|
#### April 27, 2016 (6:45 PM CST-America, RC):
|
||||||
|
* **NEW CONFIG VALUES**
|
||||||
|
|
||||||
|
DMS_SpawnMissions_Scheduled
|
||||||
|
DMS_AI_WP_Radius_heli
|
||||||
|
DMS_AI_WP_Radius_heli
|
||||||
|
DMS_RHeli_Height
|
||||||
|
DMS_RHeli_MinDistFromDrop
|
||||||
|
DMS_RHeli_MaxDistFromDrop
|
||||||
|
DMS_RHeli_MinDistFromPlayers
|
||||||
|
DMS_RareLootAmount
|
||||||
|
DMS_ReinforcementHelis
|
||||||
|
* Several optimizations (mostly due to the new scripting commands introduced in 1.56)
|
||||||
|
* You can now spawn missions in scheduled environment.
|
||||||
|
* DMS Version is set in the "config.cpp", and grabbed in pre-init.
|
||||||
|
* You can now define how much rare loot to spawn.
|
||||||
|
* Limit # of attempts in "DMS_fnc_FindSafePos" to 5000.
|
||||||
|
* New function: DMS_fnc_FindSafePos_InRange; Uses "DMS_fnc_FindSafePos" and edits some variables to return a "safe" position within a certain area.
|
||||||
|
* New function: DMS_fnc_GetEmptySeats; Returns all empty seats in a vehicle. Not used by DMS, I thought I needed it and I realized I didn't afterwards.
|
||||||
|
* New function: DMS_fnc_HeliParatroopers_Monitor; Monitors helis/aircraft spawned for paratroopers.
|
||||||
|
* New function: DMS_fnc_SpawnHeliReinforcement; Spawns a heli/aircraft with paratroopers for reinforcement.
|
||||||
|
* New group reinforcement type: "heli_troopers".
|
||||||
|
* You can now choose whether or not to destroy or simply unlock a used AI vehicle (with a random percentage chance).
|
||||||
|
* You can now use "setVariable" to define individually on an AI vehicle its "DMS_DestructionChance". EG: ```_vehicle setVariable ["DMS_DestructionChance",100];``` to always destroy a vehicle when its crew is dead.
|
||||||
|
* "DMS_DestructionChance" values are defaulted to "DMS_AI_destroyStaticWeapon_chance" or "DMS_AI_destroyVehicleChance" for static or regular vehicles, respectively.
|
||||||
|
* Fixed an issue where static weapons would always be destroyed, ignoring other configs. Thanks to [second_coming](http://www.exilemod.com/profile/60-second_coming/)!
|
||||||
|
* Disable simulation on objects imported from M3Editor. (Thanks to [second_coming](http://www.exilemod.com/profile/60-second_coming/) for the tip).
|
||||||
|
* Fixed an issue where AI units would be shown in static missions if configured to do so for dynamic missions (at least at first).
|
||||||
|
|
||||||
|
### Test Branch (Now Integrated Live):
|
||||||
|
#### List Of new Config values:
|
||||||
|
|
||||||
|
DMS_SpawnMissions_Scheduled
|
||||||
|
DMS_AI_WP_Radius_heli
|
||||||
|
DMS_AI_WP_Radius_heli
|
||||||
|
DMS_RHeli_Height
|
||||||
|
DMS_RHeli_MinDistFromDrop
|
||||||
|
DMS_RHeli_MaxDistFromDrop
|
||||||
|
DMS_RHeli_MinDistFromPlayers
|
||||||
|
DMS_RareLootAmount
|
||||||
|
DMS_ReinforcementHelis
|
||||||
|
|
||||||
|
#### April 20, 2016 (5:45 PM CST-America, RC):
|
||||||
|
* The new "DMS_fnc_FindSafePos_InRange" function will ignore the config "DMS_UsePredefinedMissionLocations".
|
||||||
|
* Disable simulation on objects imported from M3Editor. (Thanks to [second_coming](http://www.exilemod.com/profile/60-second_coming/) for the tip)
|
||||||
|
|
||||||
|
#### April 15, 2016 (8:45 PM CST-America, RC):
|
||||||
|
* Fixed an issue where static weapons would always be destroyed, ignoring other configs. Thanks to [second_coming](http://www.exilemod.com/profile/60-second_coming/)!
|
||||||
|
|
||||||
|
#### April 15, 2016 (9:30 AM CST-America, RC):
|
||||||
|
* Fixed script error in OnKilled EH when handling a used AI vehicle.
|
||||||
|
|
||||||
|
#### April 14, 2016 (9:20 PM CST-America, RC):
|
||||||
|
* Fix script error with saltflats.
|
||||||
|
* "DMS_fnc_AddMissionToMonitor" will no longer convert given AI parameters to a list of objects, so you can now add other units to the mission (within the same group) without much issue.
|
||||||
|
* Micro-optimizations here and there.
|
||||||
|
* Fixed an issue with DMS_fnc_GetAllUnits such that it would return an empty list if given a list of AI objects.
|
||||||
|
* You can now set the maximum limit of paratrooper reinforcements.
|
||||||
|
* The pilot of the reinforcement heli should now fly away properly if configured to do so.
|
||||||
|
* Updated group reinforcement manager for compatibility with latest syntax for paratrooper reinforcements (NOTE: UNTESTED).
|
||||||
|
|
||||||
|
|
||||||
|
#### March 31, 2016 (6:00 PM CST-America):
|
||||||
|
* You can now use "setVariable" to define individually on an AI vehicle its "DMS_DestructionChance". EG: ```_vehicle setVariable ["DMS_DestructionChance",100];``` to always destroy a vehicle when its crew is dead.
|
||||||
|
* "DMS_DestructionChance" values are defaulted to "DMS_AI_destroyStaticWeapon_chance" or "DMS_AI_destroyVehicleChance" for static or regular vehicles, respectively.
|
||||||
|
* Optimization + code cleanup for "DMS_fnc_SpawnHeliReinforcement".
|
||||||
|
|
||||||
|
#### March 25, 2016 (6:00 PM CST-America):
|
||||||
|
* **NEW CONFIG VALUES:**
|
||||||
|
|
||||||
|
DMS_AI_WP_Radius_heli
|
||||||
|
DMS_AI_WP_Radius_heli
|
||||||
|
DMS_RHeli_Height
|
||||||
|
DMS_RHeli_MinDistFromDrop
|
||||||
|
DMS_RHeli_MaxDistFromDrop
|
||||||
|
DMS_RHeli_MinDistFromPlayers
|
||||||
|
DMS_RareLootAmount
|
||||||
|
DMS_ReinforcementHelis
|
||||||
|
* DMS Version is set in the "config.cpp", and grabbed in pre-init.
|
||||||
|
* You can now define how much rare loot to spawn.
|
||||||
|
* Limit # of attempts in "DMS_fnc_FindSafePos" to 5000.
|
||||||
|
* New function: DMS_fnc_FindSafePos_InRange; Uses "DMS_fnc_FindSafePos" and edits some variables to return a "safe" position within a certain area.
|
||||||
|
* New function: DMS_fnc_GetEmptySeats; Returns all empty seats in a vehicle. Not used by DMS, I thought I needed it and I realized I didn't afterwards.
|
||||||
|
* New function: DMS_fnc_HeliParatroopers_Monitor; Monitors helis/aircraft spawned for paratroopers. **NOT YET COMPLETE**
|
||||||
|
* New function: DMS_fnc_SpawnHeliReinforcement; Spawns a heli/aircraft with paratroopers for reinforcement. **NOT YET COMPLETE**
|
||||||
|
* New group reinforcement type: "heli_troopers". Changes most likely to come.
|
||||||
|
* You can now choose whether or not to destroy or simply unlock a used AI vehicle (with a random percentage chance).
|
||||||
|
* Slight optimizations here and there (more to come).
|
||||||
|
|
||||||
|
#### March 1, 2016 (12:30 AM CST-America):
|
||||||
|
* Initial Test Branch commit
|
||||||
|
* **NEW CONFIG VALUE:** DMS_SpawnMissions_Scheduled
|
||||||
|
* Several optimizations (mostly due to the new scripting commands introduced in 1.56)
|
||||||
|
* You can now spawn missions in scheduled environment.
|
||||||
|
|
||||||
|
### End "March 1, 2016" Test Branch
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### February 19, 2016 (5:45 PM CST-America):
|
#### February 19, 2016 (5:45 PM CST-America):
|
||||||
* Fixed a minor typo with a variable (part of the new Humanity support by DonkeyPunch).
|
* Fixed a minor typo with a variable (part of the new Humanity support by DonkeyPunch).
|
||||||
|
|
||||||
@ -310,7 +409,7 @@ ___
|
|||||||
* Please check out the new config values in config.sqf to see what they do :)
|
* Please check out the new config values in config.sqf to see what they do :)
|
||||||
* Fixed issue with "thieves" mission (and DMS-spawned persistent vehicles in general). Big thank you to [JamieKG from Eternal Gamer](http://eternal-gamer.com/) and Torndeco.
|
* Fixed issue with "thieves" mission (and DMS-spawned persistent vehicles in general). Big thank you to [JamieKG from Eternal Gamer](http://eternal-gamer.com/) and Torndeco.
|
||||||
* **New static mission: "slums"**
|
* **New static mission: "slums"**
|
||||||
* Credit for the base goes to [William from Refugees of the Fallen](http://refugeesofthefallen.enjin.com/)
|
* Credit for the base goes to [William from Refugees of the Fallen](http://rtfgaming.com/)
|
||||||
* Spawns 2 crates at 2 different locations from a list of 5 locations.
|
* Spawns 2 crates at 2 different locations from a list of 5 locations.
|
||||||
* No AI vehicles, only infantry (introduces Close Quarters Combat)
|
* No AI vehicles, only infantry (introduces Close Quarters Combat)
|
||||||
* Added to Altis by default.
|
* Added to Altis by default.
|
||||||
|
Loading…
Reference in New Issue
Block a user