dayZ (arma) AI Controlled Bus Route.

Well I ran into another issue while I was working on the north bus route. Seems that the current buses run out of fuel on their route. I have tried to add in a refuel line for the buses but it makes the bus stops into an auto-refuel spot for players vehicles and the AI buses do not refuel. I am guessing this is what is causing the buses on the route to stop moving after an hour or so.
 
Well I ran into another issue while I was working on the north bus route. Seems that the current buses run out of fuel on their route. I have tried to add in a refuel line for the buses but it makes the bus stops into an auto-refuel spot for players vehicles and the AI buses do not refuel. I am guessing this is what is causing the buses on the route to stop moving after an hour or so.


man i was so gonna post this in a little bit, i've added in the the bus route + a copy of it and i to have the fueless buses. you can just watch them turn the wheel and tires move.

EDIT: the only buses out of fuel are the ones from that other guys version, the 3 buses, axemans bus is still trucking
 
does anyone know how to make the bus not care about whats in the road? im having some troublesome individuals placing cars all over the road just to stop the bus and make it drive in the grass and get stuck in crap. if anyone knows how to make it just ram that shit, that would be great :D
 
I read somewhere in one of the earlier pages of this thread that the ArmA 2 AI has an issue with things in the road. It will stop for zombies and animals. NeverUsedID's version has a section added to the script that deletes the zombies that come near the bus. As for the animals there isn't much that can be done from what I understand.

I am going to look into axeman's script and see how he spawns in the bus and see if it can be merged into NeverUsedId's version to solve my fuel issue.
 
I read somewhere in one of the earlier pages of this thread that the ArmA 2 AI has an issue with things in the road. It will stop for zombies and animals. NeverUsedID's version has a section added to the script that deletes the zombies that come near the bus. As for the animals there isn't much that can be done from what I understand.

I am going to look into axeman's script and see how he spawns in the bus and see if it can be merged into NeverUsedId's version to solve my fuel issue.


well at this current stage in my servers life im damn near about to pull the bus script, people are just going out of their way to stop it for no good reason. good luck on your ventures though!
 
Well not bullet proof but neither the bus driver nor the bus will take damage. We have tested it on my server and if you target a player on the bus you can kill that player but not the driver, and if you shoot the tires or any part of the bus it automatically repairs.

I have warned people on my server that the buses are there for travel purposes of newly spawned players. That if anyone is caught purposely blocking the buses for any reason they will be banned. I have even gone as far as to remove all the vehicle spawns along the coast to force bus travel.
 
hmmm wonder why my bus and driver get destroyed and die....i downloaded the copy off that guys server and just plugged it right into mine =(
 
just went back to his server, redownloaded the mission.pbo, transcribed the folder + exe line into my own and still my driver and bus can be destroyed. this script hates me
 
I like NeverUsedID's script myself. The driver drives the bus much better where as axeman's driver was all over the road and constantly stopping. It would take 30 minutes just to go from one side of a town to the other. NeverUsedID's driver makes a little swerve when pulling away from a bus stop but from there on it is pedal to the floor fast. There is also a lot of way points already marked out all along the coast in NeverUsedID's. The bus route runs from Berezino to Kamenka, and there is an config option in one of the db_busroute.sqf that lets you add more buses to that route, set the time the bus waits at each bus stop, and how long before the bus leaves the stop does the bus sound the horn. Not only do players hear the bus horn at a stop but at night the driver also turns on the lights of the bus and flashes them when he reaches a stop.
 
Sry, i dont have time to look into the fuel issue. But what i know is the you will get an error in your logfiles on serverrestart if you use the busccript. its because a function in the bus script dont exist in 1.7.7. But iam sure you can replace the function with a new one.

Maybe commenting out just the secRE.sql script in the mission init file will help too.

as far a i remember the Problem is in PublicEH.sqf
//"dayzVehicleInit"addPublicVariableEventHandler {(_this select 1) call fnc_vehicleEventHandler};

we use this fnc_vehicleEventHandler too. But it seems that this function doesnt exist anymore in 1.7.7
 
I will look into this once I have upgraded my computer motherboard, processor, and memory. Upgrading from a dual core to a quad core. Motherboard has dual PCI Express slots where as my old motherboard had a single. And I am going from 4gbs of RAM to 8.
 
Bit of an update on this, more like a total re-write.. Have simplified it making the bus and crew invulnerable, added player messages and working on beeping the horn and providing randomly created bus routes (for next update)

https://github.com/andgregor/dayZ-AI-Bus-Route

Requires a clean install of the bus route files..

Would be interested in using some AI to retaliate..
 
The detect player section is disabled and the new script doesn't include the ...
_axeBusWP setWaypointTimeout [10, 15, 20];
pause at waypoints, so travellers are shedding a tear as the bus pulls up to the stop and then speeds away ;)

Other than that, nice rewrite :)

I like realism too, but the change to make the driver invulnerable makes it a lot more practical for me. My enemy AI heli's were making short work of the poor guy.

