OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: pertti49 on 17 Oct 2003, 07:45:33

Title: landing?
Post by: pertti49 on 17 Oct 2003, 07:45:33
how do i set the plane autopilot to land the plane when AI driving it?
Title: Re:landing?
Post by: macguba on 17 Oct 2003, 11:04:12
First you need a working airfield.    Put a waypoint on in:  getout is popular.    It can help if you put a land command in the waypoint, but it shouldn't be necessary.     Make sure the aircraft has plenty of space to complete his approach - he'll land from the south if I remember rightly.
Title: Re:landing?
Post by: Torak on 17 Oct 2003, 12:23:11
Is there any way to make a plane land, taxi to a hangar, and then disgorge its cargo? I tried that effect, but found I had to have it start on the ground and just taxi in.
Title: Re:landing?
Post by: KyleSarnik on 17 Oct 2003, 13:10:17
Torak, it would take a hell of a lot of scripting to pull that off. You see, when AI planes are on the ground, you have absolutly NO control over them. All they do is try to move to the closest taxi WP, and then take off. Setvelocity might work but the AI will still try to get there no matter what. Something to make a suggestion about for OFP 2.
Title: Re:landing?
Post by: pertti49 on 17 Oct 2003, 13:17:44
I need to get the plane landing to normal ground not airfield? is there somekind of autopilot command to initfield?
Title: Re:landing?
Post by: pertti49 on 17 Oct 2003, 15:54:37
buy the way using plane as clider so no fuel so well hows the autopilot working on ground without airfield?
Title: Re:landing?
Post by: macguba on 17 Oct 2003, 16:19:03
I doubt the AI will be able to land a plane on ground that is not an airfield.    You'll probably have to fake it with a sequence of setVelocity and flyinheight commands.   You'll have to use the animation to make the wheels come down too.

Edit: if you start the aircraft on the ground (i.e. not flying) you may be able to make it move around on the ground with waypoints.
Title: Re:landing?
Post by: Torak on 17 Oct 2003, 17:23:24
Yes, taxiing is easy if it starts on the ground - I've got one cutscene, for instance, where a flight of F-18s taxi onto the runway and take off as the player's Hummer drives past. It's just the reverse that's complicated... ;)
Title: Re:landing?
Post by: KyleSarnik on 17 Oct 2003, 20:56:47
Nope WPs don't work with planes at all when they are on the ground, all they would do is go all the way to the airport (while on the ground), take off (if they make it w/ out crashing and blowing up), and THEN fly to the WP...
Title: Re:landing?
Post by: pertti49 on 18 Oct 2003, 12:05:16
Well i do get the AI almost survive as AI steering it down plane bump up only 2 times and 2 guys is killed so maybe some fixing to get all guys alive what to do more speed less hight.....?