Kookas 10 Posted March 27, 2011 (edited) I've set up two AIs (Russia - Men - Pilot) to run to a plane when they see a BLUFOR unit. In this particular mission, I have a Eurofighter Typhoon fly through the trigger. The pilot does try to run to his plane, but keeps going into prone and crouch all the time, making it very slow. I want him to sprint to the plane. How do I sort this? Here's the code that's on the trigger: ru_pilot_01 assignAsDriver ru_su33_01; [ru_pilot_01] orderGetIn true; I've also noticed it happening with taxiing aircraft sometimes, where they move a bit, stop, move a bit, stop. It's a bit of an obstacle :\ Also, my other computer doesn't have this issue at all, but I wouldn't have thought it to be spec-related, since lower spec processors wouldn't produce different results, only take longer to produce them. Just for the record, the working computer has an AMD PhenomX4 9950 BE 2.55GHz, and the buggy one has an AMD AthlonX2 4800 2.5GHz. Both have 2GB of RAM. And in case you propose that I just use the working computer, that one isn't always available (as is the case now). Guess it might be worth listing my addons, which may be causing issues: Community Base Addons Chernarus Electrical Grid JTD's Fire & Smoke USEC Maule M7 Kellu Island RKSL Eurofighter, Merlin & Puma (and all their dependencies) Su-33 Flanker Thanks in advance. Resolved: I set his behaviour to careless and it worked. Edited March 27, 2011 by Kookas resolved Share this post Link to post Share on other sites
igneous01 19 Posted March 27, 2011 try setting his behaviour to careless, that usually will solve 99% of problems when it comes to ai having to do something NOW when enemies are detected. just make sure that once he gets in and takes off, you set his behaviour back to default aware or danger, so that he actually engages the planes Share this post Link to post Share on other sites
Kookas 10 Posted March 27, 2011 try setting his behaviour to careless, that usually will solve 99% of problems when it comes to ai having to do something NOW when enemies are detected. just make sure that once he gets in and takes off, you set his behaviour back to default aware or danger, so that he actually engages the planes Thanks! How would I detect when he has taken off? Share this post Link to post Share on other sites
demonized 20 Posted March 27, 2011 other addons or patches running on the other computer?? disableAI may be something you want. ---------- Post added at 04:37 AM ---------- Previous post was at 04:37 AM ---------- pilotname in planename Share this post Link to post Share on other sites
igneous01 19 Posted March 27, 2011 Thanks! How would I detect when he has taken off? i think something like this might work: _objPosition = getPosATL pilot; _pilotsheight = _objPosition select 2; if (_pilotsheight == 50) then { pilot setbehaviour "AWARE"; }; that would probably be the basic jist of it. Although it might be better to make a script that activated once the pilot detects the aircraft, set him to careless, and check if hes in the vehicle, then give him a seek and destroy waypoint (guard waypoint might work too) then afterwards check his hieght (50 metres from terrain in the if statement) and then set him back to another behaviour like danger or aware. ill see if i can write a simple scramble script that might work with multiple planes. ---------- Post added at 09:17 ---------- Previous post was at 07:29 ---------- here it is: http://www.mediafire.com/?77iuj37xucap2ps and a basic script i wrote that will search for any pilot class in the area, and tell them to move to their assigned vehicle in careless mode so they get there as quick they can. Then move in to engage the threat here is the script. // Scramble script by DZ (Igneous01) // to call: nul = [200, airfield] execVM "scramble.sqf" // where 200 is the radius, airfield is an object or gamelogic to search within private ["_pilots", "_rad", "_airfield"]; _rad = _this select 0; // the radius to search for pilots _airfield = _this select 1; _pilots = nearestObjects [_airfield, ["CZ_Soldier_Pilot_EP1","BAF_Pilot_MTP", "CDF_Soldier_Pilot", "GUE_Soldier_Pilot", "Ins_Soldier_Pilot", "Soldier_Pilot_PMC", "RU_Pilot", "RU_Soldier_Pilot", "TK_Soldier_Pilot_EP1", "UN_CDF_Soldier_Pilot_EP1", "US_Soldier_Pilot_EP1", "USMC_Soldier_Pilot"], _rad]; hint "SCRAMBLE! SCRAMBLE! Pilots getting into aircraft!"; _pilots ordergetin true; // pilots ordered to get into aircraft {_x setBehaviour "CARELESS"; _x setSpeedMode "Full"; _wp = group _x addWaypoint [position _airfield, 0]; [group _x, 0] setWaypointType "SAD"} foreach _pilots; // waituntil pilots are in vehicles waituntil {{_x in (assignedVehicle _x)} foreach _pilots}; {_x setbehaviour "DANGER"; _x setcombatmode "RED"} foreach _pilots; and that should work pretty well. ofcourse it checks for all pilots in the area, but shouldnt be a problem since the enemy are already in their aircraft. i might tweak it a bit more to make them follow the threats, for now engage at will and search and destroy waypoints are good workarounds to that. i recommend placing the empty jets in a line on the runway, they get stuck when you try to put them beside a hanger (they wont go on the run way and just sit there) but in the example mission all 3 jets scramble to take out the 2 us jets. Share this post Link to post Share on other sites
Chief_Wiggum 10 Posted March 31, 2011 also put _x setUnitPos "UP" , this way they will never crouch or drop to the floor. Share this post Link to post Share on other sites