Assembly: VRage.Game.dll

public interface IMyCharacter: IMyEntity, IMyEntity, IMyControllableEntity, IMyCameraController, IMyDestroyableObject, IMyDecalProxy

Describes character (mods interface)

Events

Member Description
CharacterDied Event triggered when character dies
MovementStateChanged Called when the movement state changes
OnClose Called when Close() is called. Order 1) OnMarkForClose 2) OnClosing 3) OnClose .

Inherited from IMyEntity
OnClosing Called when Close() is called. Order 1) OnMarkForClose 2) OnClosing 3) OnClose .

Inherited from IMyEntity
OnMarkForClose Called when Close() is called. Order 1) OnMarkForClose 2) OnClosing 3) OnClose .

Inherited from IMyEntity
OnPhysicsChanged Called when havok rigid body physics are changed: inited, closed, modified.

Inherited from IMyEntity
OnMovementStateChanged Obsolete: OnMovementStateChanged is deprecated, use MovementStateChanged

Properties

Member Description
AimedPoint Gets or, for non-player controlled characters, sets the aimed point direction.
BaseMass Gets the base mass of the character
CanSprint Gets/Sets if character can sprint
CharacterGeneralDamageModifier Allows you to get or set the damage modifier of a character.
CurrentMass Gets the entire mass of the character, including inventory
CurrentMovementState Gets the character's current movement state.
Definition The character definition. Cast to MyCharacterDefinition.
EnvironmentOxygenLevel Gets the amount of oxygen in the surrounding environment
EquippedTool Gets currently equipped tool (IMyHandheldGunObject)
IsBot Returns true if this character is an AI character, otherwise false.
IsDead Returns true if this character is dead
IsPlayer Returns true if this character is a player character, otherwise false.
OxygenLevel Gets the amount of oxygen at the character location from air pressure system (grids with airtightness)
PreviousMovementState Gets the character's previous movement state.
SuitEnergyLevel Returns the amount of energy the suit has, values will range between 0 and 1, where 0 is no charge and 1 is full charge.
UsingEntity Gets currently used entity by character (cockpit, cryo etc.)
AllowCubeBuilding Gets if player block building enabled

Inherited from IMyCameraController
CanSwitchLandingGears Gets if entity can switch landing gears

Inherited from IMyControllableEntity
CastShadows Gets or sets flag CastShadows

Inherited from IMyEntity
Closed True if the block has been removed from the world.

Inherited from IMyEntity
Components Gets blocks component logic container

Inherited from IMyEntity
ControllerInfo Gets information about who controls this Entity

Inherited from IMyControllableEntity
DebugAsyncLoading Used for internal usage. Modders should not use it. Will be eventually removed

Inherited from IMyEntity
DisplayName Gets user friendly name of entity. May be null For block terminal name use DisplayNameText

Inherited from IMyEntity
DisplayName Gets or sets user friendly name of entity

Inherited from IMyEntity
EnabledDamping Gets if Damping enabled

Inherited from IMyControllableEntity
EnabledHelmet Gets if helmet is opened

Inherited from IMyControllableEntity
EnabledLeadingGears Gets if at least one leading gear is enabled

Inherited from IMyControllableEntity
EnabledLights Gets if lights are enabled

Inherited from IMyControllableEntity
EnabledReactors Gets if grid is powered

Inherited from IMyControllableEntity
EnabledThrusts Gets if thrusts are enabled

Inherited from IMyControllableEntity
EnableFirstPersonView Gets or set if player can use first person view

Inherited from IMyCameraController
Entity Gets Entity to which it is attached

Inherited from IMyCameraController
Entity Gets information which entity is being controlled

Inherited from IMyControllableEntity
EntityId Id of entity

Inherited from IMyEntity
EntityId Uniq id of entity.

Inherited from IMyEntity
FastCastShadowResolve Gets or sets flag CastShadows

Inherited from IMyEntity
Flags Gets or set some behavior of entity. EntityFlags

Inherited from IMyEntity
ForceFirstPersonCamera Gets or sets if player can use only first person view

Inherited from IMyCameraController
ForceFirstPersonCamera Gets or sets if camera should be first person

