getEntityInfo: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (Created page with "{{RV|type=command |game1= arma3 |version1= 2.16 |branch= dev |gr1= Object Manipulation |descr= Returns various properties for the given entity. |s1= getEntityInfo enti...") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 3: | Line 3: | ||
|game1= arma3 | |game1= arma3 | ||
|version1= 2.16 | |version1= 2.16 | ||
|branch= dev | |branch= dev | ||
Line 11: | Line 12: | ||
|s1= [[getEntityInfo]] entity | |s1= [[getEntityInfo]] entity | ||
|p1= entity: [[Object]] | |p1= entity: [[Object]] | ||
|r1= [[Array]] | |r1= [[Array]] in format [isAnimal, isDeadSet, deadSetTime, lastEntityCausingDamage, lastDamageTime, isUpsideDown, upsideDownTime, isStopped, canFloat, hasTerminalOpened], where: | ||
* isAnimal: [[Boolean]] - [[true]] if the entity is an animal | * 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. | * 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 | * 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 | * 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 | * lastDamageTime: [[Number]] - how long ago was ''lastEntityCausingDamage'' assigned | ||
* isUpsideDown: [[Boolean]] - [[true]] if entity is upside down. The engine considers this to be <sqf>vectorUp ent select 2 < 0.3</sqf> | * 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. | * upsideDownTime: [[Number]] - how long the entity was upside down. | ||
* isStopped: [[Boolean]] - [[true]] when the entity does not need to be actively simulated. | * isStopped: [[Boolean]] - [[true]] when the entity does not need to be actively simulated. | ||
Line 25: | Line 26: | ||
* hasTerminalOpened: [[Boolean]] - [[true]] if the UAV terminal is opened for the given entity. | * hasTerminalOpened: [[Boolean]] - [[true]] if the UAV terminal is opened for the given entity. | ||
|x1= <sqf>_entityInfo = getEntityInfo ent1;</sqf> | |x1= <sqf>private _entityInfo = getEntityInfo ent1;</sqf> | ||
|seealso= [[cursorObject]] [[cursorTarget]] [[createSimpleObject]] [[getObjectType]] [[getObjectTextures]] [[objectParent]] [[setVelocityTransformation]] [[getUnitFreefallInfo]] [[getModelInfo]] | |seealso= [[cursorObject]] [[cursorTarget]] [[createSimpleObject]] [[getObjectType]] [[getObjectTextures]] [[objectParent]] [[setVelocityTransformation]] [[getUnitFreefallInfo]] [[getModelInfo]] | ||
}} | }} |
Revision as of 17:17, 10 January 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 [isAnimal, isDeadSet, deadSetTime, lastEntityCausingDamage, lastDamageTime, isUpsideDown, upsideDownTime, isStopped, canFloat, hasTerminalOpened], where:
- 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.
- 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.
- lastDamageTime: Number - how long ago was lastEntityCausingDamage assigned
- isUpsideDown: Boolean - true if the entity is upside down. The engine considers this to be vectorUp ent select 2 < 0.3
- upsideDownTime: Number - how long the entity was upside down.
- 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.
- hasTerminalOpened: Boolean - true if the UAV terminal is opened for the given entity.
Examples
- Example 1:
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