ACE3/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf

24 lines
741 B
Plaintext
Raw Normal View History

// by gpgpgpgp, edited by commy2
#include "script_component.hpp"
2015-01-28 09:22:39 +00:00
PARAMS_1(_unit);
if (_unit != ACE_player) exitWith {};
2015-01-28 09:22:39 +00:00
_fenceObject = [ACE_player] call FUNC(getNearestFence);
if (isNull _fenceObject) exitWith {};
2015-01-28 09:22:39 +00:00
_timeToCut = 5;
if !([ACE_player] call EFUNC(common,isEngineer)) then {
_timeToCut = _timeToCut + 5;
};
[ACE_player, "AinvPknlMstpSnonWnonDr_medic5", 0] call EFUNC(common,doAnimation);
if (_timeToCut > 4.5) then {
playSound "ACE_wirecutter_sound_long";
} else {
playSound "ACE_wirecutter_sound";
};
2015-01-28 18:54:14 +00:00
[_timeToCut, [_fenceObject], {(_this select 0) call FUNC(cutDownFenceCallback)}, {(_this select 0) call FUNC(cutDownFenceAbort)}, localize "STR_ACE_logistics_wirecutter_CuttingFence"] call EFUNC(common,progressBar);