dayZ (arma) AI Controlled Bus Route.

you can set the variables in the init for the dynamicdebris to 0 and all the crashed vehicles are gone...

unfortunately there is no way to keep only the roads clean and spawn them in other places so far...
if you are only reducing them to about 10 for example it could happen that these 10 crashed vehicles spawn exactly on the mainstreet ^^
so if you want a clear mainroute for the bus you need to set them to 0
 
@axeman: can you tell me what i have to change/edit if i want 2 busses on different routes?
im planning to setup an epoch taviana server and im curious if its possible to have one route on every island so far...

or 2 busses on 1 route... one starts north heading south... the other one starts south heading north...
 
just do the same as before but with the new file change to busroute1 and change relevent calls

buses on same route going different ways just reverse the waypoints

i have what you described working
 
Is there any way to get the bus marked on the map for everyone to see? So that they can see if its worth waiting for the bus? Like mission markers, just on a moving "target"?.
 
For DZAI users, you could try using the Civilian side for the AI Bus, since DZAI doesn't modify the Civilian side settings. Disclaimer - I don't know what side effects there could be for the bus script.

Gave Buttface's suggestion a try and it worked. Got the scroll menu to board the bus. However after doing so, about 3 seconds later, I was killed by the cleanup script (I'll figure that out eventually). Below is what I set my configs to. I would imagine setting the group to WEST would work as well, though I haven't tried it. I kinda wanted to stay away from a variable that is used by DZAI and AI Missions.

_axeBusUnit = objNull;
_axeBusGroup = createGroup CIVILIAN;
_axeBuspawnpos = [13128.2,10381.9,0];
_unitpos = [13125.2,10416,0];
_axeBusWPradius = 2;

_axeBusDriver = objNull;

