Jump to content
Ivory

[Release] Vehicle Patrol V.2

Recommended Posts

Heyho :)

I have reright the from BetterDeadThanZed (Thanks for the idea), becouse it don´t work realy good at the new Patch.

So i think it works better as the old one.

 

1.How to install

2. How to upgrade

 

 

How to install:

 

Step 1: Open DZMSConfig.sqf and find this:

 

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

Underneath that, put this:

//Patrol Vehicles
DZMSPatrolVeh = ["HMMWV_M998A2_SOV_DES_EP1_DZE","LandRover_Special_CZ_EP1","Offroad_DSHKM_Gue_DZE"];
 
Step 2: Open DZMSFunctions.sqf and find this:
 
 
DZMSAISpawn = compile preprocessFileLineNumbers "\z\addons\dayz_server\DZMS\Scripts\DZMSAISpawn.sqf";

Below that, add this:

 

DZMSVehiclePatrol = compile preprocessFileLineNumbers "\z\addons\dayz_server\DZMS\Scripts\DZMSVehiclePatrol.sqf";

Further down, find this:

 

 

case "large": {_vehArray = DZMSLargeVic;};

Replace it with this:

case "large": {_vehArray = DZMSLargeVic;};
case "patrol": {_vehArray = DZMSPatrolVeh;};

Now download this https://www.dropbox.com/s/a9zax4qa0wuzlya/DZMSVehiclePatrol.sqf

 

add the file too your DZMS/scripts folder.

 

 

 

Now you can Spawn the Patrol

 

open your mission files

 

and search for the code like this:

//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[[(_coords select 0) + 0.2803,(_coords select 1) + 25.1768, 0],5,3,"DZMSUnitsGeneral"] call DZMSAISpawn;
sleep 5;

at this previously:

//Spawn patrol
//Position, Skill
//Usage: [_coords, PatrolRadius ,  skillLevel]
[_coords, 50, 3] call DZMSVehiclePatrol;

2.How to upgrade

 

 

download this https://www.dropbox.com/s/a9zax4qa0wuzlya/DZMSVehiclePatrol.sqf

 

replace the file whit the exist in your DZMS/scripts folder.

 

 

open your mission where you have add the old script.

 

in the private array you have "_patrol"

 

remove it.

 

search for the spawn code

//Spawn patrol
_patrol = ["patrol"] call DZMSGetVeh;
[_coords,   //Position to patrol
_coords, // Position to spawn
75, //Radius of patrol
10,                     //Number of waypoints to give
_patrol, //Classname of vehicle (make sure it has driver and gunner)
1 //Skill level of units 
] call DZMSVehiclePatrol;

and change it whit

//Spawn patrol
//Position, Skill
//Usage: [_coords, PatrolRadius ,  skillLevel]
[_coords, 50, 3] call DZMSVehiclePatrol;

Share this post


Link to post
Share on other sites

You need to also replace in the vehiclepatrol.sqf

 

//Gear the AI backpack
_aipack = [_skill] call DZMSGetPack;

 

With:

 

//Gear the AI backpack
_aipack = DZMSPacklist call BIS_fnc_selectRandom;

 

As its causing an issue, at least this is what I'm about to try as the AI didn't get into the vehicle and comparing the vehicle patrol to the aispawn this is what is different.

 

Will let you know if it works.

Share this post


Link to post
Share on other sites

I'm lost at

 

Now you can Spawn the Patrol

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

open your mission files

 

and search for the code like this:

 

(then the code n shiz)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Says " open your mission files " ....well ?? whats the script I need to open? just the folder? hmmm not working ..I wonder why

Share this post


Link to post
Share on other sites

in mission file , i have added the patrol so it looks like this just before the mission Ai or spawned in

 

//Spawn patrol
//Position, Skill
//Usage: [_coords, PatrolRadius ,  skillLevel]
[_coords, 75, 3] call DZMSVehiclePatrol;

//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[_coords,6,2,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[_coords,6,3,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[_coords,4,3,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
 

Share this post


Link to post
Share on other sites

make sure the vehicles or the DZ type as DZE have no ammo, this is my vehicle list in DZMSconfig

 

DZMSPatrolVeh = ["ArmoredSUV_PMC_DZ","HMMWV_M998A2_SOV_DES_EP1_DZ","LandRover_Special_CZ_EP1_DZ","Offroad_DSHKM_Gue_DZ","Pickup_PK_GUE_DZ","HMMWV_M1151_M2_CZ_DES_EP1_DZ","GAZ_Vodnik_DZ"];

Share this post


Link to post
Share on other sites

Hi Guys I have changes from Zeds version to this and it runs ok but Im getting the AI that spawn with RPG now have no Ammo, Thus not firing at players, Any idean what could cause this, It was working with Zeds vesion and I done the upgrade way not new install

thanks

MegaZ

Share this post


Link to post
Share on other sites

Hi Running this instead of BetterDeadThanZed's  one but I am getting these errors spamming the Logs: when a mission starts.

 

20:14:22 Error in expression <ear select 1;

_aipack = [_skill] call DZMSGetPack;


for "_i" from 1 to 3 do {>
20:14:22 Error position: <DZMSGetPack;

for "_i" from 1 to 3 do {>
20:14:22 Error Undefined variable in expression: dzmsgetpack
20:14:22 File z\addons\dayz_server\DZMS\Scripts\DZMSVehiclePatrol.sqf, line 56

 

20:14:22 Error in expression <lectWeapon _weapon;

_pilot addBackpack _aipack;

if (DZMSUseNVG) then {
_pilot >
20:14:22 Error position: <_aipack;

if (DZMSUseNVG) then {
_pilot >
20:14:22 Error Undefined variable in expression: _aipack

20:14:22 File z\addons\dayz_server\DZMS\Scripts\DZMSVehiclePatrol.sqf, line 65 

 

_aipack = [_skill] call DZMSGetPack;

for "_i" from 1 to 3 do {>
16:52:20   Error position: <DZMSGetPack;

for "_i" from 1 to 3 do {>
16:52:20   Error Undefined variable in expression: dzmsgetpack
16:52:20 File z\addons\dayz_server\DZMS\Scripts\DZMSVehiclePatrol.sqf, line 116

 

 

any help would be appreciated

 

MegaZ

 

EDIT:

 

just re - read the posts above and saw this one which seems to have fixed the issue:

 

ToejaM, on 20 Jul 2014 - 11:28 AM, said:
You need to also replace in the vehiclepatrol.sqf

//Gear the AI backpack
_aipack = [_skill] call DZMSGetPack;

With:

//Gear the AI backpack
_aipack = DZMSPacklist call BIS_fnc_selectRandom;

As its causing an issue, at least this is what I'm about to try as the AI didn't get into the vehicle and comparing the vehicle patrol to the aispawn this is what is different.

Will let you know if it works.

Share this post


Link to post
Share on other sites

Could you explain the choice of lowering the skill level?

_weaponArray = [_skill - 1] call DZMSGetWeapon;
switch (_skill) do {
		case 0: {_aicskill = DZMSSkills0;};
		case 1: {_aicskill = DZMSSkills0;};
		case 2: {_aicskill = DZMSSkills1;};
		case 3: {_aicskill = DZMSSkills2;};
		case 4: {_aicskill = DZMSSkills3;};
		case 5: {_aicskill = DZMSSkills4;};
	};

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Advertisement
  • Donation Box

    Please donate to support the community.
    We appreciate all donations!
  • Advertisement
  • Supporters
  • Latest Donations

  • Advertisement
  • Discord

×