{"name":"awake","title":"awake","type":"command","url":"https://community.bistudio.com/wiki/awake","revid":373886,"updated":"2025-06-26T10:58:51Z","groups":["PhysX"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","locality":{"argument":"global","effect":"local"},"description":"Wakes up sleeping PhysX object or puts a PhysX object to sleep. In 2.10 this command can be used on corpses of type `Man` and has no effect on alive units. When unit gets killed it goes into ragdoll state for a short while, then the units get frozen and any simulation and collision is removed to save system resources. As a result, corpses do not react to their surrounding any more. Using this command will temporarily re-enable ragdoll state of a corpse to the same state it was when unit died. If this command is used in \"enable/disable\" sequence on a dead body, it gives the corpse a visible nudge (See example 3).\n\n> [!NOTE]\n> This command won't have lasting effect on vehicles as vehicles are actively simulated, but it works rather well on smaller PhysX enabled objects.","syntaxes":[{"syntax":"object awake awake","params":[{"name":"object","type":"Object","description":"PhysX object or dead unit","type_expr":"Object"},{"name":"awake","type":"Boolean","description":"true to awake the object, false - to put it to sleep","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"awake"}}],"examples":[{"code":["_object awake false;"]},{"text":"Since 2.10:\n\n```sqf\n_deadUnit awake true;\n```","code":["_deadUnit awake true;"]},{"text":"Make corpse react to explosion (since 2.10):\n\n```sqf\n_deadUnit addEventHandler [\"Explosion\",\n{\n    params [\"_unit\", \"_damage\"];\n    if (_damage < 0.01) exitWith {};\n    _unit awake true;\n    _unit awake false;\n}];\n```","code":["_deadUnit addEventHandler [\"Explosion\", \n{\n\tparams [\"_unit\", \"_damage\"];\n\tif (_damage < 0.01) exitWith {};\n\t_unit awake true;\n\t_unit awake false;\n}];"]}],"see_also":["isAwake","addTorque","addForce","vectorModelToWorld","vectorModelToWorldVisual","selectionPosition"]}