Pilot Input¶
This is not, strictly speaking, a method of controlling the craft. “Pilot” controls are a way to read the input from the pilot. Most of these controls share the same name as their flight control, prefixed with PILOT (eg YAW and PILOTYAW) the one exception to this is the PILOTMAINTHROTTLE. This suffix has a setter and allows you to change the behavior of the throttle that persists even after the current program ends:
SET SHIP:CONTROL:PILOTMAINTHROTTLE TO 0.
Will ensure that the throttle will be 0 when execution stops. These suffixes allow you to read the input given to the system by the user.
-
structure
Control¶
| Suffix | Type, Range | Equivalent Key |
|---|---|---|
| PILOTMAINTHROTTLE | scalar [0,1] | LEFT-CTRL, LEFT-SHIFT |
| PILOTYAW | scalar [-1,1] | D, A |
| PILOTPITCH | scalar [-1,1] | W, S |
| PILOTROLL | scalar [-1,1] | Q, E |
| PILOTROTATION | Vector |
(YAW,PITCH,ROLL) |
| PILOTYAWTRIM | scalar [-1,1] | ALT+D, ALT+A |
| PILOTPITCHTRIM | scalar [-1,1] | ALT+W, ALT+S |
| PILOTROLLTRIM | scalar [-1,1] | ALT+Q, ALT+E |
| PILOTFORE | scalar [-1,1] | N, H |
| PILOTSTARBOARD | scalar [-1,1] | L, J |
| PILOTTOP | scalar [-1,1] | I, K |
| PILOTTRANSLATION | Vector |
(STARBOARD,TOP,FORE) |
| PILOTWHEELSTEER | scalar [-1,1] | A, D |
| PILOTWHEELTHROTTLE | scalar [-1,1] | W, S |
| PILOTWHEELSTEERTRIM | scalar [-1,1] | ALT+A, ALT+D |
| PILOTWHEELTHROTTLETRIM | scalar [-1,1] | ALT+W, ALT+S |
| PILOTNEUTRAL | Boolean | Is kOS Controlling? |
-
SHIP:CONTROL:PILOTMAINTHROTTLE Returns the pilot’s input for the throttle. This is the only
PILOTvariable that is settable and is used to set the throttle upon termination of the current kOS program.
-
SHIP:CONTROL:PILOTYAW Returns the pilot’s rotation input about the “up” vector as the pilot faces forward. Essentially left \((-1)\) or right \((+1)\).
-
SHIP:CONTROL:PILOTPITCH Returns the pilot’s rotation input about the starboard vector up \((+1)\) or down \((-1)\).
-
SHIP:CONTROL:PILOTROLL Returns the pilot’s rotation input about the logintudinal axis of the ship left-wing-down \((-1)\) or left-wing-up \((+1)\).
-
SHIP:CONTROL:PILOTROTATION Returns the pilot’s rotation input as a
Vectorobject containing(YAW, PITCH, ROLL)in that order.
-
SHIP:CONTROL:PILOTYAWTRIM Returns the pilot’s input for the
YAWof the rotational trim.
-
SHIP:CONTROL:PILOTPITCHTRIM Returns the pilot’s input for the
PITCHof the rotational trim.
-
SHIP:CONTROL:PILOTROLLTRIM Returns the pilot’s input for the
ROLLof the rotational trim.
-
SHIP:CONTROL:PILOTFORE Returns the the pilot’s input for the translation of the ship forward \((+1)\) or backward \((-1)\).
-
SHIP:CONTROL:PILOTSTARBOARD Returns the the pilot’s input for the translation of the ship to the right \((+1)\) or left \((-1)\) from the pilot’s perspective.
-
SHIP:CONTROL:PILOTTOP Returns the the pilot’s input for the translation of the ship up \((+1)\) or down \((-1)\) from the pilot’s perspective.
-
SHIP:CONTROL:PILOTTRANSLATION Returns the the pilot’s input for translation as a
Vector(STARBOARD, TOP, FORE).
-
SHIP:CONTROL:PILOTWHEELSTEER Returns the the pilot’s input for wheel steering left \((-1)\) or right \((+1)\).
-
SHIP:CONTROL:PILOTWHEELTHROTTLE Returns the the pilot’s input for the wheels to move the ship forward \((+1)\) or backward \((-1)\) while on the ground.
-
SHIP:CONTROL:PILOTWHEELSTEERTRIM Returns the the pilot’s input for the trim of the wheel steering.
-
SHIP:CONTROL:PILOTWHEELTHROTTLETRIM Returns the the pilot’s input for the trim of the wheel throttle.
-
SHIP:CONTROL:PILOTNEUTRAL Returns true or false if the pilot is active or not.
Be aware that kOS can’t control a control at the same time that a player controls it. If kOS is taking control of the yoke, then the player can’t manually control it. Remember to run:
SET SHIP:CONTROL:NEUTRALIZE TO TRUE.
after the script is done using the controls, or the player will be locked out of control.