Show / Hide Table of Contents

Interface IMyShipController

Describes ship controller block (cockpit/remote control/cryopod) (PB scripting interface)

Inherited Members
IMyTerminalBlock.HasLocalPlayerAccess()
IMyTerminalBlock.HasPlayerAccess(Int64, MyRelationsBetweenPlayerAndBlock)
IMyTerminalBlock.HasNobodyPlayerAccessToBlock()
IMyTerminalBlock.HasPlayerAccessWithNobodyCheck(Int64, Boolean)
IMyTerminalBlock.SetCustomName(String)
IMyTerminalBlock.SetCustomName(StringBuilder)
IMyTerminalBlock.GetActions(List<ITerminalAction>, Func<ITerminalAction, Boolean>)
IMyTerminalBlock.SearchActionsOfName(String, List<ITerminalAction>, Func<ITerminalAction, Boolean>)
IMyTerminalBlock.GetActionWithName(String)
IMyTerminalBlock.GetProperty(String)
IMyTerminalBlock.GetProperties(List<ITerminalProperty>, Func<ITerminalProperty, Boolean>)
IMyTerminalBlock.IsSameConstructAs(IMyTerminalBlock)
IMyTerminalBlock.CustomName
IMyTerminalBlock.CustomNameWithFaction
IMyTerminalBlock.DetailedInfo
IMyTerminalBlock.CustomInfo
IMyTerminalBlock.CustomData
IMyTerminalBlock.ShowOnHUD
IMyTerminalBlock.ShowInTerminal
IMyTerminalBlock.ShowInToolbarConfig
IMyTerminalBlock.ShowInInventory
IMyCubeBlock.GetOwnerFactionTag()
IMyCubeBlock.GetPlayerRelationToOwner()
IMyCubeBlock.GetUserRelationToOwner(Int64, MyRelationsBetweenPlayerAndBlock)
IMyCubeBlock.UpdateIsWorking()
IMyCubeBlock.UpdateVisual()
IMyCubeBlock.BlockDefinition
IMyCubeBlock.CubeGrid
IMyCubeBlock.DefinitionDisplayNameText
IMyCubeBlock.DisassembleRatio
IMyCubeBlock.DisplayNameText
IMyCubeBlock.IsBeingHacked
IMyCubeBlock.IsFunctional
IMyCubeBlock.IsWorking
IMyCubeBlock.Max
IMyCubeBlock.Mass
IMyCubeBlock.Min
IMyCubeBlock.NumberInGrid
IMyCubeBlock.Orientation
IMyCubeBlock.OwnerId
IMyCubeBlock.Position
IMyEntity.GetInventory()
IMyEntity.GetInventory(Int32)
IMyEntity.GetPosition()
IMyEntity.Components
IMyEntity.EntityId
IMyEntity.Name
IMyEntity.DisplayName
IMyEntity.HasInventory
IMyEntity.InventoryCount
IMyEntity.Closed
IMyEntity.WorldAABB
IMyEntity.WorldAABBHr
IMyEntity.WorldMatrix
IMyEntity.WorldVolume
IMyEntity.WorldVolumeHr
Namespace: Sandbox.ModAPI.Ingame
Assembly: Sandbox.Common.dll
Syntax
public interface IMyShipController : IMyTerminalBlock, IMyCubeBlock, IMyEntity

Properties

CanControlShip

Determines whether this specific ship controller is capable of controlling the ship it's installed on.

Declaration
bool CanControlShip { get; }
Property Value
Type Description
System.Boolean

CenterOfMass

Center of mass in world coordinates

Declaration
Vector3D CenterOfMass { get; }
Property Value
Type Description
Vector3D

ControlThrusters

Gets or sets whether thrusters are being controlled by this controller.

Declaration
bool ControlThrusters { get; set; }
Property Value
Type Description
System.Boolean

ControlWheels

Gets or sets whether wheels are being controlled by this controller.

Declaration
bool ControlWheels { get; set; }
Property Value
Type Description
System.Boolean

DampenersOverride

Gets or sets whether dampeners are currently enabled.

Declaration
bool DampenersOverride { get; set; }
Property Value
Type Description
System.Boolean

HandBrake

Gets or sets the current state of the handbrake.

Declaration
bool HandBrake { get; set; }
Property Value
Type Description
System.Boolean

HasWheels

Determines whether there are any wheels on this ship.

Declaration
bool HasWheels { get; }
Property Value
Type Description
System.Boolean

IsMainCockpit

Gets or sets if this controller is the main one for current ship Setter checks if there is any other main cockpit on the ship before proceeding

Declaration
bool IsMainCockpit { get; set; }
Property Value
Type Description
System.Boolean

IsUnderControl

Indicates whether a block is locally or remotely controlled.

