mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
Use config function definitions
Thanks for the tip Zupa!
This commit is contained in:
parent
bc2a2ead33
commit
687bbfb798
@ -138,11 +138,11 @@ class FSM
|
||||
name = "Check_Mission_Running";
|
||||
itemno = 6;
|
||||
init = /*%FSM<STATEINIT""">*/"if(DMS_DEBUG) then {" \n
|
||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling DMS_MissionsMonitor""];" \n
|
||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling DMS_fnc_MissionsMonitor""];" \n
|
||||
"};" \n
|
||||
"" \n
|
||||
"_missionsMonitor = diag_tickTime;" \n
|
||||
"call DMS_MissionsMonitor;"/*%FSM</STATEINIT""">*/;
|
||||
"call DMS_fnc_MissionsMonitor;"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
@ -166,11 +166,11 @@ class FSM
|
||||
name = "Mission_Cleanup";
|
||||
itemno = 11;
|
||||
init = /*%FSM<STATEINIT""">*/"if(DMS_DEBUG) then {" \n
|
||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling DMS_CleanUpManager""];" \n
|
||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling DMS_fnc_CleanUpManager""];" \n
|
||||
"};" \n
|
||||
"" \n
|
||||
"_cleanupTime = diag_tickTime;" \n
|
||||
"call DMS_CleanUpManager;"/*%FSM</STATEINIT""">*/;
|
||||
"call DMS_fnc_CleanUpManager;"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
@ -223,11 +223,11 @@ class FSM
|
||||
name = "Select_Mission";
|
||||
itemno = 15;
|
||||
init = /*%FSM<STATEINIT""">*/"if(DMS_DEBUG) then {" \n
|
||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling DMS_selectMission""];" \n
|
||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling DMS_fnc_SelectMission""];" \n
|
||||
"};" \n
|
||||
"" \n
|
||||
"_selectMission = diag_tickTime;" \n
|
||||
"call DMS_selectMission;"/*%FSM</STATEINIT""">*/;
|
||||
"call DMS_fnc_SelectMission;"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
@ -251,11 +251,11 @@ class FSM
|
||||
name = "Set_AI_Ownership";
|
||||
itemno = 18;
|
||||
init = /*%FSM<STATEINIT""">*/"if(DMS_DEBUG) then {" \n
|
||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling DMS_SetAILocality""];" \n
|
||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling DMS_fnc_SetAILocality""];" \n
|
||||
"};" \n
|
||||
"" \n
|
||||
"_aiLocality = diag_tickTime;" \n
|
||||
"call DMS_AILocalityManager;"/*%FSM</STATEINIT""">*/;
|
||||
"call DMS_fnc_AILocalityManager;"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
class CfgPatches {
|
||||
class A3_dms {
|
||||
class CfgPatches
|
||||
{
|
||||
class A3_dms
|
||||
{
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
a3_DMS_version = 2.0;
|
||||
@ -7,17 +9,48 @@ class CfgPatches {
|
||||
requiredAddons[] = {"exile_client","exile_server_config"};
|
||||
};
|
||||
};
|
||||
class CfgFunctions {
|
||||
class dms {
|
||||
class main {
|
||||
class CfgFunctions
|
||||
{
|
||||
class DMS
|
||||
{
|
||||
class main
|
||||
{
|
||||
file = "\x\addons\dms";
|
||||
class DMS_preInit
|
||||
{
|
||||
preInit = 1;
|
||||
};
|
||||
class DMS_postInit {
|
||||
class DMS_postInit
|
||||
{
|
||||
postInit = 1;
|
||||
};
|
||||
};
|
||||
class compiles
|
||||
{
|
||||
file = "\x\addons\dms\scripts";
|
||||
class AddMissionToMonitor {};
|
||||
class AILocalityManager {};
|
||||
class BroadcastMissionStatus {};
|
||||
class CleanUp {};
|
||||
class CleanUpManager {};
|
||||
class CreateMarker {};
|
||||
class FillCrate {};
|
||||
class FindSafePos {};
|
||||
class FindSuppressor {};
|
||||
class IsNearWater {};
|
||||
class MissionsMonitor {};
|
||||
class MissionSuccessState {};
|
||||
class OnKilled {};
|
||||
class RemoveMarkers {};
|
||||
class SelectMagazine {};
|
||||
class SelectMission {};
|
||||
class SetAILocality {};
|
||||
class SetGroupBehavior {};
|
||||
class SpawnAIGroup {};
|
||||
class SpawnAISoldier {};
|
||||
class SpawnCrate {};
|
||||
class SpawnNonPersistentVehicle {};
|
||||
class TargetsKilled {};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -3,9 +3,6 @@
|
||||
Made for Defent for Defents Mission System
|
||||
And for Numenadayz.com
|
||||
Written by eraser1
|
||||
|
||||
|
||||
[_delay, _function, _params, _persistance] call ExileServer_system_thread_addTask;
|
||||
*/
|
||||
|
||||
RESISTANCE setFriend[WEST,0];
|
||||
@ -15,16 +12,6 @@ EAST setFriend[RESISTANCE,0];
|
||||
EAST setFriend[WEST,0];
|
||||
WEST setFriend[EAST,0];
|
||||
|
||||
_code =
|
||||
{
|
||||
"DMS_HC_INIT" addPublicVariableEventHandler
|
||||
{
|
||||
DMS_HC_Object = _this select 1 select 0;
|
||||
diag_log format ["DMS Headless Client :: DMS_HC_Object = %1 | serverTime: %2",DMS_HC_Object,(_this select 1 select 1)];
|
||||
};
|
||||
};
|
||||
[0, _code, [], false] call ExileServer_system_thread_addTask;
|
||||
|
||||
|
||||
if(DMS_StaticMission) then
|
||||
{
|
||||
|
@ -1,43 +1,17 @@
|
||||
/*
|
||||
DMS Pre-init (compiles)
|
||||
DMS Pre-init
|
||||
Written by eraser1 (trainwreckdayz.com)
|
||||
*/
|
||||
|
||||
/* compiles
|
||||
spawn_static = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\spawn_static.sqf";
|
||||
heli_para = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\heli_para.sqf";
|
||||
heli_patrol = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\heli_patrol.sqf";
|
||||
vehicle_patrol = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\vehicle_patrol.sqf";
|
||||
vehicle_monitor = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\vehicle_monitor.sqf";
|
||||
/* Future stuff
|
||||
DMS_SpawnStatic = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\SpawnStatic.sqf";
|
||||
DMS_HeliPara = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\HeliPara.sqf";
|
||||
DMS_HeliPatrol = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\HeliPatrol.sqf";
|
||||
DMS_VehPatrol = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\VehPatrol.sqf";
|
||||
DMS_VehMonitor = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\VehMonitor.sqf";
|
||||
*/
|
||||
|
||||
DMS_HC_Object = objNull;
|
||||
|
||||
//Completed or WIP
|
||||
DMS_selectMission = compileFinal preprocessFileLineNumbers "\x\addons\dms\missions\SelectMission.sqf";
|
||||
DMS_MissionsMonitor = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\MissionsMonitor.sqf";
|
||||
DMS_MissionSuccessState = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\MissionSuccessState.sqf";
|
||||
DMS_findSafePos = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\FindSafePos.sqf";
|
||||
DMS_BroadcastMissionStatus = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\BroadcastMissionStatus.sqf";
|
||||
DMS_CleanUp = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\CleanUp.sqf";
|
||||
DMS_CleanUpManager = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\CleanUpManager.sqf";
|
||||
DMS_isPlayerNearbyARRAY = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\IsPlayerNearbyARRAY.sqf";
|
||||
DMS_FillCrate = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\FillCrate.sqf";
|
||||
DMS_isNearWater = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\IsNearWater.sqf";
|
||||
DMS_RemoveMarkers = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\RemoveMarkers.sqf";
|
||||
DMS_selectMagazine = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\SelectMagazine.sqf";
|
||||
DMS_TargetsKilled = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\TargetsKilled.sqf";
|
||||
DMS_SpawnAIGroup = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\SpawnAIGroup.sqf";
|
||||
DMS_SpawnAISoldier = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\SpawnAISoldier.sqf";
|
||||
DMS_OnKilled = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\OnKilled.sqf";
|
||||
DMS_SetGroupBehavior = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\SetGroupBehavior.sqf";
|
||||
DMS_AddMissionToMonitor = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\AddMissionToMonitor.sqf";
|
||||
DMS_CreateMarker = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\CreateMarker.sqf";
|
||||
DMS_FindSuppressor = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\FindSuppressor.sqf";
|
||||
DMS_SpawnCrate = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\SpawnCrate.sqf";
|
||||
DMS_SetAILocality = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\SetAILocality.sqf";
|
||||
DMS_AILocalityManager = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\AILocalityManager.sqf";
|
||||
DMS_SpawnNonPersistentVehicle = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\SpawnNonPersistentVehicle.sqf";
|
||||
DMS_HC_Object = objNull;
|
||||
|
||||
//Load config
|
||||
call compileFinal preprocessFileLineNumbers "\x\addons\dms\config.sqf";
|
@ -16,7 +16,7 @@ _side = "bandit";
|
||||
|
||||
|
||||
// find position
|
||||
_pos = [10,100] call DMS_findSafePos;
|
||||
_pos = [10,100] call DMS_fnc_findSafePos;
|
||||
|
||||
|
||||
// Set general mission difficulty
|
||||
@ -34,12 +34,12 @@ _group =
|
||||
"random", // "random","hardcore","difficult","moderate", or "easy"
|
||||
"random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_SpawnAIGroup;
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
|
||||
// Create Crates
|
||||
_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_SpawnCrate;
|
||||
_crate2 = ["Box_NATO_Wps_F",[(_pos select 0)+2,(_pos select 1)-1,0]] call DMS_SpawnCrate;
|
||||
_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
_crate2 = ["Box_NATO_Wps_F",[(_pos select 0)+2,(_pos select 1)-1,0]] call DMS_fnc_SpawnCrate;
|
||||
|
||||
_wreck = createVehicle ["Land_Wreck_Ural_F",[(_pos select 0) - 10, (_pos select 1),-0.2],[], 0, "CAN_COLLIDE"];
|
||||
|
||||
@ -91,7 +91,7 @@ _markers =
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_CreateMarker;
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
@ -119,7 +119,7 @@ _added =
|
||||
[_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side
|
||||
] call DMS_AddMissionToMonitor;
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
@ -138,7 +138,7 @@ if !(_added) exitWith
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_CleanUp;
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
@ -151,7 +151,7 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
// Notify players
|
||||
_msgStart call DMS_BroadcastMissionStatus;
|
||||
_msgStart call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@ _side = "bandit";
|
||||
|
||||
|
||||
// find position
|
||||
_pos = [10,100] call DMS_findSafePos;
|
||||
_pos = [10,100] call DMS_fnc_findSafePos;
|
||||
|
||||
|
||||
// Set general mission difficulty
|
||||
@ -34,11 +34,11 @@ _group =
|
||||
"random", // "random","hardcore","difficult","moderate", or "easy"
|
||||
"random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_SpawnAIGroup;
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
|
||||
// Create Crate
|
||||
_crate = ["Box_NATO_Wps_F",_pos] call DMS_SpawnCrate;
|
||||
_crate = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
// Set crate loot values
|
||||
_crate_loot_values =
|
||||
@ -82,7 +82,7 @@ _markers =
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_CreateMarker;
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
@ -110,7 +110,7 @@ _added =
|
||||
[_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side
|
||||
] call DMS_AddMissionToMonitor;
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
@ -129,7 +129,7 @@ if !(_added) exitWith
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_CleanUp;
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
@ -142,7 +142,7 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
// Notify players
|
||||
_msgStart call DMS_BroadcastMissionStatus;
|
||||
_msgStart call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@ _side = "bandit";
|
||||
|
||||
|
||||
// find position
|
||||
_pos = [10,100] call DMS_findSafePos;
|
||||
_pos = [10,100] call DMS_fnc_findSafePos;
|
||||
|
||||
|
||||
// Set general mission difficulty
|
||||
@ -34,11 +34,11 @@ _group =
|
||||
"random", // "random","hardcore","difficult","moderate", or "easy"
|
||||
"random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_SpawnAIGroup;
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
|
||||
// Create Crate
|
||||
_crate = ["Box_NATO_Wps_F",_pos] call DMS_SpawnCrate;
|
||||
_crate = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
// Set crate loot values
|
||||
_crate_loot_values =
|
||||
@ -82,7 +82,7 @@ _markers =
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_CreateMarker;
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
@ -110,7 +110,7 @@ _added =
|
||||
[_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side
|
||||
] call DMS_AddMissionToMonitor;
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
@ -129,7 +129,7 @@ if !(_added) exitWith
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_CleanUp;
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
@ -142,7 +142,7 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
// Notify players
|
||||
_msgStart call DMS_BroadcastMissionStatus;
|
||||
_msgStart call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ _side = "bandit";
|
||||
|
||||
|
||||
// find position
|
||||
_pos = call DMS_findSafePos;
|
||||
_pos = call DMS_fnc_findSafePos;
|
||||
|
||||
|
||||
// Set general mission difficulty
|
||||
@ -31,11 +31,11 @@ _group =
|
||||
"random", // "random","hardcore","difficult","moderate", or "easy"
|
||||
"random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_SpawnAIGroup;
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
|
||||
// Create Crate
|
||||
_crate = ["Box_NATO_Wps_F",_pos] call DMS_SpawnCrate;
|
||||
_crate = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
// Set crate loot values
|
||||
_crate_loot_values =
|
||||
@ -78,7 +78,7 @@ _markers =
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_CreateMarker;
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
@ -106,7 +106,7 @@ _added =
|
||||
[_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side
|
||||
] call DMS_AddMissionToMonitor;
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
@ -125,7 +125,7 @@ if !(_added) exitWith
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_CleanUp;
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
@ -138,7 +138,7 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
// Notify players
|
||||
_msgStart call DMS_BroadcastMissionStatus;
|
||||
_msgStart call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ _side = "bandit";
|
||||
|
||||
|
||||
// find position
|
||||
_pos = call DMS_findSafePos;
|
||||
_pos = call DMS_fnc_findSafePos;
|
||||
|
||||
|
||||
// Set general mission difficulty
|
||||
@ -31,11 +31,11 @@ _group =
|
||||
"difficult", // "random","hardcore","difficult","moderate", or "easy"
|
||||
"random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_SpawnAIGroup;
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
|
||||
// Create Crate
|
||||
_crate = ["Box_NATO_Wps_F",_pos] call DMS_SpawnCrate;
|
||||
_crate = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
// Set crate loot values
|
||||
_crate_loot_values =
|
||||
@ -79,7 +79,7 @@ _markers =
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_CreateMarker;
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
@ -107,7 +107,7 @@ _added =
|
||||
[_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side
|
||||
] call DMS_AddMissionToMonitor;
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
@ -126,7 +126,7 @@ if !(_added) exitWith
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_CleanUp;
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
@ -139,7 +139,7 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
// Notify players
|
||||
_msgStart call DMS_BroadcastMissionStatus;
|
||||
_msgStart call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ _side = "bandit";
|
||||
|
||||
|
||||
// find position
|
||||
_pos = call DMS_findSafePos;
|
||||
_pos = call DMS_fnc_findSafePos;
|
||||
|
||||
|
||||
// Set general mission difficulty
|
||||
@ -31,11 +31,11 @@ _group =
|
||||
"hardcore", // "random","hardcore","difficult","moderate", or "easy"
|
||||
"random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_SpawnAIGroup;
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
|
||||
// Create Crate
|
||||
_crate = ["Box_NATO_Wps_F",_pos] call DMS_SpawnCrate;
|
||||
_crate = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
// Set crate loot values
|
||||
_crate_loot_values =
|
||||
@ -79,7 +79,7 @@ _markers =
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_CreateMarker;
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
@ -107,7 +107,7 @@ _added =
|
||||
[_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side
|
||||
] call DMS_AddMissionToMonitor;
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
@ -126,7 +126,7 @@ if !(_added) exitWith
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_CleanUp;
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
@ -139,7 +139,7 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
// Notify players
|
||||
_msgStart call DMS_BroadcastMissionStatus;
|
||||
_msgStart call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@ _side = "bandit";
|
||||
|
||||
|
||||
// find position
|
||||
_pos = [10,100] call DMS_findSafePos;
|
||||
_pos = [10,100] call DMS_fnc_findSafePos;
|
||||
|
||||
|
||||
// Set general mission difficulty
|
||||
@ -34,11 +34,11 @@ _group =
|
||||
"random", // "random","hardcore","difficult","moderate", or "easy"
|
||||
"random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_SpawnAIGroup;
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
|
||||
// Create Crate
|
||||
_crate = ["Box_NATO_Wps_F",_pos] call DMS_SpawnCrate;
|
||||
_crate = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
_wreck1 = createVehicle ["Land_i_Shop_01_V1_F",[(_pos select 0) - 10, (_pos select 1),-0.1],[], 0, "CAN_COLLIDE"];
|
||||
_wreck2 = createVehicle ["Land_Sacks_goods_F",[(_pos select 0) - 2, (_pos select 1),-0.8],[], 0, "CAN_COLLIDE"];
|
||||
_wreck3 = createVehicle ["Land_StallWater_F",[(_pos select 0) - 5, (_pos select 1),-0.8],[], 0, "CAN_COLLIDE"];
|
||||
@ -64,8 +64,8 @@ _missionAIUnits =
|
||||
_missionObjs =
|
||||
[
|
||||
[_wreck1,_wreck2,_wreck3,_wreck4,_wreck5],
|
||||
[_crate],
|
||||
_crate_loot_values
|
||||
[],
|
||||
[[_crate,_crate_loot_values]]
|
||||
];
|
||||
|
||||
// Define Mission Start message
|
||||
@ -87,7 +87,7 @@ _markers =
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_CreateMarker;
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
@ -115,7 +115,7 @@ _added =
|
||||
[_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side
|
||||
] call DMS_AddMissionToMonitor;
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
@ -130,7 +130,7 @@ if !(_added) exitWith
|
||||
|
||||
_cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
|
||||
|
||||
_cleanup call DMS_CleanUp;
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
@ -143,7 +143,7 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
// Notify players
|
||||
_msgStart call DMS_BroadcastMissionStatus;
|
||||
_msgStart call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
DMS_AILocalityManager
|
||||
DMS_fnc_AILocalityManager
|
||||
Created by Defent and eraser1
|
||||
|
||||
Offloads AI groups to a nearby client in order to improve server performance.
|
||||
@ -34,7 +34,7 @@ if !(DMS_ai_offload_to_client) exitWith {};
|
||||
|
||||
if ((isNull _owner) || {(_owner distance2D _leader)>3500}) then
|
||||
{
|
||||
[_group,_leader] call DMS_SetAILocality;
|
||||
[_group,_leader] call DMS_fnc_SetAILocality;
|
||||
};
|
||||
}
|
||||
else
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
DMS_AddMissionToMonitor
|
||||
DMS_fnc_AddMissionToMonitor
|
||||
Created by eraser1
|
||||
|
||||
Parses and adds mission information to "DMS_Mission_Arr" for Mission Monitoring.
|
||||
@ -43,7 +43,7 @@
|
||||
[_msgWIN,_msgLose],
|
||||
[_markerDot,_markerCircle],
|
||||
_side
|
||||
] call DMS_AddMissionToMonitor;
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
Returns whether or not info was added successfully
|
||||
|
||||
@ -69,7 +69,7 @@ _OK = params
|
||||
|
||||
if (!_OK) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Calling DMS_AddMissionToMonitor with invalid parameters: %1",_this];
|
||||
diag_log format ["DMS ERROR :: Calling DMS_fnc_AddMissionToMonitor with invalid parameters: %1",_this];
|
||||
false;
|
||||
};
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
DMS_BroadcastMissionStatus
|
||||
DMS_fnc_BroadcastMissionStatus
|
||||
Created by eraser1
|
||||
|
||||
Usage:
|
||||
_message call DMS_BroadcastMissionStatus;
|
||||
_message call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
Requires "DMS_PlayerNotificationTypes".
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
DMS_CleanUp
|
||||
DMS_fnc_CleanUp
|
||||
Created by eraser1
|
||||
|
||||
Usage:
|
||||
@ -8,10 +8,10 @@
|
||||
_objectOrGroup2,
|
||||
...
|
||||
_objectOrGroupN
|
||||
] call DMS_CleanUp;
|
||||
] call DMS_fnc_CleanUp;
|
||||
|
||||
Alternative Usage:
|
||||
_objectOrGroup call DMS_CleanUp;
|
||||
_objectOrGroup call DMS_fnc_CleanUp;
|
||||
*/
|
||||
|
||||
|
||||
@ -91,9 +91,9 @@ _clean =
|
||||
{
|
||||
diag_log format ["DMS_DEBUG CleanUp :: Doing recursive call for ARRAY: %1",_x];
|
||||
};
|
||||
_x call DMS_CleanUp;
|
||||
_x call DMS_fnc_CleanUp;
|
||||
};
|
||||
diag_log format ["DMS ERROR :: Attempted to call DMS_CleanUp on non- group or object %1 from array %2",_x,_this];
|
||||
diag_log format ["DMS ERROR :: Attempted to call DMS_fnc_CleanUp on non- group or object %1 from array %2",_x,_this];
|
||||
};
|
||||
} forEach _this;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
DMS_CleanUpManager
|
||||
DMS_fnc_CleanUpManager
|
||||
Created by eraser1
|
||||
|
||||
Objects to be cleaned up together have an entry in "DMS_CleanUpList"
|
||||
@ -36,12 +36,12 @@ if (DMS_CleanUpList isEqualTo []) exitWith {}; // Empty array, no objects to cl
|
||||
|
||||
if (!_OK) then
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Invalid parameters for DMS_CleanUpManager: %1 replaced with %2",_x,[_objs,_timeAddedToList,_timeUntilClean]];
|
||||
diag_log format ["DMS ERROR :: Invalid parameters for DMS_fnc_CleanUpManager: %1 replaced with %2",_x,[_objs,_timeAddedToList,_timeUntilClean]];
|
||||
};
|
||||
|
||||
if ((diag_tickTime-_timeAddedToList)>=_timeUntilClean) then
|
||||
{
|
||||
_objs call DMS_CleanUp;
|
||||
_objs call DMS_fnc_CleanUp;
|
||||
}
|
||||
else
|
||||
{
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
DMS_CreateMarker
|
||||
DMS_fnc_CreateMarker
|
||||
Created by Defent and eraser1
|
||||
|
||||
Usage:
|
||||
@ -7,7 +7,7 @@
|
||||
_pos, // Array: Position of the markers
|
||||
_text, // String: The text on the map marker that will appear on the map
|
||||
_difficulty, // !!!OPTIONAL!!! String: "hardcore","difficult","moderate", "easy", OR custom color
|
||||
] call DMS_CreateMarker;
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
Returns markers in format:
|
||||
[
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
DMS_FillCrate
|
||||
DMS_fnc_FillCrate
|
||||
|
||||
Original credit goes to WAI: https://github.com/nerdalertdk/WICKED-AI
|
||||
Edited by eraser1
|
||||
@ -12,7 +12,7 @@
|
||||
_items,
|
||||
_backpacks
|
||||
]
|
||||
] call DMS_FillCrate;
|
||||
] call DMS_fnc_FillCrate;
|
||||
|
||||
Each loot argument can be an explicitly defined array of weapons with a number to spawn, or simply a number and weapons defined in the config.sqf are used
|
||||
*/
|
||||
@ -87,7 +87,7 @@ if ((_wepCount>0) && {count _weps>0}) then
|
||||
for "_i" from 1 to _wepCount do
|
||||
{
|
||||
_weapon = _weps call BIS_fnc_selectRandom;
|
||||
_ammo = _weapon call DMS_selectMagazine;
|
||||
_ammo = _weapon call DMS_fnc_selectMagazine;
|
||||
if ((typeName _weapon)=="STRING") then
|
||||
{
|
||||
_weapon = [_weapon,1];
|
@ -1,12 +1,12 @@
|
||||
/*
|
||||
DMS_findSafePos
|
||||
DMS_fnc_findSafePos
|
||||
Created by eraser1
|
||||
|
||||
Usage:
|
||||
[
|
||||
_nearestObjectMinDistance, // (OPTIONAL) Number: Minimum distance from nearest object
|
||||
_maxTerrainGradient // (OPTIONAL) Number: Maximum terrain gradient (slope)
|
||||
] call DMS_findSafePos;
|
||||
] call DMS_fnc_findSafePos;
|
||||
*/
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ while{!_validspot} do {
|
||||
try
|
||||
{
|
||||
// Check for nearby water
|
||||
if ([_pos,DMS_WaterNearBlacklist] call DMS_isNearWater) exitWith
|
||||
if ([_pos,DMS_WaterNearBlacklist] call DMS_fnc_isNearWater) exitWith
|
||||
{
|
||||
throw ("water");
|
||||
};
|
@ -1,10 +1,10 @@
|
||||
/*
|
||||
DMS_FindSuppressor
|
||||
Taken from WAI
|
||||
DMS_fnc_FindSuppressor
|
||||
Originally from WAI
|
||||
Modified by eraser1 & Defent
|
||||
|
||||
Usage:
|
||||
_weaponClassName call DMS_FindSuppressor;
|
||||
_weaponClassName call DMS_fnc_FindSuppressor;
|
||||
|
||||
*/
|
||||
|
@ -1,3 +1,15 @@
|
||||
/*
|
||||
DMS_fnc_IsNearWater
|
||||
All credit goes to WAI
|
||||
|
||||
Usage:
|
||||
[
|
||||
_position,
|
||||
_radius
|
||||
] call DMS_fnc_IsNearWater
|
||||
|
||||
*/
|
||||
|
||||
private["_result","_position","_radius"];
|
||||
|
||||
_result = false;
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
DMS_MissionSuccessState
|
||||
DMS_fnc_MissionSuccessState
|
||||
Created by eraser1
|
||||
|
||||
Usage:
|
||||
@ -8,7 +8,7 @@
|
||||
[_completionType2,_completionArgs2],
|
||||
...
|
||||
[_completionTypeN,_completionArgsN]
|
||||
] call DMS_MissionSuccessState;
|
||||
] call DMS_fnc_MissionSuccessState;
|
||||
*/
|
||||
|
||||
if !((typeName _this) == "ARRAY") exitWith
|
||||
@ -47,11 +47,11 @@ _success = true;
|
||||
// Using switch-do so that future cases can be added easily
|
||||
case "kill":
|
||||
{
|
||||
_success = _completionArgs call DMS_TargetsKilled;
|
||||
_success = _completionArgs call DMS_fnc_TargetsKilled;
|
||||
};
|
||||
case "killPercent":
|
||||
{
|
||||
_success = _completionArgs call DMS_TargetsKilledPercent;//<---TODO
|
||||
_success = _completionArgs call DMS_fnc_TargetsKilledPercent;//<---TODO
|
||||
};
|
||||
case "playerNear":
|
||||
{
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
DMS_MissionStatusCheck
|
||||
DMS_fnc_MissionStatusCheck
|
||||
|
||||
Created by eraser1
|
||||
|
||||
@ -36,7 +36,7 @@ private ["_pos", "_success", "_timeStarted", "_timeUntilFail", "_units", "_build
|
||||
diag_log format ["DMS_DEBUG MissionStatusCheck :: Checking Mission Status (index %1): %2",_forEachIndex,_x];
|
||||
};
|
||||
_pos = _x select 0;
|
||||
_success = (_x select 1) call DMS_MissionSuccessState;
|
||||
_success = (_x select 1) call DMS_fnc_MissionSuccessState;
|
||||
_timeStarted = _x select 2 select 0;
|
||||
_timeUntilFail = _x select 2 select 1;
|
||||
_units = _x select 3;
|
||||
@ -64,11 +64,11 @@ private ["_pos", "_success", "_timeStarted", "_timeUntilFail", "_units", "_build
|
||||
_arr = DMS_Mission_Arr deleteAt _forEachIndex;
|
||||
|
||||
{
|
||||
_x call DMS_FillCrate;
|
||||
_x call DMS_fnc_FillCrate;
|
||||
} forEach _crate_info_array;
|
||||
|
||||
_msgWIN call DMS_BroadcastMissionStatus;
|
||||
[_markers,"win"] call DMS_RemoveMarkers;
|
||||
_msgWIN call DMS_fnc_BroadcastMissionStatus;
|
||||
[_markers,"win"] call DMS_fnc_RemoveMarkers;
|
||||
|
||||
throw format ["Mission Success at %1 with message %2.",_pos,_msgWIN];
|
||||
};
|
||||
@ -89,7 +89,7 @@ private ["_pos", "_success", "_timeStarted", "_timeUntilFail", "_units", "_build
|
||||
_cleanupList pushBack (_x select 0);
|
||||
} forEach _crate_info_array;
|
||||
|
||||
_cleanupList call DMS_CleanUp;
|
||||
_cleanupList call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
if (_missionSide == "bandit") then
|
||||
@ -103,8 +103,8 @@ private ["_pos", "_success", "_timeStarted", "_timeUntilFail", "_units", "_build
|
||||
|
||||
_arr = DMS_Mission_Arr deleteAt _forEachIndex;
|
||||
|
||||
_msgLose call DMS_BroadcastMissionStatus;
|
||||
[_markers,"lose"] call DMS_RemoveMarkers;
|
||||
_msgLose call DMS_fnc_BroadcastMissionStatus;
|
||||
[_markers,"lose"] call DMS_fnc_RemoveMarkers;
|
||||
|
||||
throw format ["Mission Fail at %1 with message %2.",_pos,_msgLose];
|
||||
};
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
DMS_OnKilled
|
||||
DMS_fnc_OnKilled
|
||||
Created by eraser1 and Defent
|
||||
Influenced by WAI
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
],
|
||||
_side, // "bandit" only for now
|
||||
_type // not currently used
|
||||
] call DMS_OnKilled;
|
||||
] call DMS_fnc_OnKilled;
|
||||
*/
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ else
|
||||
|
||||
if(DMS_ai_remove_launchers && {_launcher != ""}) then
|
||||
{
|
||||
_rockets = _launcher call DMS_selectMagazine;
|
||||
_rockets = _launcher call DMS_fnc_selectMagazine;
|
||||
_unit removeWeapon _launcher;
|
||||
|
||||
{
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
DMS_RemoveMarkers
|
||||
DMS_fnc_RemoveMarkers
|
||||
Created by eraser1
|
||||
|
||||
Usage:
|
||||
@ -9,7 +9,7 @@
|
||||
_markerCircle
|
||||
],
|
||||
_status
|
||||
] call DMS_RemoveMarkers;
|
||||
] call DMS_fnc_RemoveMarkers;
|
||||
*/
|
||||
|
||||
private ["_markerDot","_markerCircle","_status"];
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
DMS_selectMagazine
|
||||
DMS_fnc_selectMagazine
|
||||
Created by eraser1
|
||||
|
||||
Usage:
|
||||
_weaponClassName call DMS_selectMagazine;
|
||||
_weaponClassName call DMS_fnc_selectMagazine;
|
||||
|
||||
Apply magazine type filters if needed
|
||||
*/
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
DMS_selectMission
|
||||
DMS_fnc_selectMission
|
||||
Influenced by WAI
|
||||
Created by eraser1
|
||||
|
@ -1,12 +1,12 @@
|
||||
/*
|
||||
DMS_SetAILocality
|
||||
DMS_fnc_SetAILocality
|
||||
Created by Defent and eraser1
|
||||
|
||||
Usage:
|
||||
[
|
||||
_groupOrUnit,
|
||||
_posOrObject // Does not have to be defined if element 1 is a unit
|
||||
] call DMS_SetAILocality;
|
||||
] call DMS_fnc_SetAILocality;
|
||||
|
||||
Makes a random player within 3 KM of the AI unit or group the owner.
|
||||
Offloading AI can increase server performance.
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
DMS_SetGroupBehavior
|
||||
DMS_fnc_SetGroupBehavior
|
||||
Created by eraser1
|
||||
|
||||
Usage:
|
||||
@ -7,7 +7,7 @@
|
||||
_group,
|
||||
_pos,
|
||||
_difficulty
|
||||
] call DMS_SetGroupBehavior;
|
||||
] call DMS_fnc_SetGroupBehavior;
|
||||
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
DMS_SpawnAIGroup
|
||||
DMS_fnc_SpawnAIGroup
|
||||
Created by eraser1
|
||||
Based off of WAI
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
_difficulty, // "random","hardcore","difficult","moderate", or "easy"
|
||||
_type // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // Only "bandit" is supported atm
|
||||
] call DMS_SpawnAIGroup;
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
Returns AI Group
|
||||
*/
|
||||
@ -74,7 +74,7 @@ if(_pos_z == 0) then
|
||||
_group = createGroup (missionNamespace getVariable [format ["DMS_%1Side",_side],EAST]);
|
||||
|
||||
for "_i" from 1 to _count do {
|
||||
_unit = [_group,[_pos_x,_pos_y,_pos_z],_type,_difficulty,_side] call DMS_SpawnAISoldier;
|
||||
_unit = [_group,[_pos_x,_pos_y,_pos_z],_type,_difficulty,_side] call DMS_fnc_SpawnAISoldier;
|
||||
};
|
||||
|
||||
// An AI will definitely spawn with a launcher if you define type
|
||||
@ -104,7 +104,7 @@ _group setFormation "WEDGE";
|
||||
|
||||
if(_pos_z == 0) then
|
||||
{
|
||||
[_group,_pos,_difficulty] call DMS_SetGroupBehavior;
|
||||
[_group,_pos,_difficulty] call DMS_fnc_SetGroupBehavior;
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
DMS_SpawnAISoldier
|
||||
DMS_fnc_SpawnAISoldier
|
||||
Created by eraser1
|
||||
Based off of WAI
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
_difficulty, // "random","hardcore","difficult","moderate", or "easy"
|
||||
_side, // "bandit","hero", etc.
|
||||
_customGearSet // OPTIONAL: Manually defined AI gear.
|
||||
] call DMS_SpawnAIGroup;
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
Usage for _customGearSet:
|
||||
[
|
||||
@ -143,7 +143,7 @@ if (!_useCustomGear) then
|
||||
|
||||
if((random 100) <= (missionNamespace getVariable [format["DMS_%1_suppressor_chance",_type],0])) then
|
||||
{
|
||||
_suppressor = _weapon call DMS_FindSuppressor;
|
||||
_suppressor = _weapon call DMS_fnc_FindSuppressor;
|
||||
if(_suppressor != "") then
|
||||
{
|
||||
_unit addPrimaryWeaponItem _suppressor;
|
||||
@ -266,7 +266,7 @@ else
|
||||
|
||||
|
||||
// Soldier killed event handler
|
||||
_unit addMPEventHandler ["MPKilled",'if (isServer) then {[_this, '+str _side+', "soldier"] call DMS_OnKilled;};'];
|
||||
_unit addMPEventHandler ["MPKilled",'if (isServer) then {[_this, '+str _side+', "soldier"] call DMS_fnc_OnKilled;};'];
|
||||
|
||||
_unit enableAI "TARGET";
|
||||
_unit enableAI "AUTOTARGET";
|
@ -1,12 +1,12 @@
|
||||
/*
|
||||
DMS_SpawnCrate
|
||||
DMS_fnc_SpawnCrate
|
||||
Created by eraser1
|
||||
|
||||
Usage:
|
||||
[
|
||||
_crateClassName,
|
||||
_pos
|
||||
] call DMS_SpawnCrate;
|
||||
] call DMS_fnc_SpawnCrate;
|
||||
Returns crate object
|
||||
|
||||
*/
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
DMS_SpawnNonPersistentVehicle
|
||||
DMS_fnc_SpawnNonPersistentVehicle
|
||||
|
||||
Spawn a non-saved vehicle in Exile
|
||||
|
||||
@ -10,12 +10,12 @@
|
||||
[
|
||||
_vehicleClass, // STRING: Classname of the vehicle
|
||||
_pos // ARRAY: Position to spawn it at (roughly)
|
||||
] call DMS_SpawnNonPersistentVehicle;
|
||||
] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
|
||||
Returns the vehicle object of the created vehicle.
|
||||
|
||||
EXAMPLE:
|
||||
_exampleVeh = ['Exile_Chopper_Hummingbird_Green',_pos] call DMS_SpawnNonPersistentVehicle;
|
||||
_exampleVeh = ['Exile_Chopper_Hummingbird_Green',_pos] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
DMS_TargetsKilled
|
||||
DMS_fnc_TargetsKilled
|
||||
Created by eraser1
|
||||
|
||||
Usage:
|
||||
@ -7,7 +7,7 @@
|
||||
_unit,
|
||||
_group,
|
||||
_object
|
||||
] call DMS_TargetsKilled;
|
||||
] call DMS_fnc_TargetsKilled;
|
||||
|
||||
Will accept non-array argument of group, unit, or object.
|
||||
*/
|
@ -1,44 +0,0 @@
|
||||
/*
|
||||
DMS_isPlayerNearbyARRAY
|
||||
Created by eraser1
|
||||
|
||||
Usage:
|
||||
[
|
||||
[
|
||||
_position_or_object1,
|
||||
_position_or_object2,
|
||||
...
|
||||
_position_or_objectN
|
||||
],
|
||||
_radius
|
||||
] call DMS_isPlayerNearbyARRAY;
|
||||
|
||||
|
||||
***DEPRECATED***
|
||||
*/
|
||||
|
||||
private["_posArray","_radius","_result"];
|
||||
|
||||
|
||||
_posArray = _this select 0;
|
||||
_radius = _this select 1;
|
||||
_result = false;
|
||||
|
||||
{
|
||||
if (_result) exitWith {};
|
||||
_plyr = _x;
|
||||
if (alive _plyr) then
|
||||
{
|
||||
{
|
||||
if (_plyr distance _x <= _radius) exitWith
|
||||
{
|
||||
_result = true;
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format["DMS_DEBUG IsPlayerNearbyARRAY :: %1 is within %2m of %3!",_plyr,_radius,_x];
|
||||
};
|
||||
};
|
||||
} forEach _posArray;
|
||||
};
|
||||
} forEach allPlayers;
|
||||
_result
|
Loading…
Reference in New Issue
Block a user