{"name":"currentMuzzle","title":"currentMuzzle","type":"command","url":"https://community.bistudio.com/wiki/currentMuzzle","revid":321269,"updated":"2022-05-13T19:08:05Z","groups":["Weapons"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","description":"Returns a unit's current weapon muzzle. Does not work on vehicles.","syntaxes":[{"syntax":"currentMuzzle unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"current muzzle\n> [!IMPORTANT] > In earlier games/versions, this command could return a Number (`0`) if unit was in a vehicle. > > Use the following to circumvent the issue: > > ```sqf > _muzzle = weaponState unit select 1; > ```","text":"String - current muzzle\n\n> [!IMPORTANT]\n> In earlier games/versions, this command could return a Number (`0`) if *unit* was in a vehicle.\n>\n> Use the following to circumvent the issue:\n>\n> ```sqf\n> _muzzle = weaponState unit select 1;\n> ```"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_muzzle = currentMuzzle player;"]},{"code":["_muzzle = currentMuzzle (gunner (vehicle player));"]}],"see_also":["currentWeapon","currentMagazine","currentThrowable"]}