Help and discussion for dayZ (ArmA) AI controlled bus route is welcomed here
Coast road.I will test this out right now ! What is the route it goes threw?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Coast road.I will test this out right now ! What is the route it goes threw?
I have this error in my rpt when i approach the bus :
1:54:43 "AIBUSDRIVER: Beeping Horn at B 1-1-C:1 (Alcapon) REMOTE"
1:54:43 Error in expression <_x distance axBus >10)then{
axBusDriver action ["useWeapon",axBus,axBusDriver,0]>
1:54:43 Error position: <action ["useWeapon",axBus,axBusDriver,0]>
1:54:43 Error 4 elements provided, 2 expected
1:54:43 File mpmissions\dayz_1.chernarus\busroute\monitorBus.sqf, line 26
and when i kill the driver , i got this :
1:55:38 WARNING: Function 'name' - 1f746040# 1058819: baf_soldier_light_baf.p3d has no unit
1:55:38 - network id 2:3834
1:55:38 - person Jacob Campbell
1:55:38 - dead
if ((count _survivors) > 0)then{
{
if(_x distance axBus >10)then{
axBusDriver action ["useWeapon",axBus,axBusDriver,0];
axBusDriver action ["useWeapon",axBus,axBusDriver,1];
axBusDriver action ["useWeapon",axBus,axBusDriver,2];
diag_log format ["AIBUSDRIVER: Beeping Horn at %1",_x];
sleep 2;
};
}forEach _survivors;
};
Thanks, I haven't tested it with Sarge's AI mod, I would look at which sides they are on, I suspect they will be the same side so 'probably' shouldn't attack each other..Great mod Axeman! got this working in no time! Thanks alot for sharing this! =)
Im curius though. Along with this mod i also have Sarge AI Framework on, and im wondering if his AI bandits would shoot at the bus ?
Not intentional, there was a method to my madness at the time and just haven't tidied up yet. Have released this as a work in progress under request from the other bus thread. It works but does require more work / tweaking.my bandits are side EAST, so as long as axe's AI is west, you should see them attacking. It will get interesting though when survivor players that shot at friendly AI will try to board the bus ... i assume it will not be possible without enabling my vehicle fix, someone will need to test that special scenario out.
Axe, questions out of curiosity : you mixed your local and global variables quite heavily, is that really intended ?
Trying to declare global variables in private arrays doesn't make much sense ...
(e.g.) private["_abc","_def","xyz","ghj"];
cheers, Sarge
Can ignore that, is an experimental eventhandler to try and disband the unit after killing the bus driver's murderer.. I did have it working at some point, can't remember why i took it back out.. I think is also part of the means to repopulate the bus after driver and mate get killed..there still a file call "monitorRetaliation.sqf" left, do i need to use it? just wonder
axBusWP setWaypointTimeout [10, 15, 20];//thanks orcthrasher :)
private["_unitpos","_driverKilled","_xpos","_ypos","_buspos"];
busUnit = objNull;
axBus = _this select 0;
axBusGroup = axBus getVariable "axBusGroup";
_buspos = getPos axBus;
_xpos = (_buspos select 0)-50;
_ypos = (_buspos select 1)+50;
_unitpos = [_xpos,_ypos,0];
axDriversMate = objNull;
axDriver = objNull;
//Create Driver and Drivers Mate
for [{ x=1 },{ x <3 },{ x = x + 1; }] do {
"BAF_Soldier_L_DDPM" createUnit [_unitpos, axBusGroup, "busUnit=this;",0.6,"Private"];
diag_log format ["BUSCREW: Creating Replacement BAF_Soldier_L_DDPM by %1 at %2. Result:%3 | Loadout:%4 / Num:%5",player,_unitpos,busUnit,_ailoadout,_rndLOut];
busUnit enableAI "TARGET";
busUnit enableAI "AUTOTARGET";
busUnit enableAI "MOVE";
busUnit enableAI "ANIM";
busUnit enableAI "FSM";
busUnit allowDammage true;
busUnit setCombatMode "GREEN";
busUnit setBehaviour "CARELESS";
//clear default weapons / ammo
removeAllWeapons busUnit;
//add random selection
//set skills
busUnit setSkill ["aimingAccuracy",1];
busUnit setSkill ["aimingShake",1];
busUnit setSkill ["aimingSpeed",1];
busUnit setSkill ["endurance",1];
busUnit setSkill ["spotDistance",0.6];
busUnit setSkill ["spotTime",1];
busUnit setSkill ["courage",1];
busUnit setSkill ["reloadSpeed",1];
busUnit setSkill ["commanding",1];
busUnit setSkill ["general",1];
if(x==1)then{
busUnit assignAsCargo axBus;
busUnit moveInCargo axBus;
_mateKilled = busUnit addEventHandler ["killed", {_this+[axBus] execVM "busroute\crewKilled.sqf"}];
}
else{
axBusGroup selectLeader busUnit;
axDriver = busUnit;
_driverKilled = busUnit addEventHandler ["killed", {_this+[axBus] execVM "busroute\crewKilled.sqf"}];
busUnit assignAsDriver axBus;
busUnit moveInDriver axBus;
};
};
When the driver, or mate, is killed there should be some retaliation, where 4 crack soldiers come and clear the area. Targetting the killer is difficult so they are set to seek and destroy, is quite effective and gives the bus attackers a small chance at escaping.@axeman ,
How can i get the soldier defende the bus , because any players can kill the driver and take the bus easy, when i kill the driver i get this error in rpt :
1:55:38 WARNING: Function 'name' - 1f746040# 1058819: baf_soldier_light_baf.p3d has no unit
1:55:38 - network id 2:3834
1:55:38 - person Jacob Campbell
1:55:38 - dead
and nothing happens
Not yet they aren't.. Am looking at the error after the bus driver is killed, I wasn't getting this before, the drivers mate should take over the role of driver..Are the additions that you listed included in the original post (manbus.sqf and bus stopping)?
Also, what's to stop someone from taking over the bus and driving it to NWAF? If the player then jumps out, will the driver then make his way back to the coast road? I've seen the AI trying to drive vehicles in Sarge's AI script and they are lousy at it.