{"name":"isWeaponDeployed","operator":null,"title":"isWeaponDeployed","type":"command","url":"https://community.bistudio.com/wiki/isWeaponDeployed","revid":321095,"updated":"2022-05-13T13:54:06Z","groups":["Weapons"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.42"}],"since":{"game":"arma3","name":"Arma 3","version":"1.42"},"arma3_since":"1.42","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns true if weapon is currently deployed.","syntaxes":[{"syntax":"isWeaponDeployed unit","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unit: Object"}],"returns":{"type":"Boolean","types":["Boolean"],"description":null,"text":"Boolean"},"form":"unary","operator":null,"left":null,"right":{"text":"unit","types":["Object"]}},{"syntax":"isWeaponDeployed [unit, onGround]","since":"arma3 2.06","effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unit: Object"},{"name":"onGround","type":"Boolean","optional":true,"default":null,"description":"true to check if deployed on ground, false to check if deployed on object. Omitted - same as main syntax.","types":["Boolean"],"since":null,"text":"onGround: Boolean - (Optional) true to check if deployed on ground, false to check if deployed on object. Omitted - same as main syntax."}],"returns":{"type":"Boolean","types":["Boolean"],"description":null,"text":"Boolean"},"form":"unary","operator":null,"left":null,"right":{"text":"[unit, onGround]","types":["Array"]}}],"examples":[{"text":"```sqf\n_dep = isWeaponDeployed player;\n```","code":["_dep = isWeaponDeployed player;"]},{"text":"```sqf\n_depOnObj = isWeaponDeployed [player, false];\n```","code":["_depOnObj = isWeaponDeployed [player, false];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["isWeaponRested","canDeployWeapon"],"notes":[{"user":"AgentRev","date":"2015-07-01T16:44:00Z","text":"You can force a unit out of bipod or resting with:\n\n```sqf\n_unit playMove \"\";\n```"},{"user":"Beno 83au","date":"2017-03-04T03:58:00Z","text":"playMove, as well as switchMove, appears to not work when forcing a player out of being deployed. A more reliable method is:\n\n```sqf\n_player setPos (_player modelToWorld [0,0,0]);\n```"}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Weapons","Introduced with Arma 3 version 1.42","Scripting Commands"]}