AI Air Patrols

You dont mention anything about the other attached files to your post? What do i with them? Please answer someone last time i asked no one replied
 
How would I go about adding messages for when the heli is landing and taking off from the different points? I'd like my players to be able to see this so they can try to get ready for the transport.
 
when I edit the server_Objectupdate or use the one u uploaded my
vehicles and tents are not saving? any1 know a fix for this
 
How would I go about adding messages for when the heli is landing and taking off from the different points? I'd like my players to be able to see this so they can try to get ready for the transport.

Hey, would you care to share how you got it working? I have the same problem you had, thanks mate.
 
Last time I used this it was spawning doubles of the heli and crew and I had no idea why, i haven't gone back to this yet to toy around with pickups... A message would def be a useful thing... I'll revisit this later on the weekend
 
Please can you look at the,This plus where?
//[[Position], Number of soldiers]
ChopperPatrol1 = [[32.562645, 1589.6631, 0],10] ExecVM "units\Chopper Patrol.sqf"; //Patroling Chopper

I'm sorry English is not very good
 
I have this working pretty well on my server after messing around with it a bit. The main problem I have now is it seems like sometimes the pilot just says f*** it and lands for 1 second and takes back off without the AI Military Guards and then he just hovers at about 40 meters and despawns after a few minutes. It happens about at about 10% of the stops. However, it's just an annoyance.
 
Does anyone have any pointers as to how i would add an exclusion to mpeventhandler.txt for this log entry...
Code:
#27 "Hit" 3:23  - "[(_this Select 0),(_this Select 1)] ExecVM "units\ChopperReaction.sqf";"
 
Does anyone have any pointers as to how i would add an exclusion to mpeventhandler.txt for this log entry...
Code:
#27 "Hit" 3:23  - "[(_this Select 0),(_this Select 1)] ExecVM "units\ChopperReaction.sqf";"
Try something like
Code:
5 "exec" !=\"ExecVM "units\ChopperReaction.sqf\";"
on line #29. Not tested and I normally add the sqf in as a filter but that doesn't work sometimes.. Pretty sure is backslash to escape double quotes as that is what's used in scripts.txt.
 
Try something like
Code:
5 "exec" !=\"ExecVM "units\ChopperReaction.sqf\";"
on line #29. Not tested and I normally add the sqf in as a filter but that doesn't work sometimes.. Pretty sure is backslash to escape double quotes as that is what's used in scripts.txt.
Thanks for the reply. I am getting the same kick mesage and log entry after adding that to my mpeventhandler.txt
 
I don't understand why it spawns 3 choppers and 3 crews? they are flying right behind each other and they try to land on top of each other.
 
Ok, I finally was able to get one chopper to spawn by calling the script from the mission init.sqf like so:

Code:
if ((!isServer) && (isNull player)) then
{
waitUntil {!isNull player};
waitUntil {time > 3};
};
 
if ((!isServer) && (player != player)) then
{
waitUntil {player == player};
waitUntil {time > 3};
};
 