_firstRun = _this select 0;
if(_firstRun)then{
createCenter CIVILIAN;
//RESISTANCE setFriend [WEST,1];
//RESISTANCE setFriend [EAST,0];
//WEST setFriend [RESISTANCE,1];
//EAST setFriend [RESISTANCE,0];
CIVILIAN setFriend [WEST,1];

Many thanks to Axeman for the script and help from Buttface. This is sure a fun one to tinker with....

FYI - for those having issues with the "CLEANUP: KILLING A HACKER", add the following below to the "if" and see if that keeps the bus from exploding.

(vehicle _x getVariable [""axeBus"",0] != 1) && (vehicle _x getVariable [""Sarge"",0] != 1)

It worked fine for me. If all fails, you can set both the "setDamage" to 0, which will work as well.
 
Hey there, having a problem with your script. The bus is not spawning at all, and theres no errors in RPT log. Any ideas?
 
And now im having a battleye kick problem >.<
Code:
03.01.2014 11:20:58: [PBP]Kramarz (IP) GUID- #2 "{
_axeBusDriver = driver _x;
_axeBusDriver stop true;

axeBusLogic action ["useWeapon",_x,_axeBusDriver,0];
sleep .2;
axeBusLogi"
 
- Server DayZCC build 5.9.4.1
- DayZ Mod v1.8.0.3 Chernarus
- DZAI & DayZ Mission System
- AH infiSTAR.de
- Spawn Point Based on UID
- Halo Jump
- my building...
- debug monitor

server_cleanup.fsm
Code:
       "" \n
       "//Check for hackers" \n
       " {" \n
       "      //if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
       "    if(vehicle _x != _x && ((vehicle _x getVariable [""axeBus"",0] != 1) && (vehicle _x getVariable [""Sarge"",0] != 1) && (vehicle _x getVariable [""DZAI"",0] != 1) && (vehicle _x getVariable [""Mission"",0] != 1)) && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
       "        diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
       "           (vehicle _x) setDamage 1;" \n
       "           _x setDamage 1;" \n
       "     };" \n
       " } forEach allUnits;" \n
       "" \n
problem:
buses do not ply the route!
when boarding the bus killing - "CLEANUP: KILLING A HACKER Shark-kun B 1-1-B:1 (Shark-kun) REMOTE IN Ikarus_TK_CIV_EP1"
5:36:03 "CLEANUP: KILLING A HACKER Shark-kun B 1-1-B:1 (Shark-kun) REMOTE IN Ikarus_TK_CIV_EP1"
5:36:03 "BUS:Waypoint Added: [C 1-1-B,2] at [12984,8362.67,0]"
5:36:03 "BUS:Waypoint Added: [C 1-1-B,3] at [13279.1,6991.32,0]"
5:36:03 "CLEANUP: KILLING A HACKER Shark-kun B 1-1-B:1 (Shark-kun) REMOTE IN Ikarus_TK_CIV_EP1"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,4] at [13464.2,6255.24,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [13386.8,5405.25,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [12025.6,3481.76,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [10504.4,2324.99,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [10321.8,2149.75,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [10028,2071.8,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [9503.53,2028.21,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [6587.65,2884.59,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [6354.47,2452.24,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [4565.79,2432.13,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [1907.21,2240.25,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [1689.06,2209.53,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [1845.55,2219.14,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [1940.8,2255.24,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [3559.56,2448.9,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [4541.37,2443.16,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [5816.09,2167.39,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [6408.19,2685.99,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [6570.5,2877.59,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [9945.28,2049.85,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [10283.4,2146.71,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [10389.4,2221.85,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [10498.9,2320.29,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [10888.2,2772.58,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [12025.9,3485.04,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [13005.9,3816.02,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [13451.5,6211.28,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [13419.9,6557.19,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [13287.7,6961.19,0]"
5:36:03 "BUS:Waypoint Added: [<NULL-group>,-1] at [12930.4,10133,0]"
5:36:03 "CLEANUP: KILLING A HACKER Shark-kun B 1-1-B:1 (Shark-kun) REMOTE IN Ikarus_TK_CIV_EP1"
5:36:03 "z\addons\dayz_code\medical\setup_functions_med.sqf::fnc_usec_damageBleed [B 1-1-B:1 (Shark-kun) REMOTE,"aimpoint",1.51635]"
5:36:03 WARNING: Function 'name' - Shark-kun is dead
5:36:14 "get: STRING (8289348), sent: STRING (8289348)"
5:36:14 "Player UID#8289348 CID#27169 PID#1(Shark-kun) as Survivor3_DZ, logged off at Wilderness [-187:-105]"
 
- Server DayZCC build 5.9.4.1
- DayZ Mod v1.8.0.3 Chernarus
- DZAI & DayZ Mission System
- AH infiSTAR.de
- Spawn Point Based on UID
- Halo Jump
- my building...
- debug monitor

server_cleanup.fsm
Code:
       "" \n
       "//Check for hackers" \n
       " {" \n
       "      //if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
       "    if(vehicle _x != _x && ((vehicle _x getVariable [""axeBus"",0] != 1) && (vehicle _x getVariable [""Sarge"",0] != 1) && (vehicle _x getVariable [""DZAI"",0] != 1) && (vehicle _x getVariable [""Mission"",0] != 1)) && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
       "        diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
       "           (vehicle _x) setDamage 1;" \n
       "           _x setDamage 1;" \n
       "     };" \n
       " } forEach allUnits;" \n
       "" \n
problem:
buses do not ply the route!
when boarding the bus killing - "CLEANUP: KILLING A HACKER Shark-kun B 1-1-B:1 (Shark-kun) REMOTE IN Ikarus_TK_CIV_EP1"

Unsure if you are still being killed from this but going into init\variables.sqf in your mission folder and look for DZE_safeVehicle = and add the bus name to it. This is the same fix for the deploy vehicles killing you. I'm not sure if it will work for you but I've had no problems.
 
you can set the variables in the init for the dynamicdebris to 0 and all the crashed vehicles are gone...

unfortunately there is no way to keep only the roads clean and spawn them in other places so far...
if you are only reducing them to about 10 for example it could happen that these 10 crashed vehicles spawn exactly on the mainstreet ^^
so if you want a clear mainroute for the bus you need to set them to 0

I found the way to clear roads :)
http://opendayz.net/threads/how-to-remove-junk-from-only-roads-or-custom-places.18694/

But i didn't yet found way to make bus not avoid other NPC. I have base just on the road, and NPC guards on it. Even made the bus to open entrance gates when approaching them, but it waits for guards to move away(which they do not, off cource), and starts to find way around the base :(
Any ideas? :)
 
This bus route needs some serious adjustments he doesn't stay on the roads. I added in both the fixes to remove zombies and trash and it does exactly that, but when nothing is in the road he just goes all over the place through fences, knocking trees down, across the train tracks, and many more drunk driving accidents. I had to change the bus to a mtvr just so it wouldn't get stuck as easy. Also if one person is currently in the mtvr(or bus) noone else can get in until he gets out then whoever gets in first is the only one who can enter.
 
Yea nothing we can do about that I don't think since they follow roads. Also I swapped the starting waypoint on another fresh bus file to kamenka and it started at berezino(I didnt change the spawnpos but I have now) went all the way up north by stary went down sw into kemenka then back. So that's something simple you guys can do if you want one that can drop people off at stary traders
 
For //nearby survivors in the player_axeBus.sqf ive added pretty much every skin in epoch but when i stand on the road and wait for the bus it does not stop just plows right through me

//Nearby Survivors
_survivors = (position _x) nearEntities [
["Survivor1_DZ",
"Survivor2_DZ",
"SurvivorW2_DZ",
"Sniper1_DZ",
"Camo1_DZ",
"Bandit1_DZ",
"Bandit2_DZ",
"Hero1_DZ",
"Soldier1_DZ",
"Rocket_DZ",
"GUE_Soldier_MG_DZ",
"GUE_Soldier_Sniper_DZ",
"GUE_Soldier_Crew_DZ",
"GUE_Soldier_2_DZ",
"RU_Policeman_DZ",
"Pilot_EP1_DZ",
"Haris_Press_EP1_DZ",
"Ins_Soldier_GL_DZ",
"GUE_Commander_DZ",
"Functionary1_EP1_DZ",
"Priest_DZ",
"Rocker1_DZ",
"Rocker2_DZ",
"Rocker3_DZ",
"Rocker4_DZ",
"TK_INS_Warlord_EP1_DZ",
"TK_INS_Soldier_EP1_DZ",
"CZ_Special_Forces_GL_DES_EP1_DZ",
"Drake_Light_DZ",
"Soldier_Bodyguard_AA12_PMC_DZ",
"Soldier_Sniper_PMC_DZ",
"Soldier_TL_PMC_DZ",
"FR_OHara_DZ",
"FR_Rodriguez_DZ",
"CZ_Soldier_Sniper_EP1_DZ",
"Graves_Light_DZ",
"SurvivorWpink_DZ",
"SurvivorWurban_DZ",
"SurvivorWcombat_DZ",
"SurvivorWdesert_DZ",
"GUE_Soldier_CO_DZ",
"BanditW1_DZ",
"BanditW2_DZ",
"Dr_Annie_Baker_EP1",
"US_Delta_Force_Marksman_E",
"BAF_Soldier_Officer_DDPM",
"FR_Sykes",
"GUE_Villager4",
"GUE_Soldier_CO",
"UN_CDF_Soldier_Crew_EP1",
"UN_CDF_Soldier_Pilot_EP1",
"Soldier_MG_PMC",
"Soldier_MG_PKM_PMC",
"GUE_Worker2",
"TK_GUE_Soldier_5_EP1",
"GUE_Soldier_2",
"Drake",
"BAF_Soldier_AAR_DDPM",
"US_Delta_Force_AR_EP1",
"Soldier_Sniper_PMC",
"Tanny_PMC",
"GUE_Soldier_3",
"GUE_Soldier_Crew",
"GUE_Commander",
"TK_GUE_Warlord_EP1",
"CIV_EuroWoman02_EP1",
"RU_Damsel4",
"GUE_Soldier_1",
"BAF_Soldier_EN_MTP",
"Herrera_Light",
"US_Delta_Force_Medic_EP1"],250];
 
For //nearby survivors in the player_axeBus.sqf ive added pretty much every skin in epoch but when i stand on the road and wait for the bus it does not stop just plows right through me

//Nearby Survivors

Mine work straight of the bat mate
 
To save people some time here are pre made waypoints the bus starts at balota loops around the map counterclockwise back down towards kamenka and to balot again

http://prntscr.com/2z4fi0

Edit this in your

init_bus.sqf:
axeBusUnit = objNull;
_axeBusGroup = createGroup CIVILIAN;
_axeBuspawnpos = [4118.96,2603.22,0];
_unitpos = [4125.47,2601.65,0];
_axeBusWPradius = 2;//waypoint radius

//Load Bus Route
_axWPZ=0;
_axeBusWPIndex = 2;
_axeBusFirstWayPoint = [4479.4,2459.74,_axWPZ];
_axeBusWP = _axeBusGroup addWaypoint [_axeBusFirstWayPoint, _axeBusWPradius,_axeBusWPIndex];
_axeBusWP setWaypointType "MOVE";
_axeBusRouteWaypoints = [[4817.51,2502.58,_axWPZ],[6714.84,2977.89,_axWPZ],[10441.3,2273.36,_axWPZ],[13088.3,3863.68,_axWPZ],[13412.6,6608.52,_axWPZ],[12106.8,9063.96,_axWPZ],[12476.3,12525.3,_axWPZ],[6268.52,7824.41,_axWPZ],[4130.15,11163.3,_axWPZ],[2665.94,5610.17,_axWPZ],[2017.94,2248.53,_axWPZ],[3560.56,2443.72,_axWPZ],[4115.76,2605.03,_axWPZ]];


and for the bus stop location to show on your map make a file called Marker.sqf put it into your missions folder add this into it

_marker = createMarker ["busrouteA", [4817.51,2502.58,0]];
_marker setMarkerText "Bus Stop";
_marker setMarkerType "mil_objective";
_marker setMarkerColor "ColorRed";
marker = _busrouteA;

_marker = createMarker ["busrouteB", [6714.84,2977.89,0]];
_marker setMarkerText "Bus Stop";
_marker setMarkerType "mil_objective";
_marker setMarkerColor "ColorRed";
marker = _busrouteB;

_marker = createMarker ["busrouteC", [10441.3,2273.36,0]];
_marker setMarkerText "Bus Stop";
_marker setMarkerType "mil_objective";
_marker setMarkerColor "ColorRed";
marker = _busrouteC;

_marker = createMarker ["busrouteCa", [13088.3,3863.68,0]];
_marker setMarkerText "Bus Stop";
_marker setMarkerType "mil_objective";
_marker setMarkerColor "ColorRed";
marker = _busrouteCa;

_marker = createMarker ["busrouteD", [13412.6,6608.52,0]];
_marker setMarkerText "Bus Stop";
_marker setMarkerType "mil_objective";
_marker setMarkerColor "ColorRed";
marker = _busrouteD;

_marker = createMarker ["busrouteE", [12106.8,9063.96,0]];
_marker setMarkerText "Bus Stop";
_marker setMarkerType "mil_objective";
_marker setMarkerColor "ColorRed";
marker = _busrouteE;

_marker = createMarker ["busrouteF", [12476.3,12525.3,0]];
_marker setMarkerText "Bus Stop";
_marker setMarkerType "mil_objective";
_marker setMarkerColor "ColorRed";
marker = _busrouteF;

_marker = createMarker ["busrouteG", [6268.52,7824.41,0]];
_marker setMarkerText "Bus Stop";
_marker setMarkerType "mil_objective";
_marker setMarkerColor "ColorRed";
marker = _busrouteG;

_marker = createMarker ["busrouteH", [4130.15,11163.3,0]];
_marker setMarkerText "Bus Stop";
_marker setMarkerType "mil_objective";
_marker setMarkerColor "ColorRed";
marker = _busrouteH;

_marker = createMarker ["busrouteI", [2665.94,5610.17,0]];
_marker setMarkerText "Bus Stop";
_marker setMarkerType "mil_objective";
_marker setMarkerColor "ColorRed";
marker = _busrouteI;

_marker = createMarker ["busrouteJ", [2017.94,2248.53,0]];
_marker setMarkerText "Bus Stop";
_marker setMarkerType "mil_objective";
_marker setMarkerColor "ColorRed";
marker = _busrouteJ;

_marker = createMarker ["busrouteK", [3560.56,2443.72,0]];
_marker setMarkerText "Bus Stop";
_marker setMarkerType "mil_objective";
_marker setMarkerColor "ColorRed";
marker = _busrouteK;

_marker = createMarker ["busrouteL", [4115.76,2605.03,0]];
_marker setMarkerText "Bus Stop";
_marker setMarkerType "mil_objective";
_marker setMarkerColor "ColorRed";
marker = _busrouteL;

add this to the bottom of your init.sqf

//custom marker
[] execVM "Marker.sqf";


so this route will take you to most of the large cities and airports on the map in a large loop and if you on epoch with close vicinity of traders ( On my server i have like a reverse hooker thing going on ;p the drivers are female and they say pickup lines in dialog they drive a pink suv XD... im still having problems with nto being able to stop the bus at a random spot by runnign in its path it just runs meover and doesnt slow is reason i had to go to extra effort to mark the bus stops on the map

maybe you can somehow attach a siren to the bus that can be heard 200m in range or attach a moving map marker to it would be better like mentioned above
 
Last edited:
Back
Top