{"name":"awake","operator":null,"title":"awake","type":"command","url":"https://community.bistudio.com/wiki/awake","revid":373886,"updated":"2025-06-26T10:58:51Z","groups":["PhysX"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.08"}],"since":{"game":"arma3","name":"Arma 3","version":"2.08"},"arma3_since":"2.08","branch":null,"locality":{"argument":"global","effect":"local","server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"object","type":"Object","optional":false,"default":null,"description":"PhysX object or dead unit","types":["Object"],"since":null,"text":"object: Object - PhysX object or dead unit"},{"name":"awake","type":"Boolean","optional":false,"default":null,"description":"true to awake the object, false - to put it to sleep","types":["Boolean"],"since":null,"text":"awake: Boolean - true to awake the object, false - to put it to sleep"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"object","types":["Object"]},"right":{"text":"awake","types":["Boolean"]}}],"examples":[{"text":"```sqf\n_object awake false;\n```","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}];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["isAwake","addTorque","addForce","vectorModelToWorld","vectorModelToWorldVisual","selectionPosition"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: PhysX","Introduced with Arma 3 version 2.08","Scripting Commands","Scripting Commands: Local Effect"]}