Declaration
bool IsUnderControl { get; }
Property Value
Type Description
System.Boolean

MoveIndicator

Directional input from user/autopilot. Values can be very large with high controller sensitivity

Declaration
Vector3 MoveIndicator { get; }
Property Value
Type Description
Vector3

RollIndicator

Roll input from user/autopilot. Values can be very large with high controller sensitivity

Declaration
float RollIndicator { get; }
Property Value
Type Description
System.Single

RotationIndicator

Pitch, yaw input from user/autopilot. Values can be very large with high controller sensitivity

Declaration
Vector2 RotationIndicator { get; }
Property Value
Type Description
Vector2

ShowHorizonIndicator

Gets or sets whether the horizon indicator should be displayed for this block.

Declaration
bool ShowHorizonIndicator { get; set; }
Property Value
Type Description
System.Boolean

Methods

CalculateShipMass()

Gets information about the current mass of the ship.

Declaration
MyShipMass CalculateShipMass()
Returns
Type Description
MyShipMass

Ship mass information

GetArtificialGravity()

Gets the detected artificial gravity vector and power at the current location.

Declaration
Vector3D GetArtificialGravity()
Returns
Type Description
Vector3D

Artificial gravity vector

GetNaturalGravity()

Gets the detected natural gravity vector and power at the current location.

Declaration
Vector3D GetNaturalGravity()
Returns
Type Description
Vector3D

Natural gravity vector

GetShipSpeed()

Gets the basic ship speed in meters per second, for when you just need to know how fast you're going.

Declaration
double GetShipSpeed()
Returns
Type Description
System.Double

Ship speed in meters per second

GetShipVelocities()

Determines the linear velocities in meters per second and angular velocities in radians per second. Provides a more accurate representation of the directions and axis speeds.

Declaration
MyShipVelocities GetShipVelocities()
Returns
Type Description
MyShipVelocities

GetTotalGravity()

Gets the total accumulated gravity vector and power at the current location, taking both natural and artificial gravity into account.

Declaration
Vector3D GetTotalGravity()
Returns
Type Description
Vector3D

Total gravity vector

TryGetPlanetElevation(MyPlanetElevation, out Double)

Attempts to get the elevation of the ship in relation to the nearest planet. This method is only available when a ship is within the gravity well of a planet.

Declaration
bool TryGetPlanetElevation(MyPlanetElevation detail, out double elevation)
Parameters
Type Name Description
MyPlanetElevation detail

Mode

System.Double elevation
Returns
Type Description
System.Boolean

True if cockpit is in planet gravity

TryGetPlanetPosition(out Vector3D)

Attempts to get the world position of the nearest planet. This method is only available when a ship is within the gravity well of a planet.

Declaration
bool TryGetPlanetPosition(out Vector3D position)
Parameters
Type Name Description
Vector3D position

Position of closet planet or Zero

Returns
Type Description
System.Boolean

True if cockpit is in gravity of planet

Extension Methods

TerminalBlockExtentions.GetId(IMyTerminalBlock)
TerminalBlockExtentions.ApplyAction(IMyTerminalBlock, String)
TerminalBlockExtentions.ApplyAction(IMyTerminalBlock, String, List<TerminalActionParameter>)
TerminalBlockExtentions.HasAction(IMyTerminalBlock, String)
TerminalBlockExtentions.HasInventory(IMyTerminalBlock)
TerminalBlockExtentions.GetInventory(IMyTerminalBlock, Int32)
TerminalBlockExtentions.GetInventoryCount(IMyTerminalBlock)
TerminalBlockExtentions.GetUseConveyorSystem(IMyTerminalBlock)
TerminalBlockExtentions.SetUseConveyorSystem(IMyTerminalBlock, Boolean)
TerminalPropertyExtensions.GetValueFloat(IMyTerminalBlock, String)
TerminalPropertyExtensions.SetValueFloat(IMyTerminalBlock, String, Single)
TerminalPropertyExtensions.GetValueBool(IMyTerminalBlock, String)
TerminalPropertyExtensions.SetValueBool(IMyTerminalBlock, String, Boolean)
TerminalPropertyExtensions.GetValueColor(IMyTerminalBlock, String)
TerminalPropertyExtensions.SetValueColor(IMyTerminalBlock, String, Color)
TerminalPropertyExtensions.GetValue<T>(IMyTerminalBlock, String)
TerminalPropertyExtensions.GetDefaultValue<T>(IMyTerminalBlock, String)
TerminalPropertyExtensions.GetMininum<T>(IMyTerminalBlock, String)
TerminalPropertyExtensions.GetMinimum<T>(IMyTerminalBlock, String)
TerminalPropertyExtensions.GetMaximum<T>(IMyTerminalBlock, String)
TerminalPropertyExtensions.SetValue<T>(IMyTerminalBlock, String, T)
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