getEntityInfo: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Killzone Kid (talk | contribs) No edit summary |
||
Line 15: | Line 15: | ||
|r1= [[Array]] in format [isMan, isAnimal, isDeadSet, deadSetTime, lastEntityCausingDamage, lastDamageTime, isUpsideDown, upsideDownTime, isStopped, canFloat, hasTerminalOpened], where: | |r1= [[Array]] in format [isMan, isAnimal, isDeadSet, deadSetTime, lastEntityCausingDamage, lastDamageTime, isUpsideDown, upsideDownTime, isStopped, canFloat, hasTerminalOpened], where: | ||
* isMan [[Boolean]] - [[true]] if the entity is a man | * 0 - isMan [[Boolean]] - [[true]] if the entity is a man | ||
* isAnimal: [[Boolean]] - [[true]] if the entity is an animal | * 1 - isAnimal: [[Boolean]] - [[true]] if the entity is an animal | ||
* isDeadSet: [[Boolean]] - [[true]] if the entity has dead flag set. Often has the same value as ![[alive]], but is not the same, as [[alive]] checks the total damage. | * 2 - isDeadSet: [[Boolean]] - [[true]] if the entity has dead flag set. Often has the same value as ![[alive]], but is not the same, as [[alive]] checks the total damage. | ||
* deadSetTime: [[Number]] - for how long the entity was dead | * 3 - deadSetTime: [[Number]] - for how long the entity was dead | ||
* lastEntityCausingDamage: [[Object]] - [[objNull]] or the entity that last caused damage to this entity. Is not the same as the killer but could be the same. Killed entity might not have this set either. The entity does not have to be dead in order to have last entity that caused damage assigned. | * 4 - lastEntityCausingDamage: [[Object]] - [[objNull]] or the entity that last caused damage to this entity. Is not the same as the killer but could be the same. Killed entity might not have this set either. The entity does not have to be dead in order to have last entity that caused damage assigned. | ||
* lastDamageTime: [[Number]] - how long ago was ''lastEntityCausingDamage'' assigned | * 5 - lastDamageTime: [[Number]] - how long ago was ''lastEntityCausingDamage'' assigned | ||
* isUpsideDown: [[Boolean]] - [[true]] if the entity is upside down. The engine considers this to be <sqf inline>vectorUp ent select 2 < 0.3</sqf> | * 6 - isUpsideDown: [[Boolean]] - [[true]] if the entity is upside down. The engine considers this to be <sqf inline>vectorUp ent select 2 < 0.3</sqf> | ||
* upsideDownTime: [[Number]] - how long the entity was upside down. | * 7 - upsideDownTime: [[Number]] - how long the entity was upside down. | ||
* isStopped: [[Boolean]] - [[true]] when the entity does not need to be actively simulated. | * 8 - isStopped: [[Boolean]] - [[true]] when the entity does not need to be actively simulated. | ||
* canFloat: [[Boolean]] - [[true]] if the entity is able to float on water. | * 9 - canFloat: [[Boolean]] - [[true]] if the entity is able to float on water. | ||
* hasTerminalOpened: [[Boolean]] - [[true]] if the UAV terminal is opened for the given entity. | * 10 - hasTerminalOpened: [[Boolean]] - [[true]] if the UAV terminal is opened for the given entity. | ||
* 11 - shotEffectiveTimeToLive: [[Number]] - how much more shot has to live. | |||
* 12 - shotFuseDistanceLeft: [[Number]] - how long shot has to travel more to get fused (undebarrel grenade for example). | |||
* 13 - shotTimeToExplosion: [[Number]] - how long before shot fuse explodes (hand grenade for example). | |||
* 14 - shotTriggerIsForced: [[Boolean]] - [[true]] if shot ammo was triggered with [[triggerAmmo]]. | |||
{{Feature|informative| | {{Feature|informative| |
Revision as of 02:37, 7 February 2024
Description
- Description:
- Returns various properties for the given entity.
- Groups:
- Object Manipulation
Syntax
- Syntax:
- getEntityInfo entity
- Parameters:
- entity: Object
- Return Value:
- Array in format [isMan, isAnimal, isDeadSet, deadSetTime, lastEntityCausingDamage, lastDamageTime, isUpsideDown, upsideDownTime, isStopped, canFloat, hasTerminalOpened], where:
- 0 - isMan Boolean - true if the entity is a man
- 1 - isAnimal: Boolean - true if the entity is an animal
- 2 - isDeadSet: Boolean - true if the entity has dead flag set. Often has the same value as !alive, but is not the same, as alive checks the total damage.
- 3 - deadSetTime: Number - for how long the entity was dead
- 4 - lastEntityCausingDamage: Object - objNull or the entity that last caused damage to this entity. Is not the same as the killer but could be the same. Killed entity might not have this set either. The entity does not have to be dead in order to have last entity that caused damage assigned.
- 5 - lastDamageTime: Number - how long ago was lastEntityCausingDamage assigned
- 6 - isUpsideDown: Boolean - true if the entity is upside down. The engine considers this to be vectorUp ent select 2 < 0.3
- 7 - upsideDownTime: Number - how long the entity was upside down.
- 8 - isStopped: Boolean - true when the entity does not need to be actively simulated.
- 9 - canFloat: Boolean - true if the entity is able to float on water.
- 10 - hasTerminalOpened: Boolean - true if the UAV terminal is opened for the given entity.
- 11 - shotEffectiveTimeToLive: Number - how much more shot has to live.
- 12 - shotFuseDistanceLeft: Number - how long shot has to travel more to get fused (undebarrel grenade for example).
- 13 - shotTimeToExplosion: Number - how long before shot fuse explodes (hand grenade for example).
- 14 - shotTriggerIsForced: Boolean - true if shot ammo was triggered with triggerAmmo.
Alternative Syntax
- Syntax:
- entity getEntityInfo index
- Parameters:
- entity: Object
- index: Number - property index (see main syntax, 2 - isDeadSet for example)
- Return Value:
- Anything - depends on the requested property, or Nothing
Examples
- Example 1:
- Example 2:
Additional Information
- See also:
- cursorObject cursorTarget createSimpleObject getObjectType getObjectTextures objectParent setVelocityTransformation getUnitFreefallInfo getModelInfo
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note