ACE3/addons/common/functions/fnc_goKneeling.sqf
2015-09-20 16:40:49 +02:00

23 lines
550 B
Plaintext

/*
* Author: commy2
* Move unit to kneeling position.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* None
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
if (stance _unit == "PRONE") exitWith {};
[
_unit,
["AmovPknlMstpSnonWnonDnon", "AmovPknlMstpSlowWrflDnon", "AmovPknlMstpSrasWlnrDnon", "AmovPknlMstpSlowWpstDnon", "AmovPknlMstpSoptWbinDnon"] select ((["", primaryWeapon _unit, secondaryWeapon _unit, handgunWeapon _unit, binocular _unit] find currentWeapon _unit) max 0)
] call FUNC(doAnimation);