Pilot Input¶
These are suffixes of ship:control
.
They are similar to the suffixes on the Raw control page, except that these suffixes refer to the player’s actual input controls, rather than kOS’s own controls that are layered on top of them, overriding them.
Please note that the Breaking Ground DLC parts that can be configured
to respond to the throttle, such as electric motors and propellor pitches
will only respond to the settings described here on this page, and NOT
the settings described in the raw control page, or the
settings in lock throttle
or lock steering
. SQUAD designed
these to only pay attention to the player’s controls, not autopilot
controls.
Most are read-only¶
Most of these controls are get-only because trying to change them has no effect anyway (If kOS did let you set them, KSP would just reset them back to match the player’s actual input axis device immediately anyway.) The controls can be read to find out what the player is trying to do, if you’d like to write a script that tries to respond to that information.
But some are set-able¶
There are exceptions - some controls here can be set. The only
controls that might be settable in here are the ones that are for
settings that “stay put” and don’t reset to center when the pilot lets
go of the stick. For example, while PILOTPITCH
matches whatever
temporary position the pilot’s stick is in, PILOTPITCHTRIM
stays
where it was last set. Thus PILOTPITCHTRIM
is settable here,
while PILOTPITCH
is not. The docmentation below marks which
suffixes are indeed set-able. Through the use of these trim-able
settings, it is possible to control the ship in a way that still
lets the pilot temporarily grab the controls for a second to override
what kOS is doing.
- structure Control¶
Suffix |
Get/Set |
Type, Range |
Equivalent Key |
---|---|---|---|
Get and Set |
scalar [0,1] |
|
|
Get-only |
scalar [-1,1] |
|
|
Get-only |
scalar [-1,1] |
|
|
Get-only |
scalar [-1,1] |
|
|
Get-only |
|
||
Get and Set |
scalar [-1,1] |
|
|
Get and Set |
scalar [-1,1] |
|
|
Get and Set |
scalar [-1,1] |
|
|
Get-only |
scalar [-1,1] |
|
|
Get-only |
scalar [-1,1] |
|
|
Get-only |
scalar [-1,1] |
|
|
Get-only |
|
||
Get-only |
scalar [-1,1] |
|
|
Get and Set |
scalar [-1,1] |
|
|
Get and Set |
scalar [-1,1] |
|
|
Get and Set |
scalar [-1,1] |
|
|
Get-only |
Are the pilot’s controls zeroed, including trim? |
- SHIP:CONTROL:PILOTMAINTHROTTLE
Get and Set
Returns the pilot’s input for the throttle. If this is set, and a
lock throttle
is in effect, thelock throttle
will override this, BUT it still affects where the throttle returns to when kOS lets go of the controls.RP-1 Special Case: If using the RP-1 mod, and flying a “sounding rocket” where the avionics controls are insuficcient to steer but are good enough to ignite engines, then
lock throttle
does not work to activate those engines, but this suffix can do it. RP-1 actively suppresses the normal ability for an autopilot to control the throttle in this case and only pays attention to the pilot’s own manual control.
- SHIP:CONTROL:PILOTYAW
Get-only.
Returns the pilot’s rotation input about the “up” vector as the pilot faces forward. Essentially left \((-1)\) or right \((+1)\).
- SHIP:CONTROL:PILOTPITCH
Get-only.
Returns the pilot’s rotation input about the starboard vector up \((+1)\) or down \((-1)\).
- SHIP:CONTROL:PILOTROLL
Get-only.
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
Get-only.
Returns the pilot’s rotation input as a
Vector
object containing(YAW, PITCH, ROLL)
in that order.
- SHIP:CONTROL:PILOTYAWTRIM
Get and Set
The pilot’s input for the
YAW
of the rotational trim. Note that this CAN be set, unlikePILOTYAW
, making it possible to use it for an autopilot control program. The player can also adjust it too, though, overriding what you set it to.
- SHIP:CONTROL:PILOTPITCHTRIM
Get and Set
The pilot’s input for the
PITCH
of the rotational trim. Note that this CAN be set, unlikePILOTPITCH
, making it possible to use it for an autopilot control program. The player can also adjust it too, though, overriding what you set it to.
- SHIP:CONTROL:PILOTROLLTRIM
Get and Set
The pilot’s input for the
ROLL
of the rotational trim. Note that this CAN be set, unlikePILOTROLL
, making it possible to use it for an autopilot control program. The player can also adjust it too, though, overriding what you set it to.
- SHIP:CONTROL:PILOTFORE
Get-only.
Returns the the pilot’s input for the translation of the ship forward \((+1)\) or backward \((-1)\).
- SHIP:CONTROL:PILOTSTARBOARD
Get-only.
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
Get-only.
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
Get-only.
Returns the the pilot’s input for translation as a
Vector
(STARBOARD, TOP, FORE)
.
- SHIP:CONTROL:PILOTWHEELSTEER
Get-only.
Returns the the pilot’s input for wheel steering left \((-1)\) or right \((+1)\).
- SHIP:CONTROL:PILOTWHEELTHROTTLE
Get and Set
The the pilot’s input for the wheels to move the ship forward \((+1)\) or backward \((-1)\) while on the ground.
Because this is not an axis that resets, it can be set by a script although it may get suppressed when a
lock throttle
is in effect.
- SHIP:CONTROL:PILOTWHEELSTEERTRIM
Get and Set
Returns the the pilot’s input for the trim of the wheel steering.
Because this is a trim, it can be set by a kOS script.
- SHIP:CONTROL:PILOTWHEELTHROTTLETRIM
Get and Set
Returns the the pilot’s input for the trim of the wheel throttle.
Because this is a trim, it can be set by a kOS script.
- SHIP:CONTROL:PILOTNEUTRAL
Get-only.
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.