Space Engineers
Public Member Functions | Properties | Events | List of all members
VRage.Game.ModAPI.IMyCharacter Interface Reference
Inheritance diagram for VRage.Game.ModAPI.IMyCharacter:
VRage.ModAPI.IMyEntity VRage.Game.ModAPI.Interfaces.IMyControllableEntity VRage.Game.ModAPI.Interfaces.IMyCameraController VRage.Game.ModAPI.Interfaces.IMyDestroyableObject VRage.Game.ModAPI.Interfaces.IMyDecalProxy VRage.Game.ModAPI.Ingame.IMyEntity

Public Member Functions

float GetSuitGasFillLevel (MyDefinitionId gasDefinitionId)
 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. More...
 
void Kill (object killData=null)
 
void TriggerCharacterAnimationEvent (string eventName, bool sync)
 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. More...
 
- Public Member Functions inherited from VRage.ModAPI.IMyEntity
string GetFriendlyName ()
 
void Close ()
 
void Delete ()
 
MyObjectBuilder_EntityBase GetObjectBuilder (bool copy=false)
 
void BeforeSave ()
 
IMyEntity GetTopMostParent (Type type=null)
 
void SetLocalMatrix (VRageMath.Matrix localMatrix, object source=null)
 
void GetChildren (List< IMyEntity > children, Func< IMyEntity, bool > collect=null)
 
MyEntitySubpart GetSubpart (string name)
 
bool TryGetSubpart (string name, out MyEntitySubpart subpart)
 
VRageMath.Vector3 GetDiffuseColor ()
 
bool IsVisible ()
 
void DebugDraw ()
 
void DebugDrawInvalidTriangles ()
 
void EnableColorMaskForSubparts (bool enable)
 
void SetColorMaskForSubparts (VRageMath.Vector3 colorMaskHsv)
 
void SetEmissiveParts (string emissiveName, Color emissivePartColor, float emissivity)
 Sets the emissive value of a specific emissive material on entity. More...
 
void SetEmissivePartsForSubparts (string emissiveName, Color emissivePartColor, float emissivity)
 Sets the emissive value of a specific emissive material on all entity subparts. More...
 
float GetDistanceBetweenCameraAndBoundingSphere ()
 
float GetDistanceBetweenCameraAndPosition ()
 
float GetLargestDistanceBetweenCameraAndBoundingSphere ()
 
float GetSmallestDistanceBetweenCameraAndBoundingSphere ()
 
void OnRemovedFromScene (object source)
 
void OnAddedToScene (object source)
 
MatrixD GetViewMatrix ()
 
MatrixD GetWorldMatrixNormalizedInv ()
 
void SetWorldMatrix (VRageMath.MatrixD worldMatrix, object source=null)
 
void SetPosition (VRageMath.Vector3D pos)
 
bool GetIntersectionWithLine (ref LineD line, out VRage.Game.Models.MyIntersectionResultLineTriangleEx?tri, IntersectionFlags flags)
 
Vector3 GetIntersectionWithLineAndBoundingSphere (ref LineD line, float boundingSphereRadiusMultiplier)
 
bool GetIntersectionWithSphere (ref BoundingSphereD sphere)
 
void GetTrianglesIntersectingSphere (ref BoundingSphereD sphere, Vector3?referenceNormalVector, float?maxAngle, System.Collections.Generic.List< MyTriangle_Vertex_Normals > retTriangles, int maxNeighbourTriangles)
 
bool DoOverlapSphereTest (float sphereRadius, Vector3D spherePos)
 
void AddToGamePruningStructure ()
 
void RemoveFromGamePruningStructure ()
 
void UpdateGamePruningStructure ()
 
- Public Member Functions inherited from VRage.Game.ModAPI.Ingame.IMyEntity
VRageMath.Vector3D GetPosition ()
 
- Public Member Functions inherited from VRage.Game.ModAPI.Interfaces.IMyControllableEntity
MatrixD GetHeadMatrix (bool includeY, bool includeX=true, bool forceHeadAnim=false, bool forceHeadBone=false)
 
void MoveAndRotate (Vector3 moveIndicator, Vector2 rotationIndicator, float rollIndicator)
 
void MoveAndRotateStopped ()
 
void Use ()
 
void UseContinues ()
 
void PickUp ()
 
void PickUpContinues ()
 
void Jump ()
 
void SwitchWalk ()
 
void Up ()
 
void Crouch ()
 
void Down ()
 
void ShowInventory ()
 
void ShowTerminal ()
 
void SwitchThrusts ()
 
void SwitchDamping ()
 
void SwitchLights ()
 
void SwitchLeadingGears ()
 
void SwitchReactors ()
 
void SwitchHelmet ()
 
void DrawHud (IMyCameraController camera, long playerId)
 
void Die ()
 
- Public Member Functions inherited from VRage.Game.ModAPI.Interfaces.IMyCameraController
void ControlCamera (MyCamera currentCamera)
 Change camera properties now. Communication: from controller to camera. More...
 
void Rotate (Vector2 rotationIndicator, float rollIndicator)
 Rotate camera controller. More...
 
void RotateStopped ()
 Rotation of camera controller stopped. More...
 
void OnAssumeControl (IMyCameraController previousCameraController)
 
void OnReleaseControl (IMyCameraController newCameraController)
 
bool HandleUse ()
 Used to send "use" commands to camera controller More...
 
bool HandlePickUp ()
 
- Public Member Functions inherited from VRage.Game.ModAPI.Interfaces.IMyDestroyableObject
void OnDestroy ()
 
bool DoDamage (float damage, MyStringHash damageSource, bool sync, MyHitInfo?hitInfo=null, long attackerId=0)
 
- Public Member Functions inherited from VRage.Game.ModAPI.Interfaces.IMyDecalProxy
void AddDecals (MyHitInfo hitInfo, MyStringHash source, object customdata, IMyDecalHandler decalHandler, MyStringHash material)
 
Parameters
hitInfoHithinfo on world coordinates
More...
 

Properties

float EnvironmentOxygenLevel [get]
 
float BaseMass [get]
 
float CurrentMass [get]
 
float SuitEnergyLevel [get]
 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. More...
 
bool IsPlayer [get]
 Returns true is this character is a player character, otherwise false. More...
 
bool IsBot [get]
 Returns true is this character is an AI character, otherwise false. More...
 
- Properties inherited from VRage.ModAPI.IMyEntity
MyEntityComponentContainer Components [get]
 
MyPhysicsComponentBase Physics [get, set]
 
MyPositionComponentBase PositionComp [get, set]
 
MyRenderComponentBase Render [get, set]
 
MyEntityComponentBase GameLogic [get, set]
 
MyHierarchyComponentBase Hierarchy [get, set]
 
MySyncComponentBase SyncObject [get]
 
MyModStorageComponentBase Storage [get, set]
 Custom storage for mods. Shared with all mods. More...
 
EntityFlags Flags [get, set]
 
long EntityId [get, set]
 
string Name [get, set]
 
bool MarkedForClose [get]
 
bool Closed [get]
 
bool DebugAsyncLoading [get]
 
bool Save [get, set]
 
MyPersistentEntityFlags2 PersistentFlags [get, set]
 
MyEntityUpdateEnum NeedsUpdate [get, set]
 
IMyEntity Parent [get]
 
Matrix LocalMatrix [get, set]
 
bool NearFlag [get, set]
 
bool CastShadows [get, set]
 
bool FastCastShadowResolve [get, set]
 
bool NeedsResolveCastShadow [get, set]
 
float MaxGlassDistSq [get]
 
bool NeedsDraw [get, set]
 
bool NeedsDrawFromParent [get, set]
 
bool Transparent [get, set]
 
bool ShadowBoxLod [get, set]
 
bool SkipIfTooSmall [get, set]
 
bool Visible [get, set]
 
bool InScene [get, set]
 
bool InvalidateOnMove [get]
 
new VRageMath.MatrixD WorldMatrix [get, set]
 
VRageMath.MatrixD WorldMatrixInvScaled [get]
 
VRageMath.MatrixD WorldMatrixNormalizedInv [get]
 
bool IsVolumetric [get]
 
BoundingBox LocalAABB [get, set]
 
BoundingBox LocalAABBHr [get]
 
BoundingSphere LocalVolume [get, set]
 
Vector3 LocalVolumeOffset [get, set]
 
Vector3 LocationForHudMarker [get]
 
bool IsCCDForProjectiles [get]
 
string DisplayName [get, set]
 
- Properties inherited from VRage.Game.ModAPI.Ingame.IMyEntity
MyEntityComponentContainer Components [get]
 
long EntityId [get]
 
VRageMath.BoundingBoxD WorldAABB [get]
 
VRageMath.BoundingBoxD WorldAABBHr [get]
 
VRageMath.MatrixD WorldMatrix [get]
 
VRageMath.BoundingSphereD WorldVolume [get]
 
VRageMath.BoundingSphereD WorldVolumeHr [get]
 
- Properties inherited from VRage.Game.ModAPI.Interfaces.IMyControllableEntity
IMyEntity Entity [get]
 
bool ForceFirstPersonCamera [get, set]
 
bool EnabledThrusts [get]
 
bool EnabledDamping [get]
 
bool EnabledLights [get]
 
bool EnabledLeadingGears [get]
 
bool EnabledReactors [get]
 
bool EnabledHelmet [get]
 
bool PrimaryLookaround [get]
 
- Properties inherited from VRage.Game.ModAPI.Interfaces.IMyCameraController
bool IsInFirstPersonView [get, set]
 
bool ForceFirstPersonCamera [get, set]
 
bool AllowCubeBuilding [get]
 
- Properties inherited from VRage.Game.ModAPI.Interfaces.IMyDestroyableObject
float Integrity [get]
 
bool UseDamageSystem [get]
 When set to true, it should use MyDamageSystem damage routing. More...
 

Events

CharacterMovementStateDelegate OnMovementStateChanged
 
- Events inherited from VRage.ModAPI.IMyEntity
Action< IMyEntityOnClose
 
Action< IMyEntityOnClosing
 
Action< IMyEntityOnMarkForClose
 
Action< IMyEntityOnPhysicsChanged
 

Detailed Description

Definition at line 7 of file IMyCharacter.cs.

Member Function Documentation

float VRage.Game.ModAPI.IMyCharacter.GetSuitGasFillLevel ( MyDefinitionId  gasDefinitionId)

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.

Parameters
gasDefinitionIdDefinition Id of the gas. Common example: new MyDefinitionId(typeof(MyObjectBuilder_GasProperties), "Oxygen")
Returns
void VRage.Game.ModAPI.IMyCharacter.Kill ( object  killData = null)
void VRage.Game.ModAPI.IMyCharacter.TriggerCharacterAnimationEvent ( string  eventName,
bool  sync 
)

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.

Parameters
eventNameEvent name.
syncSynchronize over network

Property Documentation

float VRage.Game.ModAPI.IMyCharacter.BaseMass
get

Definition at line 10 of file IMyCharacter.cs.

float VRage.Game.ModAPI.IMyCharacter.CurrentMass
get

Definition at line 11 of file IMyCharacter.cs.

float VRage.Game.ModAPI.IMyCharacter.EnvironmentOxygenLevel
get

Definition at line 9 of file IMyCharacter.cs.

bool VRage.Game.ModAPI.IMyCharacter.IsBot
get

Returns true is this character is an AI character, otherwise false.

Definition at line 33 of file IMyCharacter.cs.

bool VRage.Game.ModAPI.IMyCharacter.IsPlayer
get

Returns true is this character is a player character, otherwise false.

Definition at line 28 of file IMyCharacter.cs.

float VRage.Game.ModAPI.IMyCharacter.SuitEnergyLevel
get

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.

Definition at line 16 of file IMyCharacter.cs.

Event Documentation

CharacterMovementStateDelegate VRage.Game.ModAPI.IMyCharacter.OnMovementStateChanged

Definition at line 35 of file IMyCharacter.cs.


The documentation for this interface was generated from the following file: