Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

Commit

Permalink
Optional Vehicle Arrays
Browse files Browse the repository at this point in the history
Resolves #31
  • Loading branch information
SMVampire committed Feb 26, 2014
1 parent c9fd496 commit 504facf
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 20 deletions.
13 changes: 13 additions & 0 deletions DZMS/DZMSConfig.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,19 @@ DZMSStatLocs = [
// This is experimental, and off by default in this version.
DZMSSaveVehicles = false;

/////////////////////////////////////////////////////////////////////////////////////////////
// These are arrays of vehicle classnames for the missions.
// Adjust to your liking.

//Armed Choppers (Huey)
DZMSChoppers = ["UH1H_DZ","Mi17_DZ"];

//Small Vehicles (Humvees)
DZMSSmallVic = ["hilux1_civil_3_open_EP1","SUV_TK_CIV_EP1","Ural_INS","HMMWV_DZ","UAZ_Unarmed_UN_EP1"];

//Large Vehicles (Urals)
DZMSLargeVic = ["Ural_TK_CIV_EP1"];

/*///////////////////////////////////////////////////////////////////////////////////////////
There are two types of missions that run simultaneously on a the server.
The two types are Major and Minor missions.
Expand Down
17 changes: 17 additions & 0 deletions DZMS/DZMSFunctions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,23 @@ DZMSGetWeapon = {
_fin
};

//This gets the random vehicle to spawn at a mission
DZMSGetVeh = {
private ["_type","_vehArray","_choseVic"];

_type = _this select 0;

switch (_type) do {
case "heli": {_vehArray = DZMSChoppers;};
case "small": {_vehArray = DZMSSmallVic;};
case "large": {_vehArray = DZMSLargeVic;};
};

_choseVic = _vehArray call BIS_fnc_selectRandom;

_choseVic
};

//function to wait for mission completion
DZMSWaitMissionComp = {
private["_objective","_unitArrayName","_numSpawned","_numKillReq"];
Expand Down
8 changes: 5 additions & 3 deletions DZMS/Missions/Major/EM1.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Modified to new format by Vampire
*/

private ["_missName","_coords","_wreck","_trash","_trash1","_trash2","_trash3","_trash4","_trash5","_vehicle","_vehicle1","_crate","_crate1"];
private ["_missName","_coords","_wreck","_trash","_trash1","_trash2","_trash3","_trash4","_trash5","_veh1","_veh2","_vehicle","_vehicle1","_crate","_crate1"];

//Name of the Mission
_missName = "C130 Crash";
Expand Down Expand Up @@ -64,8 +64,10 @@ _trash5 setDir -28.122475;
[_trash5] call DZMSProtectObj;

//We create the mission vehicles
_vehicle = createVehicle ["hilux1_civil_3_open_EP1",[(_coords select 0) + 14.1426, (_coords select 1) - 0.6202,0],[], 0, "CAN_COLLIDE"];
_vehicle1 = createVehicle ["hilux1_civil_3_open_EP1",[(_coords select 0) - 6.541, (_coords select 1) - 11.5557,0],[], 0, "CAN_COLLIDE"];
_veh1 = ["small"] call DZMSGetVeh;
_veh2 = ["small"] call DZMSGetVeh;
_vehicle = createVehicle [_veh1,[(_coords select 0) + 14.1426, (_coords select 1) - 0.6202,0],[], 0, "CAN_COLLIDE"];
_vehicle1 = createVehicle [_veh2,[(_coords select 0) - 6.541, (_coords select 1) - 11.5557,0],[], 0, "CAN_COLLIDE"];

//DZMSSetupVehicle prevents the vehicle from disappearing and sets fuel and such
[_vehicle] call DZMSSetupVehicle;
Expand Down
8 changes: 5 additions & 3 deletions DZMS/Missions/Major/SM1.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
New Mission Format by Vampire
*/ //

private ["_missName","_coords","_net","_vehicle","_vehicle1","_crate","_crate1","_crate2","_crate3"];
private ["_missName","_coords","_net","_veh1","_veh2","_vehicle","_vehicle1","_crate","_crate1","_crate2","_crate3"];

//Name of the Mission
_missName = "NATO Weapons Cache";
Expand All @@ -21,8 +21,10 @@ _net = createVehicle ["Land_CamoNetB_NATO",[(_coords select 0) - 0.0649, (_coord
[_net] call DZMSProtectObj;

//We create the vehicles like normal
_vehicle = createVehicle ["SUV_TK_CIV_EP1",[(_coords select 0) + 10.0303, (_coords select 1) - 12.2979,10],[], 0, "CAN_COLLIDE"];
_vehicle1 = createVehicle ["Ural_INS",[(_coords select 0) - 6.2764, (_coords select 1) - 14.086,10],[], 0, "CAN_COLLIDE"];
_veh1 = ["small"] call DZMSGetVeh;
_veh2 = ["large"] call DZMSGetVeh;
_vehicle = createVehicle [_veh1,[(_coords select 0) + 10.0303, (_coords select 1) - 12.2979,10],[], 0, "CAN_COLLIDE"];
_vehicle1 = createVehicle [_veh2,[(_coords select 0) - 6.2764, (_coords select 1) - 14.086,10],[], 0, "CAN_COLLIDE"];

//DZMSSetupVehicle prevents the vehicle from disappearing and sets fuel and such
[_vehicle] call DZMSSetupVehicle;
Expand Down
5 changes: 3 additions & 2 deletions DZMS/Missions/Major/SM3.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Updated to New Mission Format by Vampire
*/

private ["_missName","_coords","_base1","_base2","_base3","_base4","_base5","_base6","_base7","_base8","_base9","_base10","_base11","_base12","_base13","_base14","_base15","_base16","_base17","_vehicle","_crate"];
private ["_missName","_coords","_base1","_base2","_base3","_base4","_base5","_base6","_base7","_base8","_base9","_base10","_base11","_base12","_base13","_base14","_base15","_base16","_base17","_veh1","_vehicle","_crate"];

//Name of the Mission
_missName = "Bandit Medical Camp";
Expand Down Expand Up @@ -92,7 +92,8 @@ _base17 setDir 55.969147;
[_base17] call DZMSProtectObj;

//Create the vehicles
_vehicle = createVehicle ["HMMWV_DZ",[(_coords select 0) - 17.5078, (_coords select 1) + 5.2578,0],[], 0, "CAN_COLLIDE"];
_veh1 = ["small"] call DZMSGetVeh;
_vehicle = createVehicle [_veh1,[(_coords select 0) - 17.5078, (_coords select 1) + 5.2578,0],[], 0, "CAN_COLLIDE"];
[_vehicle] call DZMSSetupVehicle;

//Create the loot
Expand Down
2 changes: 1 addition & 1 deletion DZMS/Missions/Major/SM4.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ _coords = call DZMSFindPos;
[_coords,_missname] ExecVM DZMSAddMajMarker;

//We create the vehicles like normal
_ranChopper = ["UH1H_DZ","Mi17_DZ"] call BIS_fnc_selectRandom;
_ranChopper = ["heli"] call DZMSGetVeh;
_chopper = createVehicle [_ranChopper,_coords,[], 0, "NONE"];

//DZMSSetupVehicle prevents the vehicle from disappearing and sets fuel and such
Expand Down
5 changes: 3 additions & 2 deletions DZMS/Missions/Major/SM5.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Updated to New Format by Vampire
*/

private ["_missName","_coords","_crash","_vehicle","_vehicle1","_crate","_crate2"];
private ["_missName","_coords","_crash","_body","_body1","_body2","_body3","_veh1","_vehicle","_vehicle1","_crate","_crate2"];

//Name of the Mission
_missName = "Ural Ambush";
Expand Down Expand Up @@ -38,7 +38,8 @@ _body3 setDir 23.664057;
[_body3] call DZMSProtectObj;

//We create the vehicles like normal
_vehicle = createVehicle ["HMMWV_DZ",[(_coords select 0) + 5.7534, (_coords select 1) - 9.2149,0],[], 0, "CAN_COLLIDE"];
_veh1 = ["small"] call DZMSGetVeh;
_vehicle = createVehicle [_veh1,[(_coords select 0) + 5.7534, (_coords select 1) - 9.2149,0],[], 0, "CAN_COLLIDE"];

//DZMSSetupVehicle prevents the vehicle from disappearing and sets fuel and such
[_vehicle] call DZMSSetupVehicle;
Expand Down
8 changes: 5 additions & 3 deletions DZMS/Missions/Major/SM6.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Updated to new format by Vampire
*/

private ["_missName","_coords","_net","_vehicle","_vehicle1","_crate"];
private ["_missName","_coords","_net","_veh1","_veh2","_vehicle","_vehicle1","_crate"];

//Name of the Mission
_missName = "Medical Cache";
Expand All @@ -21,8 +21,10 @@ _net = createVehicle ["Land_CamoNetB_NATO",[(_coords select 0) - 0.0649, (_coord
[_net] call DZMSProtectObj;

//We create the vehicles like normal
_vehicle = createVehicle ["SUV_TK_CIV_EP1",[(_coords select 0) + 10.0303, (_coords select 1) - 12.2979,10],[], 0, "CAN_COLLIDE"];
_vehicle1 = createVehicle ["Ural_INS",[(_coords select 0) - 6.2764, (_coords select 1) - 14.086,10],[], 0, "CAN_COLLIDE"];
_veh1 = ["small"] call DZMSGetVeh;
_veh2 = ["large"] call DZMSGetVeh;
_vehicle = createVehicle [_veh1,[(_coords select 0) + 10.0303, (_coords select 1) - 12.2979,10],[], 0, "CAN_COLLIDE"];
_vehicle1 = createVehicle [_veh2,[(_coords select 0) - 6.2764, (_coords select 1) - 14.086,10],[], 0, "CAN_COLLIDE"];

//DZMSSetupVehicle prevents the vehicle from disappearing and sets fuel and such
[_vehicle] call DZMSSetupVehicle;
Expand Down
8 changes: 5 additions & 3 deletions DZMS/Missions/Minor/SM2.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Medical Outpost by lazyink (Full credit for code to TheSzerdi & TAW_Tonic)
Updated to new format by Vampire
*/
private ["_missName","_coords","_base","_base1","_base2","_base3","_vehicle","_vehicle1","_crate","_crate2"];
private ["_missName","_coords","_base","_base1","_base2","_base3","_veh1","_veh2","_vehicle","_vehicle1","_crate","_crate2"];

//Name of the Mission
_missName = "Bandit Medical Outpost";
Expand All @@ -28,8 +28,10 @@ _base3 = createVehicle ["MASH_EP1",[(_coords select 0) - 10, (_coords select 1)
[_base3] call DZMSProtectObj;

//We create the vehicles
_vehicle = createVehicle ["UAZ_Unarmed_UN_EP1",[(_coords select 0) + 10, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];
_vehicle1 = createVehicle ["HMMWV_DZ",[(_coords select 0) + 15, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];
_veh1 = ["small"] call DZMSGetVeh;
_veh2 = ["small"] call DZMSGetVeh;
_vehicle = createVehicle [_veh1,[(_coords select 0) + 10, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];
_vehicle1 = createVehicle [_veh2,[(_coords select 0) + 15, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];

//DZMSSetupVehicle prevents the vehicle from disappearing and sets fuel and such
[_vehicle] call DZMSSetupVehicle;
Expand Down
8 changes: 5 additions & 3 deletions DZMS/Missions/Minor/SM3.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Bandit Stash House by lazyink (Full credit for code to TheSzerdi & TAW_Tonic)
Updated to new format by Vampire
*/
private ["_missName","_coords","_base","_base1","_base2","_vehicle","_vehicle1","_crate"];
private ["_missName","_coords","_base","_base1","_base2","_veh1","_veh2","_vehicle","_vehicle1","_crate"];

//Name of the Mission
_missName = "Bandit Stash House";
Expand All @@ -26,8 +26,10 @@ _base2 = createVehicle ["Land_hut06",[(_coords select 0) - 7, (_coords select 1)
[_base2] call DZMSProtectObj;

//We create the vehicles
_vehicle = createVehicle ["HMMWV_DZ",[(_coords select 0) + 10, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];
_vehicle1 = createVehicle ["UAZ_Unarmed_UN_EP1",[(_coords select 0) - 25, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];
_veh1 = ["small"] call DZMSGetVeh;
_veh2 =["small"] call DZMSGetVeh;
_vehicle = createVehicle [_veh1,[(_coords select 0) + 10, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];
_vehicle1 = createVehicle [_veh2,[(_coords select 0) - 25, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];

//DZMSSetupVehicle prevents the vehicle from disappearing and sets fuel and such
[_vehicle] call DZMSSetupVehicle;
Expand Down

0 comments on commit 504facf

Please sign in to comment.