2015-05-09 02:47:15 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
* Taps a shoulder
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Player <OBJECT>
|
|
|
|
* 1: Target <OBJECT>
|
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [player, target] call ace_interaction_fnc_tapShoulder
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-11 23:13:47 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 19:32:51 +00:00
|
|
|
|
2015-02-19 22:45:46 +00:00
|
|
|
EXPLODE_3_PVT(_this,_tapper,_target,_shoulderNum);
|
2015-01-11 19:32:51 +00:00
|
|
|
|
2015-01-12 04:20:02 +00:00
|
|
|
if (_target != ACE_player) exitWith {
|
2015-02-19 22:45:46 +00:00
|
|
|
addCamShake [4, 0.5, 5];
|
2015-03-21 13:23:36 +00:00
|
|
|
ACE_player playActionNow "PutDown";
|
2015-02-19 22:45:46 +00:00
|
|
|
if !(local _target) then {
|
|
|
|
[[_tapper, _target, _shoulderNum], QUOTE(DFUNC(tapShoulder)), _target] call EFUNC(common,execRemoteFnc);
|
|
|
|
};
|
2015-01-11 19:32:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
addCamShake [4, 0.5, 5];
|
|
|
|
|
2015-05-09 20:14:00 +00:00
|
|
|
private ["_message"];
|
2015-04-04 22:54:15 +00:00
|
|
|
//localize is converting the escaped <> symbols, so just add them here instead of in the stringtable
|
2015-02-19 22:45:46 +00:00
|
|
|
if (_shoulderNum == 0) then {
|
2015-04-04 22:54:15 +00:00
|
|
|
_message = format ["%1 >", (localize "STR_ACE_Interaction_YouWereTappedRight")];
|
2015-02-19 22:45:46 +00:00
|
|
|
} else {
|
2015-04-04 22:54:15 +00:00
|
|
|
_message = format ["< %1", (localize "STR_ACE_Interaction_YouWereTappedLeft")];
|
2015-02-19 22:45:46 +00:00
|
|
|
};
|
2015-01-11 19:32:51 +00:00
|
|
|
|
2015-04-04 22:54:15 +00:00
|
|
|
[parseText _message] call EFUNC(common,displayTextStructured);
|