Parts#
- class Part#
A part of a vehicle. Obtained from
Vehicle.Parts.Note
A part keeps its object when the vehicle it belongs to changes, for example when a decoupler separates it. Throws an exception once the part no longer exists.
- Part Parent { get; }#
The part this part is attached to, or
nullfor the root part.- Game Scenes:
All
- int Sequence { get; }#
The number of the sequence that activates the part, or -1 if no sequence does.
- Game Scenes:
All
- IList<Resource> Resources { get; }#
The resources the part holds, one for each substance.
- Game Scenes:
All
- IList<SolarPanel> SolarPanels { get; }#
The part’s solar panels.
- Game Scenes:
All
- IList<PowerConsumer> PowerConsumers { get; }#
The part’s power consumers.
- Game Scenes:
All
- IList<Deployable> Deployables { get; }#
The part’s deployable sections. A part can have several, such as the doors of a service module.
- Game Scenes:
All
- IList<MagneticScoop> MagneticScoops { get; }#
The part’s magnetic scoops. Empty if it has none.
- Game Scenes:
All
- Tuple<double, double, double> Position (ReferenceFrame referenceFrame)#
The position of the part’s origin, in meters.
- Parameters:
referenceFrame – The reference frame of the position.
- Game Scenes:
All
- Tuple<double, double, double> Velocity (ReferenceFrame referenceFrame)#
The velocity of the part’s origin, in meters per second.
- Parameters:
referenceFrame – The reference frame of the velocity.
- Game Scenes:
All
- Tuple<double, double, double, double> Rotation (ReferenceFrame referenceFrame)#
The rotation of the part’s axes, relative to the given frame.
- Parameters:
referenceFrame – The reference frame of the rotation.
- Game Scenes:
All
- IList<Gimbal> Gimbals { get; }#
The part’s gimbals. An engine part can have several, each steering one nozzle.
- Game Scenes:
All
- DockingPort DockingPort { get; }#
The part’s docking port, or
nullif it has none.- Game Scenes:
All
- class Engine#
An engine. Obtained from
Part.Engine.Note
An active engine fires when the vehicle’s engines are on, at the vehicle’s throttle. See
Control.EngineOnandControl.Throttle.- IList<Gimbal> Gimbals { get; }#
The gimbals that steer the engine’s nozzles. Empty if the engine has none.
- Game Scenes:
All
- bool Active { get; set; }#
Whether the engine is active, as when its sequence is activated. Setting it returns once the change has applied.
- Game Scenes:
All
- float MinimumThrottle { get; }#
The lowest throttle the engine runs at, between 0 and 1.
- Game Scenes:
All
- IList<string> Propellants { get; }#
The names of the substances the engine burns. See
Resource.Name.- Game Scenes:
All
- float Thrust { get; }#
The thrust of the engine at its current throttle and the current atmospheric pressure, in Newtons. Zero when it is not firing.
- Game Scenes:
All
- class Gimbal#
A gimbal that steers an engine nozzle. Obtained from
Part.GimbalsorEngine.Gimbals.Note
A gimbal turns about the y and z axes of its mount, which
Gimbal.Rotationgives. The flight computer steers it while an engine it belongs to isGimbal.Active.- float MaxAngleY { get; }#
The largest angle of the gimbal about its y axis, in degrees. Zero if it does not turn about that axis.
- Game Scenes:
All
- class RCS#
The RCS thrusters of a part. Obtained from
Part.RCS.Note
Active thrusters fire when the vehicle’s RCS is on. See
Control.RCS.
- class Decoupler#
A decoupler. Obtained from
Part.Decoupler.- bool Decoupled { get; }#
Whether the decoupler has fired, or is attached to nothing.
- Game Scenes:
All
- IList<Vehicle> Decouple ()#
Fire the decoupler, separating the vehicle into two. Returns once it has fired. Throws an exception if the decoupler is disabled or
Decoupler.Decoupled.- Returns:
The vehicles that separated from this one.
- Game Scenes:
All
- class Parachute#
A parachute. Obtained from
Part.Parachute.- ParachuteState State { get; }#
The state of the parachute.
- Game Scenes:
All
- float DeployAltitude { get; }#
The height above the terrain at which an armed parachute deploys, in meters.
- Game Scenes:
All
- bool CanCut { get; }#
Whether the parachute can be cut away. Main parachutes cannot.
- Game Scenes:
All
- void Deploy ()#
Arm the parachute, so that it deploys at
Parachute.DeployAltitude. Returns once it is armed. Throws an exception if it is not stowed.- Game Scenes:
All
- void Cut ()#
Cut the parachute away. Returns once it is cut. Throws an exception if it cannot be cut. See
Parachute.CanCut.- Game Scenes:
All
- enum ParachuteState#
The state of a parachute. See
Parachute.State.- Stowed#
Packed away.
- Armed#
Waiting to deploy at
Parachute.DeployAltitude.
- LineStretch#
Leaving the pack.
- Reefed#
Partly open, to limit the opening load.
- Disreefing#
Opening from reefed to full.
- Full#
Fully open.
- Cut#
Cut away.
- Ripped#
Torn by too much dynamic pressure.
- SeveredLines#
Lost after its lines broke under too much load.
- class DockingPort#
A docking port. Obtained from
Part.DockingPort.
- class Deployable#
A part that deploys and retracts, such as a landing leg, a solar panel or a service module door. Obtained from
Part.Deployables.Note
Deploying or retracting a part moves its symmetric copies with it, as the part’s menu in the game does.
- DeployableState State { get; }#
The state of the part.
- Game Scenes:
All
- void Deploy ()#
Deploy the part. Returns once it has started to move.
- Game Scenes:
All
Note
Throws an exception if the part is broken.
- void Retract ()#
Retract the part. Returns once it has started to move.
- Game Scenes:
All
Note
Throws an exception if the part is broken.
- enum DeployableState#
The state of a deployable part. See
Deployable.State.- Deployed#
Fully deployed.
- Retracted#
Fully retracted.
- Deploying#
Moving toward deployed.
- Retracting#
Moving toward retracted.
- Broken#
Broken, so it can no longer move.
- class MagneticScoop#
A magnetic scoop, which collects gas from space into the vehicle’s tanks. Obtained from
Part.MagneticScoops.- string Substance { get; }#
The name of the substance the scoop collects. See
Resource.Name.- Game Scenes:
All