Jump to content
  • 0

axemans AI bus route compatible with Epoch?


bFe

Question

Recommended Posts

  • 0

Don't forget to also change the code that checks for surivors in player_axeBus.sqf

 

i.e

        //Nearby Survivors
        _survivors = (position _x) nearEntities [AllPlayers,250];

 

So it detects the extra survivor skins helps to stop bus driver running players over :)

 

As for debries i just gonna add code to remove debries with 10 metres of bus

Link to comment
Share on other sites

  • 0

That bit doesn't stop the bus from running players over, it is designed to beep the horn and flash the lights at nearby survivors. If the AI are negotiating anything else they will mow you down if you get in the way, It appears they can only avoid one thing at a time. If it is a clear road it is relatively safe to stand infront of the bus to get it to stop, an interesting game of chicken.

 

If sides are changed it is possible that a driver may try and kill you, have not tested this and am not entirely sure that they will use the bus as a weapon.

 

There is an update for this that I am currently testing, that removes zombies, stops temporarily for nearby survivors, experimenting with AI load offset for busy servers, more messaging, working on removal / avoidance of debris. The current debris is supposed to be server-side so the driver should see it, he seems to just think he can drive over it anyway.

 

Have had issues with boarding only when I added a custom option to the player menu which kept overriding the 'get on bus as passenger' option..

 

This code is also being expanded on for other uses...

Link to comment
Share on other sites

  • 0

That bit doesn't stop the bus from running players over, it is designed to beep the horn and flash the lights at nearby survivors. If the AI are negotiating anything else they will mow you down if you get in the way, It appears they can only avoid one thing at a time. If it is a clear road it is relatively safe to stand infront of the bus to get it to stop, an interesting game of chicken.

 

If sides are changed it is possible that a driver may try and kill you, have not tested this and am not entirely sure that they will use the bus as a weapon.

 

There is an update for this that I am currently testing, that removes zombies, stops temporarily for nearby survivors, experimenting with AI load offset for busy servers, more messaging, working on removal / avoidance of debris. The current debris is supposed to be server-side so the driver should see it, he seems to just think he can drive over it anyway.

 

Have had issues with boarding only when I added a custom option to the player menu which kept overriding the 'get on bus as passenger' option..

 

This code is also being expanded on for other uses...

Sounds cool, would there be a problem with Sarge AI? I want it on my PvE server, but there is AI's so there is a threat so it is not just fun.

Link to comment
Share on other sites

  • 0

There is an update for this that I am currently testing, that removes zombies, stops temporarily for nearby survivors, experimenting with AI load offset for busy servers, more messaging, working on removal / avoidance of debris. The current debris is supposed to be server-side so the driver should see it, he seems to just think he can drive over it anyway.

I can't remember if it was the bus script you had developed or another one, but it seemed like the bus was most likely to get stuck on debris when a player was within a several hundred meters of the debris pile when the bus came to it. I remember one day I was at camp for a while doing chores and the bus drove past several times in the span of a couple hours. Then once I left camp to scavenge and whatnot I saw him get stuck on some debris pile for about 30 minutes before I left the area. Eventually I saw him again and he would do his lap without getting stuck, until I was around a debris pile that he decided to just try to plow through instead of go around. I eventually went back to camp and monitored him via the Admin Tools map and he never got stuck so long as a player was not around a debris pile.

Link to comment
Share on other sites

  • 0

Just wondering if you could convert the bus into something more military themed, say a MTVR_DES_EP1..

 

Just it being that the military have decided to try to maintain some semblence of the old ways and have provided this service for what survivors are left..

 

Just an idea, and have the driver and friend in a uniform as well

Link to comment
Share on other sites

  • 0

I'm currently running DZAI + Mission System. Can't get into the bus, there's no menu option. So, took a look at all the faction settings I could find between the three scripts and here's what I found:

 

