Show / Hide Table of Contents

Interface IMyControllableEntity

Describes that player can take under control (mods interface)

Namespace: VRage.Game.ModAPI.Interfaces
Assembly: VRage.Game.dll
Syntax
public interface IMyControllableEntity

Properties

CanSwitchLandingGears

Gets if entity can switch landing gears

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

ControllerInfo

Gets information about who controls this Entity

Declaration
IMyControllerInfo ControllerInfo { get; }
Property Value
Type Description
IMyControllerInfo

EnabledDamping

Gets if Damping enabled

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

Works only for character and ship controller

EnabledHelmet

Gets if helmet is opened

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

Works only for character

EnabledLeadingGears

Gets if at least one leading gear is enabled

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

Works only for ship controller

EnabledLights

Gets if lights are enabled

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

Works only for character and ship controller

EnabledReactors

Gets if grid is powered

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

Works only for ship controller

EnabledThrusts

Gets if thrusts are enabled

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

Works only for character

Entity

Gets information which entity is being controlled

Declaration
IMyEntity Entity { get; }
Property Value
Type Description
IMyEntity

ForceFirstPersonCamera

Gets or sets if camera should be first person

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

IsAutopilotControlled

Gets whether the entity is controller by autopilot

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

LastMotionIndicator

Gets last motion indicator. User input W/A/S/D Space/C

Declaration
Vector3 LastMotionIndicator { get; }
Property Value
Type Description
Vector3
Remarks

Works only for cockpits and remote control blocks

LastRotationIndicator

Gets last rotation indicator. Z used for RollIndicator

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

PrimaryLookaround

When false, blocks 3rd view look around

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

RelativeDampeningDistance

Allows you to set a custom max distance which relative dampening to another entity will remain active.

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

RelativeDampeningTarget

Allows you to get or set the relative dampening entity.

Declaration
IMyEntity RelativeDampeningTarget { get; set; }
Property Value
Type Description
IMyEntity

Methods

Crouch()

Only IMyCharacter has implementation for this method.

Declaration
void Crouch()

Die()

Makes character dead.

Declaration
void Die()
Remarks

Works only for character

Down()

Move direction : down. Only IMyCharacter has implementation for this method.

Declaration
void Down()

DrawHud(IMyCameraController, Int64)

Updates hud logic, connected to entity

Declaration
void DrawHud(IMyCameraController camera, long playerId)
Parameters
Type Name Description
IMyCameraController camera

Current camera

System.Int64 playerId

IdentityId

GetHeadMatrix(Boolean, Boolean, Boolean, Boolean)

Gets head of character that controls this

Declaration
MatrixD GetHeadMatrix(bool includeY, bool includeX = true, bool forceHeadAnim = false, bool forceHeadBone = false)
Parameters
Type Name Description
System.Boolean includeY

Should include Y axis rotation

System.Boolean includeX

Should include X axis rotation

System.Boolean forceHeadAnim

When true - use very accurate head position

System.Boolean forceHeadBone
Returns
Type Description
MatrixD

Jump(Vector3)

Character jump. Only IMyCharacter has implementation for this method.

Declaration
void Jump(Vector3 moveindicator = null)
Parameters
Type Name Description
Vector3 moveindicator

MoveAndRotate(Vector3, Vector2, Single)

Defines user input. Call MoveAndRotateStopped() on user input finished

Declaration
void MoveAndRotate(Vector3 moveIndicator, Vector2 rotationIndicator, float rollIndicator)
Parameters
Type Name Description
Vector3 moveIndicator

User input W/A/S/D Space/C

Vector2 rotationIndicator

User mouse input

System.Single rollIndicator

User input Q/E

MoveAndRotateStopped()

Should be called when input is finished

Declaration
void MoveAndRotateStopped()

PickUp()

Forwarding this action to Use(UseActionEnum, IMyEntity) with argument PickUp

Declaration
void PickUp()
Remarks

Works only for IMyCharacter

PickUpContinues()

Forwarding this action to Use(UseActionEnum, IMyEntity) with argument PickUp

Declaration
void PickUpContinues()
Remarks

Works only for IMyCharacter. Method is called after first call of PickUp(), and only if target supports ContinuousUsage

ShowInventory()

Shows inventory gui of controlled Entity

Declaration
void ShowInventory()
Remarks

Not all ControllableEntities implements this

ShowRemoteAccessMenu()

Shows remote access menu

Declaration
void ShowRemoteAccessMenu()
Remarks

Not all ControllableEntities implements this

ShowTerminal()

Shows terminal gui

Declaration
void ShowTerminal()
Remarks

Not all ControllableEntities implements this

SwitchDamping()

Switches damping state

Declaration
void SwitchDamping()
Remarks

Not all ControllableEntities implements this

SwitchHandbrake()

Switches handbrake state

Declaration
void SwitchHandbrake()
Remarks

Not all ControllableEntities implements this

SwitchHelmet()

Switches helmet open/closed state

Declaration
void SwitchHelmet()
Remarks

Not all ControllableEntities implements this

SwitchLandingGears()

Switches landing gears state

Declaration
void SwitchLandingGears()
Remarks

Not all ControllableEntities implements this

SwitchLights()

Switches lights state

Declaration
void SwitchLights()
Remarks

Not all ControllableEntities implements this

SwitchReactors()

Switches reactors state

Declaration
void SwitchReactors()
Remarks

Not all ControllableEntities implements this

SwitchReactorsLocal()

Switches handbrake state

Declaration
void SwitchReactorsLocal()
Remarks

Same as SwitchReactors()

SwitchThrusts()

Turns on jetpack on character

Declaration
void SwitchThrusts()
Remarks

Not all ControllableEntities implements this

SwitchWalk()

Switch between walk / run mode. Only IMyCharacter has implementation for this method.

Declaration
void SwitchWalk()

Up()

Move direction : up. Only IMyCharacter has implementation for this method.

Declaration
void Up()

Use()

Declaration
void Use()

UseContinues()

Declaration
void UseContinues()
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