if (isServer) then {
call compile preprocessFileLineNumbers "dynamic_vehicle.sqf";
_nil = [] execVM "mission.sqf";
_nil = [] execVM "busroute\bus_driver.sqf";
_nil = [] execVM "units\init.sqf";
_serverMonitor = [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
};

I am using the "BAF_Merlin_HC3_D" as my chopper. Is there a way that I can remove the weapons and items on the chopper when it is created? I tried:

Code:
Sleep 3;
//create the chopper
PatrolChopper1 = createVehicle ["BAF_Merlin_HC3_D",_unitpos,[], 0, "NONE"];
removeAllWeapons PatrolChopper1; // Tried to remove weapons not working...
removeAllItems PatrolChopper1; // Tried to remove all items not working...
//PatrolChopper1 = createVehicle ["MV22",_unitpos,[], 0, "NONE"];
PatrolChopper1 SetDir 90;
PatrolChopper1 SetPos GetPos PatrolChopper1;
PatrolChopper1 setVariable ["ApprovedVeh", 1 , True];
_aigroup addVehicle PatrolChopper1;
PatrolChopper1 flyInHeight _FlyHeight;
PatrolChopper1 addEventHandler ["handleDamage", { false }];
PatrolChopper1 addEventHandler ["Hit","(_this select 0) SetDammage 0"];
PatrolChopper1 addEventhandler ["dammaged", {(_this select 0) setdamage 0;}];
PatrolChopper1 AddMPEventHandler ["MPHit", {[(_this Select 0),(_this Select 1)] ExecVM "units\ChopperReaction.sqf";}];
PatrolChopper1 AddMPEventHandler ["MPKilled", {[(_this Select 0),(_this Select 1)] ExecVM "units\ChopperReaction.sqf";}];
 
I figured out how to remove all weapons and items from the chopper.
Code:
ClearWeaponcargo PatrolChopper1;
ClearMagazineCargo PatrolChopper1;
 
hey folks, i see this script and its great !!!

But i lookin for something special, the Heli should spawn random, fly random waypoints, shoot ALL players and get crash @ end.

in this case i take a look @ the Helicrashspawn script and found the lines:
Code:
                    //Only a Woman could crash a Heli this way...
                    _aigroup = creategroup civilian;
                    _helipilot = _aigroup createUnit ["SurvivorW2_DZ",getPos _crashwreck,[],0,"FORM"];
                    _helipilot moveindriver _crashwreck;
                    _helipilot assignAsDriver _crashwreck;

Is it possible to add a few lines for two other AI´s and set they as gunner? Also , will it work if i set the AI from civilian to east to attack the players?

Code:
for Example something like:
 
                    _aigroup = creategroup EAST;
 
                    _helipilot = _aigroup createUnit ["SurvivorW2_DZ",getPos _crashwreck,[],0,"FORM"];
                    _heligunner1 = _aigroup createUnit ["SurvivorW2_DZ",getPos _crashwreck,[],0,"FORM"];
                    _heligunner2 = _aigroup createUnit ["SurvivorW2_DZ",getPos _crashwreck,[],0,"FORM"];
                    _helipilot moveindriver _crashwreck;
                    _helipilot assignAsDriver _crashwreck;
 
                  _heligunner1 moveinGunner _crashwreck;
                    _heligunner1 assignAsGunner _crashwreck;
.
.
.
 
Just looked through my rpt log and found this.

Code:
9:30:32 "ChopperPatrol: Chopper Spawn initiated: Centre: [32.5626,1490.66,0] Soldiers: 8 Flying Height: 50 "
9:30:43 "ChopperPatrol: Creating Chopper Crewman any number 1 at [34.5626,1490.66,0]"
9:30:46 "ChopperPatrol: Creating Event Handlers for any "
9:30:47 "ChopperPatrol: Creating Chopper Crewman any number 2 at [36.5626,1490.66,0]"
9:30:50 "ChopperPatrol: Creating Event Handlers for any "
9:30:51 "ChopperPatrol: Creating Chopper Crewman any number 3 at [38.5626,1490.66,0]"
9:30:54 "ChopperPatrol: Creating Event Handlers for any "
9:30:55 "ChopperPatrol: Creating Chopper Crewman any number 4 at [40.5626,1490.66,0]"
9:30:58 "ChopperPatrol: Creating Event Handlers for any "
9:30:59 "ChopperPatrol: Creating Chopper Crewman any number 5 at [42.5626,1490.66,0]"
9:31:02 "ChopperPatrol: Creating Event Handlers for any "
9:31:03 "ChopperPatrol: Creating Chopper Crewman any number 6 at [44.5626,1490.66,0]"
9:31:06 "ChopperPatrol: Creating Event Handlers for any "
9:31:07 "ChopperPatrol: Creating Chopper Crewman any number 7 at [46.5626,1490.66,0]"
9:31:10 "ChopperPatrol: Creating Event Handlers for any "
9:31:11 "ChopperPatrol: Creating Chopper Crewman any number 8 at [48.5626,1490.66,0]"
9:31:14 "ChopperPatrol: Creating Event Handlers for any "
9:31:15 "ChopperPatrol: Chopper Spawn Completed - beginning waypoints"
9:31:15 "Patrol: 10f210c0# 1055748: mv22.p3d Altitude is 0.318663 meters, DT is 1, AT is 0"
9:31:25 "Patrol: 10f210c0# 1055748: mv22.p3d Altitude is 0.318663 meters, DT is 2, AT is 0"
9:31:35 "Initial WP pos is [0,0,0]"
9:31:35 "Patrol: 10f210c0# 1055748: mv22.p3d Altitude is 0.318663 meters, DT is 3, AT is 0"
9:31:42 Warning: z\addons\dayz_communityassets\models\razor.p3d:0 Error while trying to generate ST for points: 214, 349, 208
9:31:45 "Patrol: 10f210c0# 1055748: mv22.p3d Altitude is 0.318663 meters, DT is 4, AT is 0"
9:31:55 "Patrol: 10f210c0# 1055748: mv22.p3d Altitude is 0.318663 meters, DT is 5, AT is 0"
9:32:06 "Patrol: Detected Living Crew!"
9:32:06 "Patrol: Chopper has been disabled, respawning any"

Is that saying that the chopper has been destroyed? After this it just keep creating choppers west of Kamenka with no AI. What would be causing this?

Im seeing the exact same thing in my log, how'd u go about solving it? :)
 
So to follow up on my own question.. now that nobody else did :) I managed to figure out where the issue is.. And also a sort of fix i guess, the fix might cause other issues down the line tho.

The issue I had on my Epoch server was that the group cleanup part of the server_cleanup.fsm was removing the groups the AI's needed, preventing them from spawning, Once i commented out this part:
Code:
class group_cleanup
    {
      name = "group_cleanup";
      init = /*%FSM<STATEINIT""">*/"//Clean groups" \n
      "{" \n
      "//diag_log (""CLEANUP: CHECKING GROUP WITH "" + str(count units _x) + "" UNITS"");" \n
      "//if (count units _x==0) then {" \n
      "//deleteGroup _x;" \n
      "//diag_log (""CLEANUP: DELETING A GROUP"");" \n
      "//};" \n
      "} forEach allGroups;" \n
      ""/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;

The AI's are spawning and flying and the script works, Altho, as far as i can google, It seems that the group cleanup i there to prevent servers with alot of traffic from going into "seagull mode" where new players will get spawn'd as a seagull because the limit of 144 groups have been reached.

Funny thing is tho, i also have AI missions running, they spawn AI's in groups aswell, and they work without any issues with teh group clean enabled, So im not sure why the groups in this script gets caught in the cleanup, Any help would be greatly appriciated so i can enable the group cleanup again. :)
 
Back
Top