rossco5378 Posted January 27, 2015 Report Share Posted January 27, 2015 The ai gets out of the heli and runs about 5M and then gets ported back into the heli. This is just a infinite loop and i cannot seem to figure it out. I have attached the server side init_bus.sqf in the spoiler below. private ["_axeBusUnit","_firstRun","_dir","_axWPZ","_unitpos","_rndLOut","_ailoadout","_axeBus","_axeBusGroup","_axeBuspawnpos","_axeBusWPradius","_axeBusWPIndex","_axeBusFirstWayPoint","_axeBusWP","_axeBusRouteWaypoints","_axeBusDriver","_axeBusLogicGroup","_axeBusLogicCenter"]; _axeBusUnit = objNull; _axeBusGroup = createGroup WEST; // Sets to BlueFor _axeBuspawnpos = [13683.5,2909.92,0]; _unitpos = [13700.3,2934.12,0]; _axeBusWPradius = 2;//waypoint radius _axeBusDriver = objNull; //Set Sides No need for this //_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]; //}; //Load Bus Route // Cherno [7262.95,2993.65] // Stary [6222.05,7808.89] // Bash [3999.16,11646] // Klen [11509.3,11319.4] _axWPZ=0; _axeBusWPIndex = 2; _axeBusFirstWayPoint = [7262.95,2993.65,_axWPZ]; _axeBusWP = _axeBusGroup addWaypoint [_axeBusFirstWayPoint, _axeBusWPradius,_axeBusWPIndex]; _axeBusWP setWaypointType "getout"; _axeBusRouteWaypoints = [[11509.3,11319.4,_axWPZ],[3999.16,11646,_axWPZ],[6222.05,7808.89,_axWPZ],[7262.95,2993.65,_axWPZ]]; { _axeBusWPIndex=_axeBusWPIndex+1; _axeBusWP = _axeBusGroup addWaypoint [_axeBusFirstWayPoint, _axeBusWPradius,_axeBusWPIndex]; _axeBusWP setWaypointType "getout"; _axeBusWP setWaypointTimeout [20, 30]; diag_log format ["BUS:Waypoint Added: %2 at %1",_axeBusFirstWayPoint,_axeBusWP]; } forEach _axeBusRouteWaypoints; //Create Loop Waypoint _axeBusWP = _axeBusGroup addWaypoint [_axeBusFirstWayPoint, _axeBusWPradius,_axeBusWPIndex+1]; _axeBusWP setWaypointType "CYCLE"; //Create Bus _dir = 244; _axeBus = "BAF_Merlin_HC3_D" createVehicle _axeBuspawnpos; _axeBus setDir _dir; _axeBus setPos getPos _axeBus; _axeBus setVariable ["ObjectID", [_dir,getPos _axeBus] call dayz_objectUID2, true]; _axeBus setFuel 1; _axeBus allowDammage false; //Uncomment for normal dayZ //dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_axeBus]; //For Epoch - Comment out for normal dayZ | Credit to Flenz PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_axeBus]; [_axeBus,"BAF_Merlin_HC3_D"] spawn server_updateObject; //Make Permanent on some builds.. No Need really, //dayzSaveVehicle = _axeBus; //publicVariable "dayzSaveVehicle"; _axeBus addEventHandler ["HandleDamage", {false}]; _axeBus setVariable ["axBusGroup",_axeBusGroup,true]; _axeBus setVariable ["isAxeAIBus",1,true]; //Create Pilot "BAF_Pilot_MTP" createUnit [_unitpos, _axeBusGroup, "_axeBusUnit=this;",0.5,"Private"]; _axeBusUnit enableAI "TARGET"; _axeBusUnit enableAI "AUTOTARGET"; _axeBusUnit enableAI "MOVE"; _axeBusUnit enableAI "ANIM"; _axeBusUnit enableAI "FSM"; _axeBusUnit allowDammage true; _axeBusUnit setCombatMode "GREEN"; _axeBusUnit setBehaviour "CARELESS"; //set skills _axeBusUnit setSkill ["aimingAccuracy",1]; _axeBusUnit setSkill ["aimingShake",1]; _axeBusUnit setSkill ["aimingSpeed",1]; _axeBusUnit setSkill ["endurance",1]; _axeBusUnit setSkill ["spotDistance",0.6]; _axeBusUnit setSkill ["spotTime",1]; _axeBusUnit setSkill ["courage",1]; _axeBusUnit setSkill ["reloadSpeed",1]; _axeBusUnit setSkill ["commanding",1]; _axeBusUnit setSkill ["general",1]; _axeBusUnit assignAsCargo _axeBus; _axeBusUnit moveInCargo _axeBus; _axeBusUnit addEventHandler ["HandleDamage", {false}]; //End of create pilot waitUntil{!isNull _axeBus}; //diag_log format ["AXLOG:BUS: Bus Spawned:%1 | Group:%2",_axeBus,_axeBusGroup]; //Monitor Bus while {alive _axeBus} do { //diag_log format ["AXLOG:BUS: Tick:%1",time]; //Fuel Bus if(fuel _axeBus < 0.2)then{ _axeBus setFuel 1; //diag_log format ["AXLOG:BUS: Fuelling Bus:%1 | Group:%2",_axeBus,_axeBusGroup]; }; //Keep Bus Alive - Shouldn't be required. if(damage _axeBus>0.4)then{ _axeBus setDamage 0; //diag_log format ["AXLOG:BUS: Repairing Bus:%1 | Group:%2",_axeBus,_axeBusGroup]; }; //Monitor Driver if((driver _axeBus != _axeBusDriver)||(driver _axeBus != _axeBusUnit))then{ //diag_log format ["AXLOG:BUS: Driver Required:%1",driver _axeBus]; units _axeBusGroup select 0 assignAsDriver _axeBus; units _axeBusGroup select 0 moveInDriver _axeBus; }; sleep 3; }; If anyone can help me figure out what the issue is that would be much appreciated. Thanks. Link to comment Share on other sites More sharing options...
0 rossco5378 Posted January 29, 2015 Author Report Share Posted January 29, 2015 Need help with a new issue (read edit) Link to comment Share on other sites More sharing options...
Question
rossco5378
The ai gets out of the heli and runs about 5M and then gets ported back into the heli. This is just a infinite loop and i cannot seem to figure it out.
I have attached the server side init_bus.sqf in the spoiler below.
If anyone can help me figure out what the issue is that would be much appreciated.
Thanks.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now