DZAI
createcenter east; //Create centers for all AI sides
createcenter resistance;
east setFriend [resistance, 1]; //Resistance (AI) is hostile to West (Player), but friendly to East (AI).
east setFriend [west, 0]; 
resistance setFriend [west, 0]; //East (AI) is hostile to West (Player), but friendly to Resistance (AI).
resistance setFriend [east, 1]; 
west setFriend [resistance, 0]; //West (Player side) is hostile to all.
west setFriend [east, 0];
MISSION SYSTEM
_aiGroup = createGroup resistance;
BUS ROUTE
createCenter RESISTANCE;
RESISTANCE setFriend [WEST,1];//Like Survivors..
RESISTANCE setFriend [EAST,0];//Don't like banditos !
WEST setFriend [RESISTANCE,1];
EAST setFriend [RESISTANCE,0];
 
Seems like everything is set the way it should be, but I'm really just guessing at this point. Couldn't find much for the Mission System script. Can anyone shed some insight on why the bus might be flagged as non-friendly? Thanks
Link to comment
Share on other sites

  • 0

DZAI is overwriting the setFriend settings. If you aren't friendly with the bus crew they won't let you on..

 

Am currently working on another AI project, this will also require debris awareness so will update Bus once I work it out. The AI should see the debris as they are both server spawned, gonna have to add some aware code in.

 

Have code that clears zeds out of the way, the setDamage may work better with a value of 0.9 and the bus finishing them off (not tested) as I have noticed zeds just vanishing sometimes..

//Clear Zeds (WORKING - But zeds vanish, not ideal maybe pass to player)
		_nrZeds = (position _axeBus) nearEntities ["zZombie_Base",25];
		if(count _nrZeds >0)then{
			{
			_x setDamage 1; 
			diag_log format ["AXLOG:BUS: Killing Zed:%1",_x];				
			}forEach _nrZeds;
		};

This goes in the while {alive _axeBus} do {.....}; loop at the bottom of bus_init.sqf.

 

Also working on generic junk removal (in same place), can populate the array _arrJunk with more objects as required:

_arrJunk = ["Rubbish1","Rubbish2","Rubbish3","Rubbish4","Rubbish5","Land_Misc_Rubble_EP1","UralWreck","SKODAWreck","HMMWVWreck","datsun02Wreck","hiluxWreck","UAZWreck","datsun01Wreck","Land_Misc_Garb_Heap_EP1"];
		
//Remove Junk
_junk = (position _axeBus) nearEntities [_arrJunk,10];
if(count _junk > 0)then{
	diag_log format["AXLOG:BUS:Deleting Junk:%1",_junk];
	{deleteVehicle  _x;}forEach _junk;
};

Both of these have been tested out and working..

Link to comment
Share on other sites

  • 0

How exactly does this script work?

 

Does one bus spawn, get to the end of the route and the de-spawn? Or does it spawn one bus at server start which then goes back and forth?

 

I seem to have gotten it working to some extent and changed the vehicle to a MTVR which is much better - but when it stops for me to get on, the minute it pulls away, it insta-kills me.

 

Something I'm doing wrong?

Link to comment
Share on other sites

  • 0

andygully, i had the same problem.. and finally managed to solve it =)

In \system\server_cleanup.fsm find

class vehicle_cleanup
    {
      name = "vehicle_cleanup";
      init = /*%FSM<STATEINIT""">*/"_safety = PVDZE_serverObjectMonitor;" \n
       "" \n
       "//Check for hackers" \n
       " {" \n
       "    if(vehicle _x != _x && !(vehicle _x in _safety) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle)) 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

and replace

       "    if(vehicle _x != _x && !(vehicle _x in _safety) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle)) then {" \n

with

       "    if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"" && ((vehicle _x getVariable [""Sarge"",0] != 1) && (vehicle _x getVariable [""DZAI"",0] != 1) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle)) then {" \n

Also for anyone who wants to run the bus together with DZAI, following fixed the not being able to get on the bus problem:

 

In init_bus.sqf change

    _axeBusGroup = createGroup RESISTANCE;

to

    _axeBusGroup = createGroup WEST;

and comment out

    //Set Sides
//    _firstRun = _this select 0;
//    if(_firstRun)then{
//    createCenter RESISTANCE;
//    RESISTANCE setFriend [WEST,1];//Like Survivors..
//    RESISTANCE setFriend [EAST,0];//Don't like banditos !
//    WEST setFriend [RESISTANCE,1];
//    EAST setFriend [RESISTANCE,0];
//    };

Now you can get on the bus and it will less likely try to run you over ^^

Edited by Twistit
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...