Inherited from IMyControllableEntity
GameLogic Gets or sets game logic for object. If there is more than 1 game logic attached it should be wrapped into.

Inherited from IMyEntity
HasInventory Returns true if this entity has got at least one inventory. Note that one aggregate inventory can contain zero simple inventories => zero will be returned even if GetInventory() != null.

Inherited from IMyEntity
Hierarchy Gets or sets Hierarchy component

Inherited from IMyEntity
InScene Gets or set if grid is InScene. Objects that are not in scene are not updated and drawn.

Inherited from IMyEntity
Integrity Gets the integrity (health) of the object

Inherited from IMyDestroyableObject
InvalidateOnMove Gets if entity is invalidated on move When visual look of entity depends on position - then InvalidateOnMove should be true

Inherited from IMyEntity
InventoryCount Returns the count of the number of inventories this entity has.

Inherited from IMyEntity
IsAutopilotControlled Gets whether the entity is controller by autopilot

Inherited from IMyControllableEntity
IsInFirstPersonView Gets or sets if the current camera view is first person.

Inherited from IMyCameraController
IsVolumetric Always returns false

Inherited from IMyEntity
LastMotionIndicator Gets last motion indicator. User input W/A/S/D Space/C

Inherited from IMyControllableEntity
LastRotationIndicator Gets last rotation indicator. Z used for RollIndicator

Inherited from IMyControllableEntity
LocalAABB Gets or sets local axis aligned bounding box. Same as LocalAABBHr , LocalAABB

Inherited from IMyEntity
LocalAABBHr Gets local axis aligned bounding box. Same as LocalAABB , LocalAABB

Inherited from IMyEntity
LocalMatrix Gets or sets local matrix. When entity, has parent, it's world coordinates are calculated from localMatrix and parent world matrix

Inherited from IMyEntity
LocalVolume Gets or sets local volume. Same as LocalVolume

Inherited from IMyEntity
LocalVolumeOffset Gets or sets local volume offset. Same as LocalVolumeOffset

Inherited from IMyEntity
MarkedForClose Checked if Close() was called

Inherited from IMyEntity
MaxGlassDistSq Not used in game anymore

Inherited from IMyEntity
Model Gets model of block

Inherited from IMyEntity
ModelCollision Gets collision model of block

Inherited from IMyEntity
Name Some entities can have uniq name, and game can find them by name TryGetEntityByName(string, out IMyEntity)

Inherited from IMyEntity
Name Uniq name of entity. Can be used to find entity by name

Inherited from IMyEntity
NearFlag Gets or sets flag Near

Inherited from IMyEntity
NeedsDraw Gets or sets flag NeedsDraw

Inherited from IMyEntity
NeedsDrawFromParent Gets or sets flag NeedsDrawFromParent

Inherited from IMyEntity
NeedsResolveCastShadow Gets or sets flag NeedsResolveCastShadow

Inherited from IMyEntity
NeedsUpdate Gets or sets how often the entity should be updated.

Inherited from IMyEntity
NeedsWorldMatrix Gets or sets if WorldMatrix should be calculated when parent WorldMatrix is changed.

Inherited from IMyEntity
Parent Gets parent of entity or null, if this entity doesn't have parent. Ex: character sitting in cockpit, has parent - cockpit, cockpit has parent - cube grid, connected grids also has main grid, which would be parent for other grids.

Inherited from IMyEntity
PersistentFlags Gets or sets persistent flags that are used in rendering.

Inherited from IMyEntity
Physics Gets or sets physics for object

Inherited from IMyEntity
PositionComp Gets or sets position provider logic

Inherited from IMyEntity
PrimaryLookaround When false, blocks 3rd view look around

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

Inherited from IMyControllableEntity
RelativeDampeningTarget Allows you to get or set the relative dampening entity.

Inherited from IMyControllableEntity
Render Gets or sets render logic

Inherited from IMyEntity
Save Gets or sets Save . Entity won't be saved if Save is false

Inherited from IMyEntity
ShadowBoxLod Gets or sets flag ShadowBoxLod

Inherited from IMyEntity
SkipIfTooSmall Gets or sets flag SkipIfTooSmall

