isAwake: Difference between revisions
Jump to navigation
Jump to search
m (Replaced <code> with <sqf>) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 3: | Line 3: | ||
|game1= arma3 | |game1= arma3 | ||
|version1= 2.08 | |version1= 2.08 | ||
|arg= global | |arg= global | ||
|eff= local | |eff= local | ||
Line 8: | Line 9: | ||
|gr1= Object Manipulation | |gr1= Object Manipulation | ||
|descr= Returns resting state of a PhysX (EPE) object. Some EPE objects are deliberately put to sleep by the engine to save resources. This command returns [[true]] when object is simulating and [[false]] when it is put to sleep. With units of type {{hl|Man}} the behaviour is slightly different. As units never get put to sleep, the command outputs ragdoll state of a unit instead. There are 6 states for the output of the command: | |descr= Returns resting state of a PhysX (EPE) object. Some EPE objects are deliberately put to sleep by the engine to save resources. | ||
* EPE object is | This command returns [[true]] when object is simulating and [[false]] when it is put to sleep. With units of type {{hl|Man}} the behaviour is slightly different. | ||
As units never get put to sleep, the command outputs ragdoll state of a unit instead. There are 6 states for the output of the command: | |||
* EPE object is simulating - [[true]] | |||
* EPE object is put to sleep - [[false]] | * EPE object is put to sleep - [[false]] | ||
* Unit is [[alive]], ragdoll is active - [[false]] | * Unit is [[alive]], ragdoll is active - [[false]] | ||
* Unit is [[alive]], ragdoll is NOT active - [[true]] | * Unit is [[alive]], ragdoll is NOT active - [[true]] | ||
* {{GVI|arma3|2.10}} Unit is NOT [[alive]], ragdoll is active - [[true]] | * {{GVI|arma3|2.10|size= 0.75}} Unit is NOT [[alive]], ragdoll is active - [[true]] | ||
* {{GVI|arma3|2.10}} Unit is NOT [[alive]], ragdoll is NOT active - [[false]] | * {{GVI|arma3|2.10|size= 0.75}} Unit is NOT [[alive]], ragdoll is NOT active - [[false]] | ||
|s1= [[isAwake]] object | |s1= [[isAwake]] object | ||
Line 25: | Line 26: | ||
|x1= <sqf>private _isAwake = isAwake _object;</sqf> | |x1= <sqf>private _isAwake = isAwake _object;</sqf> | ||
|x2= {{GVI|arma3|2.10|size= 0.75}} Here is a simple formula to return ragdoll state of a unit: | |||
<sqf>private _unitIsInRagdoll = alive _unit != isAwake _unit;</sqf> | |||
|seealso= [[awake]] [[addTorque]] [[addForce]] [[vectorModelToWorld]] [[vectorModelToWorldVisual]] [[selectionPosition]] | |seealso= [[awake]] [[addTorque]] [[addForce]] [[vectorModelToWorld]] [[vectorModelToWorldVisual]] [[selectionPosition]] | ||
}} | }} |
Revision as of 00:01, 4 April 2024
Description
- Description:
- Returns resting state of a PhysX (EPE) object. Some EPE objects are deliberately put to sleep by the engine to save resources. This command returns true when object is simulating and false when it is put to sleep. With units of type Man the behaviour is slightly different. As units never get put to sleep, the command outputs ragdoll state of a unit instead. There are 6 states for the output of the command:
- Groups:
- Object Manipulation
Syntax
- Syntax:
- isAwake object
- Parameters:
- object: Object - PhysX object or unit
- Return Value:
- Boolean - see description
Examples
- Example 1:
- Example 2:
- 2.10 Here is a simple formula to return ragdoll state of a unit:
Additional Information
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