ACE3/addons/movement/functions/fnc_climb.sqf
2015-01-18 06:45:28 +01:00

23 lines
657 B
Plaintext

// by commy2
#include "script_component.hpp"
private "_unit";
_unit = _this select 0;
if !([_unit] call FUNC(canClimb)) exitWith {
[localize "STR_ACE_Movement_CanNotClimb"] call EFUNC(common,displayTextStructured);
};
if !(_unit getVariable ["ACE_isClimbInit", false]) then {
_unit addEventHandler ["AnimDone", {
if (local (_this select 0) && {_this select 1 == "ACE_Climb"}) then {_this call FUNC(handleClimb)};
}];
_unit setVariable ["ACE_isClimbInit", true];
};
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
[_unit, "AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
[_unit, "ACE_Climb", 0] call EFUNC(common,doAnimation);