OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: BronzeEagle on 02 Feb 2005, 21:57:38

Title: land the plane, now land another one
Post by: BronzeEagle on 02 Feb 2005, 21:57:38
I want to make a mission where you land a plane and once its detected that the plane isn't moving, another plane is spawned and you are teleported into that plane as its pilot and have to land it and then when you land that one the mission is over.  So I know how to detect when the plane isn't moving I think, but just tell me.  Next, tell me a good script for making a new plane in the sky and teleporting my player into it.  
Title: Re:land the plane, now land another one
Post by: macguba on 03 Feb 2005, 01:04:06
Use createVehicle to create the second plane and setPos to put it in the right place.  Then make a trigger:

Condition:  speed plane1 < 1
On Activation:   player moveInDriver plane2; player assignAsDriver plane2

Syntax not guaranteed.
Title: Re:land the plane, now land another one
Post by: XCess on 03 Feb 2005, 02:45:02
Would be a problem with the engines being turned off.
Title: Re:land the plane, now land another one
Post by: Terox on 03 Feb 2005, 19:46:20
use a move waypoint at the location where you want the plane to come to a stop to activate the createvehicle script
Have the waypoint setfuel 0 to the plane and setvelocity [0,0,0]

use the condition
vehicle player == Aircraft1
or
vehicle player != Player

to activate the script that

createvehicle the new plane
and moveindriver aircraft2
Title: Re:land the plane, now land another one
Post by: StonedSoldier on 04 Feb 2005, 13:19:19
the spawned plane wont have its engines on so try;

planename action ["engine on"]

and also try setvelocity to make sure its moving