Entity Methods

RAGE Plugin Hook Documentation

[This is preliminary documentation and is subject to change.]

The Entity type exposes the following members.

Methods

  NameDescription
Public methodApplyForce
Applies force to this instance.
Public methodAttachBlip
Creates a new Blip and attaches it to this instance.
Public methodAttachTo
Attaches Entity to another Entity.
Public methodDelete

Deletes this instance.

Any call to a non-existent instance is invalid and will cause an exception.

Public methodDetach
Detaches this Entity from whichever Entity it's currently attached to.
Public methodDismiss

If this instance is marked as persistent, makes the entity non-persistent. Non-persistent entities will be deleted from the game world during clean ups.

This is equivalent to setting IsPersistent to false.

Public methodDistanceTo(ISpatial)
Gets the distance from this instance to the specified ISpatial instance.
Public methodDistanceTo(Vector3)
Gets the distance from this instance to the specified position.
Public methodDistanceTo2D(ISpatial)
Gets the distance from this instance to the specified ISpatial instance.
Public methodDistanceTo2D(Vector3)
Gets the distance from this instance to the specified position.
Public methodEquals(Entity)
Indicates whether the current instance is equal to another instance of the same type.
Public methodEquals(IHandleable)
Indicates whether the current IHandleable is equal to another IHandleable.
Public methodFace(ISpatial)
Sets the orientation of this instance to face the specified ISpatial.
Public methodFace(Vector3)
Sets the orientation of this instance to face the specified position.
Public methodGetAttachedBlip
Gets the first Blip attached to this instance.
Public methodGetAttachedBlips
Gets all Blips attached to this instance.
Public methodGetBoneAxes(Int32, Vector3, Vector3, Vector3)
Gets the axes of the specified bone. That is, three vectors pointing right, forward and up, relative to the bone's orientation.
Public methodGetBoneAxes(String, Vector3, Vector3, Vector3)
Gets the axes of the specified bone. That is, three vectors pointing right, forward and up, relative to the bone's orientation.
Public methodGetBoneIndex
Gets the index of a bone of this Entity, given the bone's name.
Public methodGetBoneOrientation(Int32)
Gets the orientation of the specified bone.
Public methodGetBoneOrientation(String)
Gets the orientation of the specified bone.
Public methodGetBonePosition(Int32)
Gets the position of the specified bone, in world space.
Public methodGetBonePosition(String)
Gets the position of the specified bone, in world space.
Public methodGetBoneRotation(Int32)
Gets the rotation of the specified bone.
Public methodGetBoneRotation(String)
Gets the rotation of the specified bone.
Public methodGetLastCollision(Vector3)
Gets the last collision of this entity.
Public methodGetLastCollision(Vector3, Vector3)
Gets the last collision of this entity.
Public methodGetLastCollision(Vector3, Vector3, String)
Gets the last collision of this entity.
Public methodCode exampleGetOffsetPosition
Gets a position offset relative to this instance, based on the instance's position and direction.
Public methodGetOffsetPositionFront
Gets a position that is the specified offset towards the entity's front.
Public methodGetOffsetPositionRight
Gets a position that is the specified offset towards the entity's right.
Public methodGetOffsetPositionUp
Gets a position that is the specified offset towards the entity's top.
Public methodGetPositionOffset

Gets the offset to the specified world position, relative to this Entity.

This is essentially the opposite of GetOffsetPosition(Vector3)

Public methodHasBeenDamagedBy
Determines whether this entity has been damaged by the specified entity.
Public methodHasBone(Int32)
Determines whether this Entity has the specified bone.
Public methodHasBone(String)
Determines whether this Entity has the specified bone.
Public methodIsTouching
Determines whether this entity is touching the specified entity.
Public methodIsValid
Determines whether this instance still represents an existing entity within the game world. Calls to an invalid instance is illegal and will result in an exception.
Public methodMakePersistent
Makes this entity persistent.
Public methodSetPositionWithSnap

Sets the position of this Entity to the specified value.

Unlike Position, if the specified position is in the ground, the position will be adjusted to place the entity above it.

Public methodSetPositionX
Sets X-component of the Position of this entity.
Public methodSetPositionY
Sets Y-component of the Position of this entity.
Public methodSetPositionZ
Sets Z-component of the Position of this entity.
Public methodSetQuaternionW
Sets W-component of the Quaternion of this entity.
Public methodSetQuaternionX
Sets X-component of the Quaternion of this entity.
Public methodSetQuaternionY
Sets Y-component of the Quaternion of this entity.
Public methodSetQuaternionZ
Sets Z-component of the Quaternion of this entity.
Public methodSetRotationPitch
Sets Pitch-component of the Rotation of this entity.
Public methodSetRotationRoll
Sets Roll-component of the Rotation of this entity.
Public methodSetRotationYaw
Sets Yaw-component of the Rotation of this entity.
Public methodTravelDistanceTo(ISpatial)
Gets the distance from this instance to the specified ISpatial instance, if using the road system.
Public methodTravelDistanceTo(Vector3)
Gets the distance from this instance to the specified position, if using the road system.
Top
See Also

Reference