Inherited from IMyEntity
StopPhysicsActivation Inherited from IMyEntity
Storage Custom storage for mods. Shared with all mods.

Inherited from IMyEntity
Synchronized Gets or sets if the entity should be synced.

Inherited from IMyEntity
SyncObject Gets SyncObject used for synchronizing data over network with

Inherited from IMyEntity
Transparent Gets or sets Transparency . When setting true entity would be 25% transparent

Inherited from IMyEntity
UseDamageSystem When set to true, it should use MyDamageSystem damage routing.

Inherited from IMyDestroyableObject
Visible Gets or sets flag Visible

Inherited from IMyEntity
WorldAABB Gets world axis-aligned bounding box

Inherited from IMyEntity
WorldAABBHr Gets world axis-aligned bounding box

Inherited from IMyEntity
WorldMatrix Gets world matrix of this entity

Inherited from IMyEntity
WorldMatrix Gets or sets world matrix.

Inherited from IMyEntity
WorldMatrixInvScaled Get scaled, inverted world matrix. Same as GetViewMatrix() , GetWorldMatrixNormalizedInv() , WorldMatrixNormalizedInv , but not normalized

Inherited from IMyEntity
WorldMatrixNormalizedInv Get normalized, inverted world matrix. Same as GetViewMatrix() , WorldMatrixNormalizedInv

Inherited from IMyEntity
WorldVolume Gets bounding sphere of this entity

Inherited from IMyEntity
WorldVolumeHr Gets bounding sphere of this entity

Inherited from IMyEntity
IsCCDForProjectiles Obsolete

Inherited from IMyEntity
LocationForHudMarker Obsolete

Inherited from IMyEntity

Methods

Member Description
GetOutsideTemperature() Returns outside temperature around character. If character is in presurrized/oxygen environment, then the temperature is always friendly.
GetSuitGasFillLevel(MyDefinitionId) Returns the amount of gas left in the suit, values will range between 0 and 1, where 0 is no gas and 1 is full gas.
Kill(object) Kills the character
SetCharacterSpeedDebuff(float) Sets character speed debuf
TriggerCharacterAnimationEvent(string, bool) Trigger animation event in the new animation system. If there is a transition leading from current animation state having same name as this event, animation state machine will change state accordingly. If not, nothing happens.
AddDecals(ref MyHitInfo, MyStringHash, Vector3, object, IMyDecalHandler, MyStringHash, MyStringHash, bool, MyDecalFlags, int, List) Called from Sandbox.Game.MyDecals

Inherited from IMyDecalProxy
BeforeSave() Called before method GetObjectBuilder, when saving sector

Inherited from IMyEntity
Close() This method marks this entity for close which means, that Close will be called after all entities are updated

Inherited from IMyEntity
ControlCamera(MyCamera) Change camera properties now. Communication: from controller to camera.

Inherited from IMyCameraController
Crouch() Only IMyCharacter has implementation for this method.

Inherited from IMyControllableEntity
DebugDraw() Calls debug draw of entity

Inherited from IMyEntity
DebugDrawInvalidTriangles() Calls special debug draw, that highlighting invalid triangles in model

Inherited from IMyEntity
Delete() Performs real cleaning of entity. Should be called by game. Modders should prefer Close() method.

Inherited from IMyEntity
Die() Makes character dead.

Inherited from IMyControllableEntity
DoDamage(float, MyStringHash, bool, MyHitInfo?, long, long, bool, MyStringHash?) Applies damage to an object

Inherited from IMyDestroyableObject
DoOverlapSphereTest(float, Vector3D) Checks if intersects Works only with IMyVoxelBase

Inherited from IMyEntity
Down() Move direction : down. Only IMyCharacter has implementation for this method.

Inherited from IMyControllableEntity
DrawHud(IMyCameraController, long) Updates hud logic, connected to entity

Inherited from IMyControllableEntity
EnableColorMaskForSubparts(bool) Allows subparts have different color than their parent

Inherited from IMyEntity
GetChildren(List, Func<IMyEntity, bool>) Gets children of entity. Child - entity, who's Parent is this entity

Inherited from IMyEntity
GetDiffuseColor() Gets render diffuse color

