Arma 3 Scripting

Command in Object Manipulation

getEntityInfo

Also available as Markdown and JSON, or read the original wiki page.

Description

Returns various properties for the given entity. Most properties should be checked where entity is local

Syntax

Syntax 1

getEntityInfo entity

Parameters:

Returns: Array with [isMan, isAnimal, isDeadSet, deadSetTime, lastEntityCausingDamage, lastDamageTime, isUpsideDown, upsideDownTime, isStopped, canFloat, hasTerminalOpened, isWeaponholder, isWreck, isSmoking, isSetForDeletion]

Note

In multiplayer, following values update properly only when entity is local:

  • lastEntityCausingDamage
  • lastDamageTime
  • isStopped Other values are either static or update depending on how your client sees the entity right now.

Timer values are never exact between clients and vary slightly depending on latency, JIP clients end up with large timer values close to game's time but get normal once associated value changes again:

  • deadSetTime
  • lastDamageTime
  • upsideDownTime

Syntax 2

entity getEntityInfo index

Parameters:

Returns: Anything - depends on the requested property, or Nothing

Examples

Example 1

private _entityInfo = getEntityInfo ent1;
_entityInfo params [
    "_isMan",
    "_isAnimal",
    "_isDeadSet",
    "_deadSetTime",
    "_lastEntityCausingDamage",
    "_lastDamageTime",
    "_isUpsideDown",
    "_upsideDownTime",
    "_isStopped",
    "_canFloat",
    "_hasTerminalOpened",
    "_isWeaponholder",
    "_isWreck",
    "_isSmoking",
    "_isSetForDeletion",
    "_isParachute"
];

Example 2

private _isMan = ent1 getEntityInfo 0;

See also

cursorObject · cursorTarget · createSimpleObject · getObjectType · getObjectTextures · objectParent · setVelocityTransformation · getUnitFreefallInfo · getModelInfo · getShotInfo · getRespawnVehicleInfo