Tap on either shoulder. "Tap" animation

This commit is contained in:
Nicolás Badano
2015-02-19 19:45:46 -03:00
parent bc3a226c64
commit dd92c5e845
3 changed files with 48 additions and 24 deletions

View File

@ -1,21 +1,22 @@
// by commy2
#include "script_component.hpp"
private ["_unit", "_message"];
_tapper = _this select 0;
_target = _this select 1;
EXPLODE_3_PVT(_this,_tapper,_target,_shoulderNum);
if (_target != ACE_player) exitWith {
addCamShake [4, 0.5, 5];
if !(local _target) then {
[[_tapper, _target], QUOTE(DFUNC(tapShoulder)), _target] call EFUNC(common,execRemoteFnc);
};
addCamShake [4, 0.5, 5];
ACE_player playActionNow 'gestureAdvance';
if !(local _target) then {
[[_tapper, _target, _shoulderNum], QUOTE(DFUNC(tapShoulder)), _target] call EFUNC(common,execRemoteFnc);
};
};
addCamShake [4, 0.5, 5];
//_message = format ["%1 tapped you on your shoulder.", [_unit] call EFUNC(common,getName)];
_message = localize "STR_ACE_Interaction_YouWereTapped";
if (_shoulderNum == 0) then {
_message = localize "STR_ACE_Interaction_YouWereTappedRight";
} else {
_message = localize "STR_ACE_Interaction_YouWereTappedLeft";
};
[_message] call EFUNC(common,displayTextStructured);