Inherited from IMyEntity
GetDistanceBetweenCameraAndBoundingSphere() Distance from camera to bounding sphere of this phys object. Result is always positive, even if camera is inside the sphere. (in meters)

Inherited from IMyEntity
GetDistanceBetweenCameraAndPosition() Distance from camera to position of entity.

Inherited from IMyEntity
GetFriendlyName() Not used. Actually not a friendly name

Inherited from IMyEntity
GetHeadMatrix(bool, bool, bool, bool) Gets head of character that controls this

Inherited from IMyControllableEntity
GetIntersectionWithAABB(ref BoundingBoxD) Return true if object intersects specified bounding box.

Inherited from IMyEntity
GetIntersectionWithLine(ref LineD, out MyIntersectionResultLineTriangleEx?, IntersectionFlags) Get intersection of model with provided line

Inherited from IMyEntity
GetIntersectionWithLineAndBoundingSphere(ref LineD, float) Calculates intersection of line with any bounding sphere in this model instance. Center of the bounding sphere will be returned. It takes boundingSphereRadiusMultiplier argument which serves for extending the influence (radius) for interaction with line.

Inherited from IMyEntity
GetIntersectionWithSphere(ref BoundingSphereD) Return true if object intersects specified sphere.

Inherited from IMyEntity
GetInventory() Simply get the MyInventoryBase component stored in this entity.

Inherited from IMyEntity
GetInventory(int) Search for inventory component with maching index.

Inherited from IMyEntity
GetInventory() Simply get the MyInventoryBase component stored in this entity.

Inherited from IMyEntity
GetInventory(int) Search for inventory component with matching index.

Inherited from IMyEntity
GetLargestDistanceBetweenCameraAndBoundingSphere() Largest distance from camera to bounding sphere of this phys object. Result is always positive, even if camera is inside the sphere. It's actually distance between camera and opposite side of the sphere

Inherited from IMyEntity
GetObjectBuilder(bool) Returns object builder - object representing block state, and allows restore it. Used in game save, or syncing over network.

Inherited from IMyEntity
GetOverridingFocusMatrix() Transformation that should be used for target selection while focusing

Inherited from IMyCameraController
GetPosition() Gets position in world coordinates

Inherited from IMyEntity
GetSmallestDistanceBetweenCameraAndBoundingSphere() Smallest distance between camera and bounding sphere of this phys object. Result is always positive, even if camera is inside the sphere.

Inherited from IMyEntity
GetSubpart(string) Gets subpart by subpart name

Inherited from IMyEntity
GetTopMostParent(Type) Gets top most Parent of specified type. Top most is entity that doesn't have parent (of specified type)

Inherited from IMyEntity
GetTrianglesIntersectingSphere(ref BoundingSphere, Vector3?, float?, List<MyTriangle_Vertex_Normals>, int) Return list of triangles intersecting specified sphere. Angle between every triangleVertexes normal vector and 'referenceNormalVector' is calculated, and if more than 'maxAngle', we ignore such triangleVertexes. Triangles are returned in 'retTriangles', and this list must be preallocated! IMPORTANT: Sphere must be in model space, so don't transform it!

Inherited from IMyEntity
GetViewMatrix() Get normalized, inverted world matrix. Same as GetWorldMatrixNormalizedInv() , WorldMatrixNormalizedInv

Inherited from IMyEntity
GetWorldMatrixNormalizedInv() Get normalized, inverted world matrix. Same as GetViewMatrix() , WorldMatrixNormalizedInv

Inherited from IMyEntity
HandlePickUp() Does nothing.

Inherited from IMyCameraController
HandleUse() Used to send "use" commands to camera controller

Inherited from IMyCameraController
IsVisible() Gets or result of function IsVisible() . Function inside check for IsVisible(IMyEntity)

Inherited from IMyEntity
Jump(Vector3) Character jump. Only IMyCharacter has implementation for this method.

Inherited from IMyControllableEntity
MoveAndRotate(Vector3, Vector2, float) Defines user input. Call MoveAndRotateStopped() on user input finished

Inherited from IMyControllableEntity
MoveAndRotateStopped() Should be called when input is finished

