dayZ (arma) AI Controlled Bus Route.

@stealth the Bus Stops at the waypoints. Just change the waypoints. They are Not needet for streetfinding.
Thankyou but that bit was understood, I worked it out and have it running real well on Ovaron now, Had to change the bus for a V3S as bus was to big to get rond some of the small street intersections.
Would love to get your script though as time is an issue and the twads who continue to shoot driver, BUT I cannot get onto your server as I am Based In Australia and my ping levels are way too high:(
 
@NeverUsedID

I managed to stay on your server long enough to load misson file.
I am using Ovaron and have to edit a fair bit to get it working, so three quick questions.

1: How do you determine the time between the buses starting?
2: [[1232.99,2400.28],94.2595 I understand co'ord's but I am not sure what these extra numbers are for cause you wouldn't have the way point up in the air. 3: How Buses Can We Run, or is it just 2?
 
@NeverUsedID

I managed to stay on your server long enough to load misson file.
I am using Ovaron and have to edit a fair bit to get it working, so three quick questions.

1: How do you determine the time between the buses starting?
2: [[1232.99,2400.28],94.2595 I understand co'ord's but I am not sure what these extra numbers are for cause you wouldn't have the way point up in the air. 3: How Buses Can We Run, or is it just 2?

Iam not sure about the wayponts, that was
Not my Part, but i thnk the number determines how strict the waypoint Need to be reached. F.e the Bus can Miss the waypoint by 2 Meters.

1. I think you cant. The Buses Start all at the Same Time, but the spawn with much distance as possible. So the First will spawn in berezino the Second in Kamenka, the third around Elektro/cherno.


3. we have tested It with 2 but you can Place as much Buses as waypoints are there theoretical.

There is a bug in the Script. The refuel doesnt work at the Moment. We Need to change this Part back to the Way axeman is doing It with the extra busmonitoring sqf.
 
2: [[1232.99,2400.28],94.2595 I understand co'ord's but I am not sure what these extra numbers are for cause you wouldn't have the way point up in the air.

The numbers, when creating a waypoint are: Position array: [x,y,z]. Radius (2) the waypoint is placed randomly within a 2m radius of the position. Last one is index, the order in which the waypoints are completed (driven to).

Another important aspect is the last waypoint, set to CYCLE, has to be placed exactly on the first waypoint to create a loop in the bus route.

Is all explained here: http://community.bistudio.com/wiki/addWaypoint
 
The numbers, when creating a waypoint are: Position array: [x,y,z]. Radius (2) the waypoint is placed randomly within a 2m radius of the position. Last one is index, the order in which the waypoints are completed (driven to).

Another important aspect is the last waypoint, set to CYCLE, has to be placed exactly on the first waypoint to create a loop in the bus route.

Is all explained here: http://community.bistudio.com/wiki/addWaypoint

Learned something. AGAIN :) We will remove this number. Its a mistake...
 
For the first error I would comment out lines #23-#33
Code:
    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;
    };
Is currently not doing much, I need to move the horn beeping clientside so the player can hear it. Have not got this error myself, is this after you have killed the driver ?

The second error I am also seeing on my test server, this is the drivers mate running off after the driver is shot. If you follow him he carries on running the bus route.

I did have him setup to take over if the bus driver is killed, will see if I can find that bit of code. It got all mixed up when I started to code the retaliation units to take over the bus after clearing the area, managing all the groups was a nightmare..

A simple solution would be to kill him if the driver is killed, in crewKilled.sqf.

We cant get rid of this error. Some research gives the infomation that this is a bug of the arma 2 engine and was fixed, but its still there...

Okay. Fixed. Our testserver had the wrong armaverison. :(
 
is there anyway to change the route so the bus takes people from the worst spawn in the game - West of Kamenka - Then takes them to Balota, with stops along the way at each bus stop?
 
is there anyway to change the route so the bus takes people from the worst spawn in the game - West of Kamenka - Then takes them to Balota, with stops along the way at each bus stop?
Plot your waypoints and add them to the array. First waypoint is the start/loop point. The rest i would make as the bus stops or Road junctions. the Ai are pretty good at following roads.
 
I hate to sound dumb, but have never done anything with waypoints yet... do I make those in the 3d editor then c/p into the .sqf ? I have installed this once already and worked perfectly except it didn't like the check points i built around elektro and kept getting stuck and going round in circles... Poor survivors were getting sick on the bus and were being shot coz other survivors thought they were turning into Z's!!
 
Great Job So Far Guys,

I am trying to take a bit from both methods to get it working on Ovaron, however trying to run multiple buses and due to the route being a complete circuit of the map I have tried a couple of ways to get more than on vehicle to spawn but all have failed so I tried to create 3 different loops of the one circuit as follows but upon server boot not one spawns.
Will this method work or not and if so where am I stuffing it up.?

Thankyou in advance.

Code:
  _waypoints = [
        [[7183.96,3695.58],178.1,"Singapure/Hiroshima Bridge"],
        [[7316.99,2480.21],188.1,"Bankok Dairy"],
        [[5724.04,2531.33],302.1,"Seoul Bay"],
        [[4785.61,3774.7],334.1,"Luxemberg Factory"],
        [[3591.2,2784.41],243.1,"Luxemberg Forest"],
        [[2963.09,2293.72],230.1,"Calais North"],
        [[2192.23,2152.93],316.1,"Den Haag West"],
        [[1530.09,2695.86],344.1,"Vaduz North"],
        [[1842.57,3759.55],342.1,"Pix Castle XRoads"],
        [[1133.79,4742.09],326.1,"New York Dairy"],
        [[1625.44,5826.67],357.1,"West River Bend"],
        [[3055.24,6533.01],5.1,"Paris/ Helsinki Bridge"],
        [[2923.22,7750.17],15.1,"Sofia Dairy"],
        [[4555.86,7690.43],122.1,"Belgrad Bay"],
        [[5454.99,6469.42],152.1,"Baku Factory"],
        [[6650.97,7456.97],154.1,"Baku Forest"],
        [[7291.13,7957.52],50.1,"Peking South"],
        [[8054.46,8085.26],136.1,"Kuwait East"],
        [[8678.8,7592.43],165.1,"Colombo East"],
        [[8394.17,6483.22],175.1,"Daninz Castle"],
        [[8849.5,5700.19],138.1,"Moscow South"],
        [[9105.09,5499.49],177.1,"Moscow Dairy"],
        [[8671.51,4552.42],185.1,"East River Bend"],
        [[7183.96,3695.58],178.1,"Singapure/Hiroshima Bridge"]
    ];   
        _waypoints = [
            [[2963.09,2293.72],230.1,"Calais North"],
            [[2192.23,2152.93],316.1,"Den Haag West"],
            [[1530.09,2695.86],344.1,"Vaduz North"],
            [[1842.57,3759.55],342.1,"Pix Castle XRoads"],
            [[1133.79,4742.09],326.1,"New York Dairy"],
            [[1625.44,5826.67],357.1,"West River Bend"],
            [[3055.24,6533.01],5.1,"Paris/ Helsinki Bridge"],
            [[2923.22,7750.17],15.1,"Sofia Dairy"],
            [[4555.86,7690.43],122.1,"Belgrad Bay"],
            [[5454.99,6469.42],152.1,"Baku Factory"],
            [[6650.97,7456.97],154.1,"Baku Forest"],
            [[7291.13,7957.52],50.1,"Peking South"],
            [[8054.46,8085.26],136.1,"Kuwait East"],
            [[8678.8,7592.43],165.1,"Colombo East"],
            [[8394.17,6483.22],175.1,"Daninz Castle"],
            [[8849.5,5700.19],138.1,"Moscow South"],
            [[9105.09,5499.49],177.1,"Moscow Dairy"],
            [[8671.51,4552.42],185.1,"East River Bend"],
            [[7183.96,3695.58],178.1,"Singapure/Hiroshima Bridge"],
            [[7316.99,2480.21],188.1,"Bankok Dairy"],
            [[5724.04,2531.33],302.1,"Seoul Bay"],
            [[4785.61,3774.7],334.1,"Luxemberg Factory"],
            [[3591.2,2784.41],243.1,"Luxemberg Forest"],
            [[2963.09,2293.72],230.1,"Calais North"]
        ];
            _waypoints = [
                [[3055.24,6533.01],5.1,"Paris/ Helsinki Bridge"],
                [[2923.22,7750.17],15.1,"Sofia Dairy"],
                [[4555.86,7690.43],122.1,"Belgrad Bay"],
                [[5454.99,6469.42],152.1,"Baku Factory"],
                [[6650.97,7456.97],154.1,"Baku Forest"],
                [[7291.13,7957.52],50.1,"Peking South"],
                [[8054.46,8085.26],136.1,"Kuwait East"],
                [[8678.8,7592.43],165.1,"Colombo East"],
                [[8394.17,6483.22],175.1,"Daninz Castle"],
                [[8849.5,5700.19],138.1,"Moscow South"],
                [[9105.09,5499.49],177.1,"Moscow Dairy"],
                [[8671.51,4552.42],185.1,"East River Bend"],
                [[7183.96,3695.58],178.1,"Singapure/Hiroshima Bridge"],
                [[7316.99,2480.21],188.1,"Bankok Dairy"],
                [[5724.04,2531.33],302.1,"Seoul Bay"],
                [[4785.61,3774.7],334.1,"Luxemberg Factory"],
                [[3591.2,2784.41],243.1,"Luxemberg Forest"],
                [[2963.09,2293.72],230.1,"Calais North"],
                [[2192.23,2152.93],316.1,"Den Haag West"],
                [[1530.09,2695.86],344.1,"Vaduz North"],
                [[1842.57,3759.55],342.1,"Pix Castle XRoads"],
                [[1133.79,4742.09],326.1,"New York Dairy"],
                [[1625.44,5826.67],357.1,"West River Bend"],
                [[3055.24,6533.01],5.1,"Paris/ Helsinki Bridge"]
            ];
 
I found the bus and driver invulnerable, I like the way it is written, learning something new every day. The horn I am designing to beep when near a survivor, the current distance is just for testing, am thinking around 300m, all depending on how far away the horn can be heard from, i think that sound distance can be set.

I like the idea of the bus being invincible as it just works and keeps going, but want to keep the AI retaliation as it makes it more entertaining. I originally had them flying in in a Huey and then tried HUMMVs, I ended up with a car park of HUMMVs as they got stuck, the Huey gunners wouldn't fire upon the targets and kept looking for a helipad, miles away, to land on.. Was thinking of trying an Apache next :)

Multiple buses is great, have worked on this before by setting the next waypoint for the 2nd driver, was just a lot to manage for multiple buses and responses, was waiting to perfect the single bus before adding more in..

@NeverUsedID: The problem with the messages, do you need to ask the client to wait for the publicvariable BusMessage before calling the message script ? Also interested in how the public variables are working out ?

At the end of this we should have an awesome bus service :)
 
Hi axeman,
I was planning on adding this to my DayZ.st server as well as that train one, and I decided it would be sweet to use this in Chernarus Life.
Thus, I will be posting many questions in the near future, I assume, even though I've been working with A2 code for 4 years now.
Based on the description, I believe I will only have to change the units to normal ArmA 2 units to get it to function, and after that it will be perfect. I hope to be able to help you with some other problems, like players being able to get in as driver, etc.

Thanks!
 
I also plan to add a global warning message, stating that "Civ 5 or whatever has attacked the bus at *Insert Location Here*" and remove the support due to the whole police thing.

That's already been fixed. Players can't get into the driver's seat anymore.
Ah, I had read the Bus Route request thread and it seemed that was the biggest problem.
Thanks for letting me know.
 
I'm still waiting for an answer to questions I presented a few days ago:

1. Can we change it so the bus doesn't stop at bus stops? It already stops if there's a player in the road, so that should be sufficient.
2. Would it be possible to a trigger that announces when a player enters an area, such as "The AI bus just entered Cherno"?
 
I'm still waiting for an answer to questions I presented a few days ago:

1. Can we change it so the bus doesn't stop at bus stops? It already stops if there's a player in the road, so that should be sufficient.
2. Would it be possible to a trigger that announces when a player enters an area, such as "The AI bus just entered Cherno"?
You can stop the bus stopping at bus stops by removing the line with setwayPointTimeout. Messaging is being worked on with one of the new branches. I would assume you want messages to the passengers not every player on the server every time the bus moves down the road ?
 
Back
Top