BTW: Also a big fan of your streetlights script
 
The detect player section is disabled and the new script doesn't include the ...
_axeBusWP setWaypointTimeout [10, 15, 20];
pause at waypoints, so travellers are shedding a tear as the bus pulls up to the stop and then speeds away ;)

Other than that, nice rewrite :)

I like realism too, but the change to make the driver invulnerable makes it a lot more practical for me. My enemy AI heli's were making short work of the poor guy.

BTW: Also a big fan of your streetlights script


Thanks, and well spotted, have added that WaypointTimeout back in.

Currently working on spotting players, getting the bus to stop was a pain as the AI was insistent on carrying on driving. I may have to drop a temporary waypoint to achieve this.

I did have it beeping before but not working now, which is why all that lot is commented out.. I need to localise the gameLogic with the layer I think..

Glad you like them, an update coming very soon for the lights..
 
1znZklN.jpg

All Running smooth swapped the ikarus out for a BTR40_MG_TK_GUE_EP1 and changed driver and mates skins for stalker black also gave them FHQ_ACR_SNW_TWS_GL_SD_F one problem tho when i fire the machine gun the bus alters course and heads off into the woods
 
lol, nice mod. I suspect the ai are changing their behaviour due to the gunfire. there is a bit of code that changes behaviour to stealth to allow the lights to be flashed on and off, unlikely but may be related.
 
I decided to make the npc guy in the back of the bus a “medic”. :)

With this version of player_join_bus.sqf, fifteen seconds after the player boards the bus, they are bandaged and transfused. You can set the delay to something other than fifteen seconds and can set the amount of blood given.
---------------------------------------------------------------------------------------------------------------------------------------------------------------

private["_gotIn","_axeBus"];
_axeBus = _this select 0;
_gotIn = _this select 2;
if(_gotIn==player)then{
cutText ["Welcome aboard. The medic will bandage you up and give you some blood if you're injured.", "PLAIN DOWN",6];
_busTime = time;
_waitTime = 15; // Number of seconds before player is tranfused
_bloodAmount = 11000; // Amount of blood given (max 12000)
_medBus = true;
while {true}do{

while{player==driver _axeBus}do{
cutText ["Hey! You trying to hijack the bus?!", "PLAIN DOWN",2];
while{player==driver _axeBus}do{
sleep 1.2;
cutText ["Get off the Bus!", "PLAIN DOWN",2];
sleep 1.2;
player action ["eject", vehicle player];
};
};

if(((time - _busTime) > _waitTime) && (_medBus)) then {
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
dayz_sourceBleeding = objNull;
call fnc_usec_resetWoundPoints;
r_player_blood = r_player_blood + _bloodAmount;

if(r_player_blood > 12000) then {
r_player_blood = 12000;
};
_medBus = false;
};
};
};

---------------------------------------------------------------------------------------------------------------------------------------------------------

I have enemy soldier AI on my server. The bus driver gets a little squirrel y when enemy AI appear, and being on the bus while he maneuvers around them is a death sentence. This version of player_join_bus.sqf bandages and transfuses the player every fifteen seconds while they are on the bus. This keeps passenger’s alive while under enemy AI fire.

---------------------------------------------------------------------------------------------------------------------------------------------------------

private["_gotIn","_axeBus"];
_axeBus = _this select 0;
_gotIn = _this select 2;
if(_gotIn==player)then{
cutText ["Welcome aboard. The medic will bandage you up and give you some blood if you're injured. If we run into soldier scum, I'll find a way around them. Don't panic and stay in the bus! The medic will keep you alive.", "PLAIN DOWN",6];
canHeal = true;
_busTime = time;
_waitTime = 15; // Number of seconds between tranfusions
_bloodAmount = 11000; // Amount of blood given (max 12000)
while {true}do{

while{player==driver _axeBus}do{
cutText ["Hey! You trying to hijack the bus?!", "PLAIN DOWN",2];
while{player==driver _axeBus}do{
sleep 1.2;
cutText ["Get off the Bus!", "PLAIN DOWN",2];
sleep 1.2;
player action ["eject", vehicle player];
};
};

if(((time - _busTime) > _waitTime) && (canHeal)) then {
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
dayz_sourceBleeding = objNull;
call fnc_usec_resetWoundPoints;
r_player_blood = r_player_blood + _bloodAmount;

if(r_player_blood > 12000) then {
r_player_blood = 12000;
};
_busTime = time;
};
};
};
-------------------------------------------------------------------------------------------------------------------------------------------------------

Add this line to player_leave_bus.sqf , above the CutText line ...

canHeal = false;
cutText ["Be safe out there and good luck.", "PLAIN DOWN",6];
};

---------------------------------------------------------------------------------------------------------------

BTW axeman, I was looking for a way to have the driver announce the location of the next stop. Is there some code that would determine which waypoint on the list that the bus is heading to next?

Thanks.
 
Back
Top