mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix Interaction
This commit is contained in:
parent
08763b6b9f
commit
7519fefee9
@ -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;
|
||||
|
@ -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)];
|
||||
};
|
||||
|
@ -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", []];
|
||||
|
Loading…
Reference in New Issue
Block a user