Inherited from IMyControllableEntity
OnAddedToScene(object) Adds entity to scene: init updates, render physics

Inherited from IMyEntity
OnAssumeControl(IMyCameraController) Called when it is setted as new main camera controller

Inherited from IMyCameraController
OnDestroy() Inherited from IMyDestroyableObject
OnReleaseControl(IMyCameraController) Called when new camera controller setted, and this was main camera controller

Inherited from IMyCameraController
OnRemovedFromScene(object) Remove entity and it's children from scene: stops updates and render, deactivates physics. Usually called when entity deleted

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

Inherited from IMyControllableEntity
PickUpContinues() Forwarding this action to Use(UseActionEnum, IMyEntity) with argument PickUp

Inherited from IMyControllableEntity
Rotate(Vector2, float) Rotate camera controller.

Inherited from IMyCameraController
RotateStopped() Rotation of camera controller stopped.

Inherited from IMyCameraController
SetColorMaskForSubparts(Vector3) Sets subparts custom col

Inherited from IMyEntity
SetEmissiveParts(string, Color, float) Sets the emissive value of a specific emissive material on entity.

Inherited from IMyEntity
SetEmissivePartsForSubparts(string, Color, float) Sets the emissive value of a specific emissive material on all entity subparts.

Inherited from IMyEntity
SetLocalMatrix(Matrix, object) Sets local matrix. When entity, has parent, it's world coordinates are calculated from localMatrix and parent world matrix

Inherited from IMyEntity
SetPosition(Vector3D) Set WorldMatrix's Translation . Moves entity.

Inherited from IMyEntity
SetTextureChangesForSubparts(Dictionary<MyStringId, MyTextureChange>) Sets subparts custom skinning. Copy values from TextureChanges , then change needed keys. You can retrieve values for exact skin with following code:csharp<br />MyDefinitionManager.Static.GetAssetModifierDefinitionForRender(skinId);<br /><br />

Inherited from IMyEntity
SetWorldMatrix(MatrixD, object) Sets world matrix of entity.

Inherited from IMyEntity
ShowInventory() Shows inventory gui of controlled Entity

Inherited from IMyControllableEntity
ShowRemoteAccessMenu() Shows remote access menu

Inherited from IMyControllableEntity
ShowTerminal() Shows terminal gui

Inherited from IMyControllableEntity
SwitchDamping() Switches damping state

Inherited from IMyControllableEntity
SwitchHandbrake() Switches handbrake state

Inherited from IMyControllableEntity
SwitchHelmet() Switches helmet open/closed state

Inherited from IMyControllableEntity
SwitchLandingGears() Switches landing gears state

Inherited from IMyControllableEntity
SwitchLights() Switches lights state

Inherited from IMyControllableEntity
SwitchReactors() Switches reactors state

Inherited from IMyControllableEntity
SwitchReactorsLocal() Switches handbrake state

Inherited from IMyControllableEntity
SwitchThrusts() Turns on jetpack on character

Inherited from IMyControllableEntity
SwitchWalk() Switch between walk / run mode. Only IMyCharacter has implementation for this method.

Inherited from IMyControllableEntity
Teleport(MatrixD, object, bool) When moving entity over large distances or when entity has children, using this method preferred over SetPosition(Vector3D)

Inherited from IMyEntity
TryGetSubpart(string, out MyEntitySubpart) Gets subpart by subpart name

Inherited from IMyEntity
Up() Move direction : up. Only IMyCharacter has implementation for this method.

Inherited from IMyControllableEntity
UpdateGamePruningStructure() Update position of entity in MyGamePruningStructure. Calls:csharp<br />MyGamePruningStructure.Move(this)<br /><br />

Inherited from IMyEntity
Use() Inherited from IMyControllableEntity
UseContinues() Inherited from IMyControllableEntity
AddToGamePruningStructure() Obsolete: Only used during Sandbox removal.

Inherited from IMyEntity
RemoveFromGamePruningStructure() Obsolete: Only used during Sandbox removal.

Inherited from IMyEntity
SetTextureChangesForSubparts(Dictionary<string, MyTextureChange>) Obsolete

This calling is obsolete, use another version.

Inherited from IMyEntity

Implements: