Show / Hide Table of Contents

Interface IMyEntity

Interface for all entities. (PB scripting interface)

Namespace: VRage.Game.ModAPI.Ingame
Assembly: VRage.Game.dll
Syntax
public interface IMyEntity

Properties

Closed

True if the block has been removed from the world.

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

Components

Gets blocks component logic container

Declaration
IMyEntityComponentContainer Components { get; }
Property Value
Type Description
VRage.Game.Components.Interfaces.IMyEntityComponentContainer

DisplayName

Gets user friendly name of entity. May be null For block terminal name use DisplayNameText

Declaration
string DisplayName { get; }
Property Value
Type Description
System.String

EntityId

Id of entity

Declaration
long EntityId { get; }
Property Value
Type Description
System.Int64

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.

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

InventoryCount

Returns the count of the number of inventories this entity has.

Declaration
int InventoryCount { get; }
Property Value
Type Description
System.Int32

Name

Some entities can have uniq name, and game can find them by name TryGetEntityByName(String, out IMyEntity)

Declaration
string Name { get; }
Property Value
Type Description
System.String

WorldAABB

Gets world axis-aligned bounding box

Declaration
BoundingBoxD WorldAABB { get; }
Property Value
Type Description
BoundingBoxD

WorldAABBHr

Gets world axis-aligned bounding box

Declaration
BoundingBoxD WorldAABBHr { get; }
Property Value
Type Description
BoundingBoxD

WorldMatrix

Gets world matrix of this entity

Declaration
MatrixD WorldMatrix { get; }
Property Value
Type Description
MatrixD

WorldVolume

Gets bounding sphere of this entity

Declaration
BoundingSphereD WorldVolume { get; }
Property Value
Type Description
BoundingSphereD

WorldVolumeHr

Gets bounding sphere of this entity

Declaration
BoundingSphereD WorldVolumeHr { get; }
Property Value
Type Description
BoundingSphereD

Methods

GetInventory()

Simply get the MyInventoryBase component stored in this entity.

Declaration
IMyInventory GetInventory()
Returns
Type Description
IMyInventory

Inventory

GetInventory(Int32)

Search for inventory component with maching index.

Declaration
IMyInventory GetInventory(int index)
Parameters
Type Name Description
System.Int32 index
Returns
Type Description
IMyInventory

GetPosition()

Gets position in world coordinates

Declaration
Vector3D GetPosition()
Returns
Type Description
Vector3D

Position

☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