Fix Interaction

This commit is contained in:
PabstMirror 2015-01-30 16:11:16 -06:00
parent 08763b6b9f
commit 7519fefee9
3 changed files with 11 additions and 9 deletions

View File

@ -7,22 +7,23 @@
class ACE_Actions { \
class GVAR(AttachVehicle) { \
displayName = "$STR_ACE_Attach_AttachDetach"; \
condition = QUOTE( [ARR_3(_player, _target, '')] call FUNC(canAttach) ); \
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(openAttachUI); ); \
condition = QUOTE(([ARR_3(_player, _target, '')] call FUNC(canAttach))); \
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(openAttachUI);); \
exceptions[] = {"ACE_Drag_isNotDragging"}; \
showDisabled = 0; \
priority = 0; \
icon = PATHTOF(UI\attach_ca.paa); \
hotkey = "T"; \
distance = 4; \
}; \
class GVAR(DetachVehicle) { \
displayName = "$STR_ACE_Attach_Detach"; \
condition = QUOTE( [ARR_2(_player, _target)] call FUNC(canDetach) ); \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canDetach))); \
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(detach) ); \
exceptions[] = {"ACE_Drag_isNotDragging"}; \
showDisabled = 0; \
priority = 0; \
icon = PATHTOF(UI\detach_ca.paa); \
distance = 4; \
}; \
};
@ -52,7 +53,7 @@ class CfgVehicles {
class ACE_Equipment {
class GVAR(Attach) {
displayName = "$STR_ACE_Attach_AttachDetach";
condition = QUOTE( [ARR_3(_player, _player, '')] call FUNC(canAttach) );
condition = QUOTE(([ARR_3(_player, _player, '')] call FUNC(canAttach)));
statement = QUOTE( [ARR_2(_player, _player)] call FUNC(openAttachUI); );
exceptions[] = {"ACE_Drag_isNotDragging"};
showDisabled = 0;
@ -62,7 +63,7 @@ class CfgVehicles {
};
class GVAR(Detach) {
displayName = "$STR_ACE_Attach_Detach";
condition = QUOTE( [ARR_2(_player, _player)] call FUNC(canDetach) );
condition = QUOTE(([ARR_2(_player, _player)] call FUNC(canDetach)));
statement = QUOTE( [ARR_2(_player, _player)] call FUNC(detach) );
exceptions[] = {"ACE_Drag_isNotDragging"};
showDisabled = 0;

View File

@ -78,7 +78,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
}] call BIS_fnc_addStackedEventHandler;
//had to spawn the mouseHint, not sure why
[localize "STR_ACE_Attach_PlaceAction", localize "STR_ACE_Attach_CancelAction"] call EFUNC(interaction,showMouseHint);
[localize "STR_ACE_Attach_PlaceAction", localize "STR_ACE_Attach_CancelAction"] spawn EFUNC(interaction,showMouseHint);
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {GVAR(pfeh_running) AND !isNull (GVAR(setupObject))}, {call FUNC(placeApprove);}] call EFUNC(common,AddActionEventHandler)];
_unit setVariable [QGVAR(cancelActionEH), [_unit, "MenuBack", {GVAR(pfeh_running) AND !isNull (GVAR(setupObject))}, {call FUNC(placeCancel);}] call EFUNC(common,AddActionEventHandler)];
};

View File

@ -6,7 +6,8 @@ Author: eRazeri and CAA-Picard
Detach an item from a unit
Arguments:
unit
0: OBJECT - unit doing the attaching (player)
1: OBJECT - vehicle that it will be detached from (player or vehicle)
Return Value:
none
@ -14,7 +15,7 @@ none
private ["_itemName", "_count", "_attachedItem", "_fnc_detachDelay"];
PARAMS_2(_unit, _attachToVehicle);
PARAMS_2(_unit,_attachToVehicle);
_attachedObjectsArray = _attachToVehicle getVariable ["ACE_AttachedObjects", []];
_attachedItemsArray = _attachToVehicle getVariable ["ACE_AttachedItemNames", []];