Jump to content
Sertica

AI Aircraft Take-Off To Waypoints

Recommended Posts

Anyone know how to make ai follow waypoints after taking off?  When I try setting waypoints it only flies straight off the map and ignores them entirely.  Note that this is not starting from an aircraft placed on ground in editor, which is apparently different.  The pilot is deleted when plane lands for service, to prevent it from immediately taking off again, then recreated after service.

createVehicleCrew _vehicle;
for "_idx" from (count WEST_UAV_PAT_WPTS)-1 to 0 step -1 do {
	(group (driver _vehicle)) addWaypoint WEST_UAV_PAT_WPTS select _idx;
};
_vehicle engineOn true;
(group (driver _vehicle)) setCurrentWaypoint [(group (driver _vehicle)),1];

 

Share this post


Link to post
Share on other sites

The waypoint is for group, so the pilot for a single aircraft. A code adding a waypoint (not too close) should work. Perhaps you could add a little sleep between the createVehicleCrew and the addWaypoint (in a scheduled code, i.e. spawned or execVMed)

 

Spoiler

 

Your code seems to be for UAV. Not sure it's related but have a look on this issue:

https://feedback.bistudio.com/T151083

https://feedback.bistudio.com/T71340

 

 

Anyway, instead of deleting crew to stop the aircraft/UAV at airport, I suggest you to setFuel 0 on it, then 1 for taking off.

Share this post


Link to post
Share on other sites

I know the waypoints are added successfully because a text widget prints the array.  I also consoled setWaypoint again in flight.  My last hack ideas are replacing crew after take-off or replacing the entire thing.

Those known issues are one of the reasons for deleting the crew.  I know them well from I&A servers.  I assumed the fault is in the crew.

@pierremgi

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×