OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Crassus on 12 Aug 2005, 15:01:47

Title: Copilot
Post by: Crassus on 12 Aug 2005, 15:01:47
(Search in the Scripts Sections for the past 120 days resulted in no hits.)

I'm sure someone's at least thought of the need for this.

For whatever reason, you as player/pilot leave the cockpit (okay, only a small hand full of aircraft I know of allow you to "get out" and still remain aboard the aircraft: the DC-3 with working toilet  ;D , a C130...), you'll want to the aircraft to continue on course.

I see two options for the pilot:
1) Just "get out" and the AI copilot continues on the heading the a/c was on when the pilot left the seat

2) Some sort of autopilot system, with which you would set course, altitude, whatever, before you leave the seat. Some sort of dialog(s).

I know we get into that area of modelling where there can be only one pilot, gunner, etc. But how about:

1) Put the AI copilot in his assigned seat, the player sees it's there.
2) The player engages our copilot/autopilot system, and a "dummy" model is moved into where the AI was; the real AI is moved into the pilot's seat, but invisible to the player
3) Or just move the AI into the pilot's seat.
Title: Re:Copilot
Post by: Planck on 12 Aug 2005, 20:02:44
Have you tried just moving the copilot into the pilots seat.

In other words switching seats with the copilot.

Try something like:

player action ["movetogunner",vehiclename]

What should happen is you get his seat and he gets yours.......hopefully!!


Planck
Title: Re:Copilot
Post by: Crassus on 13 Aug 2005, 17:37:01
LOL. Boy this idea went over like a led ballon..... ::)
Title: Re:Copilot
Post by: Planck on 13 Aug 2005, 19:44:27
Well, you did say you wanted AI to move into the pilots seat.

Last time I tried that it worked ok.....I might have another bash at it just to check.

It works also for moving someone in cargo position into the pilots seat and the pilot takes the cargo position instead.

I don't know where the new pilot will decide to go though.  ;D


Planck
Title: Re:Copilot
Post by: Planck on 19 Aug 2005, 22:11:29
Ok, I played about with this recently.

Starting from the airfield on Malden.
Using an empty vehicle (uh60) and 2 AI soldiers (1 black op, 1 normal grunt) grouped together with the black op as leader.
I was also aboard as observer but not in the same group.

Got the grunt assigned and into the chopper as gunner and the black op assigned and into the chopper as pilot.

The black op has the following waypoints.
First waypoint was about 500 m from takeoff North.
Second waypoint was about 2000m SE of the first waypoint.
Third waypoint takes them towards La Trinite.
Last waypoint back to the airfield and getout.

About 1000m before the chopper reaches the second waypoint it encounters a trigger which swaps the two loons about......the gunner becomes pilot and the pilot becomes gunner.

It works fine, but, the new pilot knows nothing about the waypoints already set and just goes his merry way wherever he decides to go, which invariably is in very wide sweeping circles, climbing as he goes.

So, I set a second trigger roughly in the general direction he normally goes in.
This trigger swaps them back again.
Instantly the original pilot makes his way back to complete any waypoints that were still not completed.

Similar results were achieved with a normal crewed chopper.



Planck