Jump to content
Sign in to follow this  
Mr Opteron

Script Pilot into Plane at mission start?

Recommended Posts

Im trying to script a pilot to get into a plane so that when the mission starts hes already in and the plane is flying. I had a script of the Init similar to the one below but I cant get it to work anymore he just runs past the plane when the plane is on the ground. Can anyone provide a sample for the Init box?

Heres one iv been trying to use I cant remember what I used to use:(

PilotOne action ["MOVEINPILOT", PlaneOne]

Share this post


Link to post
Share on other sites

Try moveInDriver.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">PilotOne moveInDriver PlaneOne

Share this post


Link to post
Share on other sites

It dont work he just runs away none of the move ins work only get in. Could it be a 1.14 bug?

Share this post


Link to post
Share on other sites

No ther is no bug like that in 1.14 afik.. you must just be doing something wrong..

it works fine.. just to do a test..

in editor place a man.. on the init put: this moveindriver plane

add a empty plane/heli and name it plane.. you see the man will move in as driver..

maybe you forgot to name the vehicle or the pilot..

Share this post


Link to post
Share on other sites

He gets in but the mission doesnt start with him in the plane thats the whole point of my question the mission has to start with him in the plane thx for trying though.

Share this post


Link to post
Share on other sites

I do it like this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">patrolpilot2 moveInDriver patrol2; patrolpilot2 flyInHeight 200  where patrolpilot2 is the name of the man and patrol2 is the name of the plane.    I put this in the init of the pilot.  I also used:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">patrol2 setPos [ getPos this select 0, getPos this select 1, (getPos this select 2) +50]; patrol2 engineOn true; patrol2 setVelocity [80, 0, 0]  in the init of the plane, that way it is flying right away.  The setvelocity of 80 works well for a camel, if you are using a different plane, you will need to adjust that value higher.

 This works for an AI pilot, for a player pilot you will need to do something else.

Share this post


Link to post
Share on other sites
I do it like this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">patrolpilot2 moveInDriver patrol2; patrolpilot2 flyInHeight 200

 where patrolpilot2 is the name of the man and patrol2 is the name of the plane.    I put this in the init of the pilot.  I also used:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">patrol2 setPos [ getPos this select 0, getPos this select 1, (getPos this select 2) +50]; patrol2 engineOn true; patrol2 setVelocity [80, 0, 0]  in the init of the plane, that way it is flying right away.  The setvelocity of 80 works well for a camel, if you are using a different plane, you will need to adjust that value higher.

 This works for an AI pilot, for a player pilot you will need to do something else.

You can actually just set the plane's status to flying and it should work. But yeah putting in his init field <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">This moveindriver plane

or <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">This moveindriver "plane"

(I forget which one) should work.

Share this post


Link to post
Share on other sites

normally that would work, but guer doesn't use camels, so I had to do it the way I did so I could have a guer pilot in a camel

Share this post


Link to post
Share on other sites

{_x moveindriver plane1} foreach units pilot1

Used this from the para drop template from Armaholic and it works. reason I wanted it is so i could have a RAC pilot, pilot an AV8 and start over the sea as no airfield available. The extra height and speed should come in handy Il start using that.

Thanks for helping guys.

Share this post


Link to post
Share on other sites
normally that would work, but guer doesn't use camels, so I had to do it the way I did so I could have a guer pilot in a camel

Forgot to mention in my above post... set an empty plane to flying and name it "plane" and then use the code on the pilot (which I wrote above) that works.

Sorry forgot to mention that the plane was empty.

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
Sign in to follow this  

×