mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Function headers per Coding Guidelines for Interaction
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
* Author: esteldunedain
|
* Author: esteldunedain
|
||||||
* Mount unit actions inside passenger submenu
|
* Mount unit actions inside passenger submenu
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: Vehicle <OBJECT>
|
* 0: Vehicle <OBJECT>
|
||||||
* 1: Player <OBJECT>
|
* 1: Player <OBJECT>
|
||||||
* 3: Parameters <ARRAY>
|
* 3: Parameters <ARRAY>
|
||||||
@ -10,6 +10,9 @@
|
|||||||
* Return value:
|
* Return value:
|
||||||
* Children actions <ARRAY>
|
* Children actions <ARRAY>
|
||||||
*
|
*
|
||||||
|
* Example:
|
||||||
|
* _array = [vehicle, player, [params]] call ace_interaction_fnc_addPassengerAction
|
||||||
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Author: esteldunedain
|
* Author: esteldunedain
|
||||||
* Create one action per passenger
|
* Create one action per passenger
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: Vehicle <OBJECT>
|
* 0: Vehicle <OBJECT>
|
||||||
* 1: Player <OBJECT>
|
* 1: Player <OBJECT>
|
||||||
* 3: Parameters <ARRAY>
|
* 3: Parameters <ARRAY>
|
||||||
@ -10,6 +10,9 @@
|
|||||||
* Return value:
|
* Return value:
|
||||||
* Children actions <ARRAY>
|
* Children actions <ARRAY>
|
||||||
*
|
*
|
||||||
|
* Example:
|
||||||
|
* _array = [vehicle, player, [params]] call ace_interaction_fnc_addPassengersActions
|
||||||
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
@ -39,4 +42,4 @@ _actions = [];
|
|||||||
};
|
};
|
||||||
} forEach crew _vehicle;
|
} forEach crew _vehicle;
|
||||||
|
|
||||||
_actions
|
_actions
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
Author: Garth de Wet (LH)
|
* Author: Garth de Wet (LH)
|
||||||
|
* Adds an item to the select menu
|
||||||
Description:
|
*
|
||||||
Adds an item to the select menu
|
* Arguments:
|
||||||
|
* 0: List container <ARRAY/NUMBER>
|
||||||
Parameters:
|
* 1: Display name <STRING>
|
||||||
0: ARRAY/NUMBER - List container
|
* 2: Picture <STRING>
|
||||||
1: String - Display Name
|
* 3: Data <STRING/CODE>
|
||||||
2: String - Picture
|
*
|
||||||
3: String/code - data
|
* Return value:
|
||||||
|
* Container <ARRAY/NUMBER>
|
||||||
Returns:
|
*
|
||||||
ARRAY/Number
|
* Example:
|
||||||
|
* _array = [_actions, "Banana", "UI\dot_ca.paa", data] call ace_interaction_fnc_addSelectableItem
|
||||||
Example:
|
*
|
||||||
*/
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_container", "_displayName", "_picture", "_data", "_index"];
|
private ["_container", "_displayName", "_picture", "_data", "_index"];
|
||||||
|
@ -1,5 +1,18 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Applies buttons
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* call ace_interaction_fnc_applyButtons
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_object", "_actions", "_dlgInteractionDialog", "_ctrlInteractionDialog", "_index", "_ctrlInteractionDialogIcon"];
|
private ["_object", "_actions", "_dlgInteractionDialog", "_ctrlInteractionDialog", "_index", "_ctrlInteractionDialogIcon"];
|
||||||
|
@ -7,10 +7,10 @@
|
|||||||
* 1: player <OBJECT>
|
* 1: player <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* <BOOL>
|
* Able to become leader of group <BOOL>
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [player, player] call ace_interaction_fnc_canBecomeLeader
|
* _bool = [player, player] call ace_interaction_fnc_canBecomeLeader
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,18 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Checks if the player can interact with civilian
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Target <OBJECT>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* Able to interact with civilian <BOOL>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* _bool = [target] call ace_interaction_fnc_canInteractWithCivilian
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
EXPLODE_2_PVT(_this,_unit,_isCivilian);
|
EXPLODE_2_PVT(_this,_unit,_isCivilian);
|
||||||
@ -8,4 +21,4 @@ if (isNil "_isCivilian") then {_isCivilian = true};
|
|||||||
|
|
||||||
alive _unit
|
alive _unit
|
||||||
&& [side _unit != side ACE_player, side group _unit == civilian] select _isCivilian
|
&& [side _unit != side ACE_player, side group _unit == civilian] select _isCivilian
|
||||||
//&& {count (weapons _unit) == 0}
|
//&& {count (weapons _unit) == 0}
|
||||||
|
@ -1,4 +1,19 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Checks if the player can join a group
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Player <OBJECT>
|
||||||
|
* 1: Target <OBJECT>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* Able to join a group <BOOL>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* _bool = [player, target] call ace_interaction_fnc_canJoinGroup
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_target"];
|
private ["_unit", "_target"];
|
||||||
|
@ -1,4 +1,19 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Checks if the player can join a team
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Player <OBJECT>
|
||||||
|
* 1: Target <OBJECT>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* Able to join a team <BOOL>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* _bool = [player, target] call ace_interaction_fnc_canJoinTeam
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_target"];
|
private ["_unit", "_target"];
|
||||||
|
@ -1,5 +1,19 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Checks if the player can tap a shoulder
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Player <OBJECT>
|
||||||
|
* 1: Target <OBJECT>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* Able to tap a shoulder <BOOL>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* _bool = [player, target] call ace_interaction_fnc_canTapShoulder
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_target"];
|
private ["_unit", "_target"];
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
* Become Leader of group
|
* Become Leader of group
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: target <OBJECT>
|
* 0: Target <OBJECT>
|
||||||
* 1: player <OBJECT>
|
* 1: Player <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
|
@ -1,4 +1,20 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Get door
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Distance <NUMBER>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* House objects and door <ARRAY>
|
||||||
|
* 0: House <OBJECT>
|
||||||
|
* 1: Door Name <STRING>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* _array = [player, target] call ace_interaction_fnc_getDoor
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_distance", "_position0", "_position1", "_intersections", "_count", "_house", "_door", "_index", "_id"];
|
private ["_distance", "_position0", "_position1", "_intersections", "_count", "_house", "_door", "_index", "_id"];
|
||||||
|
@ -1,4 +1,21 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Get door animations
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: House <OBJECT>
|
||||||
|
* 1: Door <STRING>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* Animation and Locked variable <ARRAY>
|
||||||
|
* 0: Animation <STRING>
|
||||||
|
* 1: Locked variable <STRING>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* _array = [target, "door"] call ace_interaction_fnc_getDoorAnimations
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_house", "_door", "_animations", "_lockedVariable"];
|
private ["_house", "_door", "_animations", "_lockedVariable"];
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
/*
|
/*
|
||||||
* Author: KoffeinFlummi
|
* Author: KoffeinFlummi
|
||||||
*
|
* Forces a civilian to the ground (with a chance of failure)
|
||||||
* Forces a civilian to the ground. (chance of failure).
|
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit to be sent away (Object)
|
* 0: Unit <OBJECT>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* none
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [target] call ace_interaction_fnc_getDown
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,4 +1,18 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Get selected button
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* Angle <NUMBER>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* _number = call ace_interaction_fnc_getSelectedButton
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define MIN_DISTANCE 0.0065
|
#define MIN_DISTANCE 0.0065
|
||||||
|
@ -2,12 +2,15 @@
|
|||||||
* Author: esteldunedain
|
* Author: esteldunedain
|
||||||
* Return a suitable position for the action point for the current weapon
|
* Return a suitable position for the action point for the current weapon
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* Children actions <ARRAY>
|
* Children actions <ARRAY>
|
||||||
*
|
*
|
||||||
|
* Example:
|
||||||
|
* _array = call ace_interaction_fnc_getWeaponPos
|
||||||
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
Author: Garth de Wet (LH)
|
* Author: Garth de Wet (LH)
|
||||||
|
* Closes the Interaction menu
|
||||||
Description:
|
*
|
||||||
Closes the Interaction menu
|
* Arguments:
|
||||||
|
* None
|
||||||
Parameters:
|
*
|
||||||
Nothing
|
* Return value:
|
||||||
|
* None
|
||||||
Returns:
|
*
|
||||||
Nothing
|
* Example:
|
||||||
|
* call ace_interaction_fnc_hideMenu
|
||||||
Example:
|
*
|
||||||
call FUNC(hideMenu);
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
closeDialog 0;
|
closeDialog 0;
|
||||||
(findDisplay 1713999) closeDisplay 1;
|
(findDisplay 1713999) closeDisplay 1;
|
||||||
(uiNameSpace getVariable QGVAR(Flow_Display)) closeDisplay 0;
|
(uiNameSpace getVariable QGVAR(Flow_Display)) closeDisplay 0;
|
||||||
GVAR(MainButton) = nil;
|
GVAR(MainButton) = nil;
|
||||||
call FUNC(hideMouseHint);
|
call FUNC(hideMouseHint);
|
||||||
|
@ -1,22 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
Author(s):
|
* Author: Garth de Wet (LH)
|
||||||
Garth de Wet (LH)
|
* Hides the interaction helper text with the mouse buttons at the bottom middle of the screen
|
||||||
|
*
|
||||||
Description:
|
* Arguments:
|
||||||
Hides the interaction helper text with the mouse buttons at the bottom middle of the screen
|
* None
|
||||||
|
*
|
||||||
Parameters:
|
* Return value:
|
||||||
Nothing
|
* None
|
||||||
|
*
|
||||||
Returns:
|
* Example:
|
||||||
Nothing
|
* call ace_interaction_fnc_hideMouseHint
|
||||||
|
*
|
||||||
Example:
|
* Public: No
|
||||||
call FUNC(hideMouseHint);
|
*/
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
if (isNull (uiNamespace getVariable ["ACE_Helper_Display", objNull])) exitWith{};
|
if (isNull (uiNamespace getVariable ["ACE_Helper_Display", objNull])) exitWith{};
|
||||||
|
|
||||||
(QGVAR(InteractionHelper) call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
|
(QGVAR(InteractionHelper) call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
|
||||||
showHUD true;
|
showHUD true;
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
*
|
|
||||||
* Check if the vehicle is in range of the player.
|
* Check if the vehicle is in range of the player.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: Vehicke (Object)
|
* 0: Vehicle <OBJECT>
|
||||||
* 1: Distance in meters (Number)
|
* 1: Distance in meters <NUMBER>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* (Bool)
|
* Vehicle in range of player <BOOL>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* _bool = [target, 5] call ace_interaction_fnc_isInRange
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,4 +1,19 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Assigns a unit to the team
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Unit <OBJECT>
|
||||||
|
* 1: Team <STRING>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [target, "YELLOW"] call ace_interaction_fnc_joinTeam
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_team", "_message"];
|
private ["_unit", "_team", "_message"];
|
||||||
|
@ -1,13 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
* Author: bux578
|
* Author: bux578
|
||||||
*
|
* Initializes the Interaction module
|
||||||
* Initializes the Interaction module.
|
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* Whatever the module provides. (I dunno.)
|
* 0: Logic <NUMBER>
|
||||||
|
* 1: ???
|
||||||
|
* 2: Activation State <BOOL>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return value:
|
||||||
* None
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [logic, ???, activationState] call ace_interaction_fnc_moduleInteraction
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
Author: Garth de Wet (LH)
|
* Author: Garth de Wet (LH)
|
||||||
|
* Scrolls through the list down or up
|
||||||
Description:
|
*
|
||||||
Depending on the passed value, either scrolls down through the list or up.
|
* Arguments:
|
||||||
|
* 0: Amount <NUMBER>
|
||||||
Parameters:
|
*
|
||||||
NUMBER - Amount to increase current interaction target
|
* Return value:
|
||||||
|
* None
|
||||||
Returns:
|
*
|
||||||
Nothing
|
* Example:
|
||||||
|
* [2] call ace_interaction_fnc_moveDown
|
||||||
Example:
|
*
|
||||||
1 call FUNC(moveDown);
|
* Public: No
|
||||||
-1 call FUNC(moveDown);
|
*/
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define CLAMP(x,low,high) (if(x > high)then{high}else{if(x < low)then{low}else{x}})
|
#define CLAMP(x,low,high) (if(x > high)then{high}else{if(x < low)then{low}else{x}})
|
||||||
|
@ -1,4 +1,18 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* On button up
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* call ace_interaction_fnc_onButtonUp
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_player", "_vehicle", "_target", "_count", "_index", "_action", "_statement", "_condition", "_conditionShow", "_exceptions", "_distance"];
|
private ["_player", "_vehicle", "_target", "_count", "_index", "_action", "_statement", "_condition", "_conditionShow", "_exceptions", "_distance"];
|
||||||
|
@ -1,4 +1,18 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* On click
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* Index <NUMBER>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* 5 call ace_interaction_fnc_onClick
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_player", "_vehicle", "_target", "_count", "_index", "_action", "_subMenu", "_statement", "_condition", "_conditionShow", "_exceptions", "_distance"];
|
private ["_player", "_vehicle", "_target", "_count", "_index", "_action", "_subMenu", "_statement", "_condition", "_conditionShow", "_exceptions", "_distance"];
|
||||||
|
|
||||||
|
@ -1,4 +1,18 @@
|
|||||||
// by CorruptedHeart, commy2
|
/*
|
||||||
|
* Author: CorruptedHeart, commy2
|
||||||
|
* On select menu double click
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* call ace_interaction_fnc_onSelectMenuDblClick
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
call compile (lbData [8866, lbCurSel 8866]) call GVAR(SelectAccept);
|
call compile (lbData [8866, lbCurSel 8866]) call GVAR(SelectAccept);
|
||||||
|
@ -1,4 +1,19 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Opens door
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: House <OBJECT>
|
||||||
|
* 1: Door <STRING>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [house, "door"] call ace_interaction_fnc_openDoor
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_info", "_house", "_door", "_animations", "_lockedVariable"];
|
private ["_info", "_house", "_door", "_animations", "_lockedVariable"];
|
||||||
|
@ -1,4 +1,19 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Opens menu select UI
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Unit <OBJECT>
|
||||||
|
* 1: Vehicle <OBJECT>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [unit, vehicle] call ace_interaction_fnc_openMenuSelectUI
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_vehicle", "_cargo"];
|
private ["_unit", "_vehicle", "_cargo"];
|
||||||
@ -20,25 +35,25 @@ _actions = [localize "STR_ACE_Interaction_InteractionMenu", localize "STR_ACE_In
|
|||||||
|
|
||||||
// prepare: add all cargo units as options to select menu
|
// prepare: add all cargo units as options to select menu
|
||||||
{
|
{
|
||||||
if (_x != _unit) then {
|
if (_x != _unit) then {
|
||||||
_actions = [
|
_actions = [
|
||||||
_actions,
|
_actions,
|
||||||
[_x] call EFUNC(common,getName),
|
[_x] call EFUNC(common,getName),
|
||||||
QUOTE(PATHTOF(UI\dot_ca.paa)),
|
QUOTE(PATHTOF(UI\dot_ca.paa)),
|
||||||
_forEachIndex
|
_forEachIndex
|
||||||
] call FUNC(addSelectableItem);
|
] call FUNC(addSelectableItem);
|
||||||
};
|
};
|
||||||
} forEach _cargo;
|
} forEach _cargo;
|
||||||
|
|
||||||
// open select menu
|
// open select menu
|
||||||
[
|
[
|
||||||
_actions,
|
_actions,
|
||||||
{
|
{
|
||||||
call FUNC(hideMenu);
|
call FUNC(hideMenu);
|
||||||
[0, GVAR(InteractionMenu_Crew) select _this, ""] spawn FUNC(showMenu);
|
[0, GVAR(InteractionMenu_Crew) select _this, ""] spawn FUNC(showMenu);
|
||||||
GVAR(InteractionMenu_Crew) = nil;
|
GVAR(InteractionMenu_Crew) = nil;
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
call FUNC(hideMenu);
|
call FUNC(hideMenu);
|
||||||
}
|
}
|
||||||
] call FUNC(openSelectMenu);
|
] call FUNC(openSelectMenu);
|
||||||
|
@ -1,26 +1,27 @@
|
|||||||
/*
|
/*
|
||||||
Author: Garth de Wet (LH)
|
* Author: Garth de Wet (LH)
|
||||||
|
* Opens the select menu UI and sets up the UI
|
||||||
Description:
|
*
|
||||||
Opens the select menu UI and sets up the UI
|
* Arguments:
|
||||||
|
* 0: Items <ARRAY>
|
||||||
Parameters:
|
* 0: Text <STRING>
|
||||||
0: ARRAY - items
|
* 1: Statement to execute <CODE>
|
||||||
ARRAY
|
* 2: Condition before execute <CODE>
|
||||||
0 = Text
|
* 3: showDisabled <BOOL>
|
||||||
1 = statement to execute
|
* 4: Priority <NUMBER>
|
||||||
2 = condition before execute
|
* 5: Icon <STRING>
|
||||||
3 = showDisabled
|
* 6: Extra variables passed to the code <ARRAY>
|
||||||
4 = priority
|
* 1: Select Action <CODE>
|
||||||
5 = icon
|
* 2: Cancel Action <CODE>
|
||||||
6 = extra variables. Passed to the code.
|
*
|
||||||
1: Code - select action
|
* Return value:
|
||||||
2: Code - Cancel Action
|
* None
|
||||||
Returns:
|
*
|
||||||
Nothing
|
* Example:
|
||||||
|
* [["text", {statement}, {condition}, showDisabled, priority, "icon", [variables]], {selectAction}, {cancelAction}] call ace_interaction_fnc_openSelectMenu
|
||||||
Example:
|
*
|
||||||
*/
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
if (!(profileNamespace getVariable [QGVAR(FlowMenu), false])) then {
|
if (!(profileNamespace getVariable [QGVAR(FlowMenu), false])) then {
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
Author: Garth de Wet (LH)
|
* Author: Garth de Wet (LH)
|
||||||
|
* Prepares the select menu for use
|
||||||
Description:
|
*
|
||||||
Prepares the select menu for use.
|
* Arguments:
|
||||||
|
* 0: Header Text <STRING>
|
||||||
Parameters:
|
* 1: Approve Button Text <STRING>
|
||||||
0: TEXT - Header text
|
*
|
||||||
1: TEXT - Approve button text
|
* Return value:
|
||||||
|
* Container object <ARRAY/NUMBER>
|
||||||
Returns:
|
*
|
||||||
ARRAY/NUMBER - container object for use with addSelectableItem.
|
* Example:
|
||||||
|
* _array = ["Select Explosive", "Place"] call ace_interaction_fnc_prepareSelectMenu
|
||||||
Example:
|
*
|
||||||
["Select Explosive", "Place"] call FUNC(prepareSelectMenu);
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_buttonAction", "_header", "_buttonText", "_cancelButton"];
|
private ["_buttonAction", "_header", "_buttonText", "_cancelButton"];
|
||||||
|
@ -1,22 +1,27 @@
|
|||||||
/*
|
/*
|
||||||
* Author: KoffeinFlummi
|
* Author: KoffeinFlummi
|
||||||
*
|
* Pushes a boat away from the player
|
||||||
* Pushes a boat away from the player.
|
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Boat (object)
|
* 0: Boat <OBJECT>
|
||||||
* 1: Velocity (vectorlike array)
|
* 1: Velocity <ARRAY>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [target, [vector]] call ace_interaction_fnc_push
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
_boat = _this select 0;
|
_boat = _this select 0;
|
||||||
_velocity = _this select 1;
|
_velocity = _this select 1;
|
||||||
|
|
||||||
if !(local _boat) exitWith {
|
if !(local _boat) exitWith {
|
||||||
[_this, QUOTE(FUNC(push)), _boat] call EFUNC(common,execRemoteFnc);
|
[_this, QUOTE(FUNC(push)), _boat] call EFUNC(common,execRemoteFnc);
|
||||||
};
|
};
|
||||||
|
|
||||||
_boat setVelocity _velocity;
|
_boat setVelocity _velocity;
|
||||||
|
@ -1,4 +1,18 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Removes tag
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* call ace_interaction_fnc_removeTag
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
0 spawn {
|
0 spawn {
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* Author: KoffeinFlummi
|
* Author: KoffeinFlummi
|
||||||
*
|
* Sends a civilian crowd away with a chance of failure
|
||||||
* Sends a civilian crowd away (chance of failure).
|
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit to be sent away (Object)
|
* 0: Unit <OBJECT>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* none
|
* None
|
||||||
*/
|
*
|
||||||
|
* Example:
|
||||||
|
* [target] call ace_interaction_fnc_sendAway
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define DISTANCE 50
|
#define DISTANCE 50
|
||||||
@ -21,16 +25,16 @@ _unit = _this select 0;
|
|||||||
ACE_player playActionNow "GestureGo";
|
ACE_player playActionNow "GestureGo";
|
||||||
|
|
||||||
if (count weapons ACE_player > 0) then {
|
if (count weapons ACE_player > 0) then {
|
||||||
_chance = 0.8;
|
_chance = 0.8;
|
||||||
} else {
|
} else {
|
||||||
_chance = 0.5;
|
_chance = 0.5;
|
||||||
};
|
};
|
||||||
|
|
||||||
{
|
{
|
||||||
if (count (weapons _unit) == 0 and random 1 < _chance) then {
|
if (count (weapons _unit) == 0 and random 1 < _chance) then {
|
||||||
[-2, {
|
[-2, {
|
||||||
(_this select 0) setUnitPos "AUTO";
|
(_this select 0) setUnitPos "AUTO";
|
||||||
(_this select 0) doMove [(getPos (_this select 0) select 0) + DISTANCE * (eyeDirection (_this select 1) select 0), (getPos (_this select 0) select 1) + DISTANCE * (eyeDirection (_this select 1) select 1), 0];
|
(_this select 0) doMove [(getPos (_this select 0) select 0) + DISTANCE * (eyeDirection (_this select 1) select 0), (getPos (_this select 0) select 1) + DISTANCE * (eyeDirection (_this select 1) select 1), 0];
|
||||||
}, [_x, ACE_player]] call CBA_fnc_globalExecute;
|
}, [_x, ACE_player]] call CBA_fnc_globalExecute;
|
||||||
};
|
};
|
||||||
} foreach (_unit nearEntities ["Civilian", RADIUS]);
|
} forEach (_unit nearEntities ["Civilian", RADIUS]);
|
||||||
|
@ -1,21 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
Author(s):
|
* Author: Garth de Wet (LH)
|
||||||
Garth de Wet (LH)
|
* Shows the interaction helper text with the mouse buttons at the bottom middle of the screen
|
||||||
|
*
|
||||||
Description:
|
* Arguments:
|
||||||
Shows the interaction helper text with the mouse buttons at the bottom middle of the screen
|
* 0: Left Click Text <STRING>
|
||||||
|
* 1: Right Click Text <STRING>
|
||||||
Parameters:
|
* 2: Scroll Text <STRING> (Optional)
|
||||||
0: STRING - Left click text
|
*
|
||||||
1: STRING - Right click text
|
* Return value:
|
||||||
3: STRING - (Optional) Scroll text
|
* None
|
||||||
|
*
|
||||||
Returns:
|
* Example:
|
||||||
Nothing
|
* ["Place Explosive", "Cancel"] call ace_interaction_fnc_showMouseHint
|
||||||
|
*
|
||||||
Example:
|
* Public: No
|
||||||
["Place Explosive", "Cancel"] call FUNC(showMouseHint);
|
*/
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define GUI_GRID_W (0.025)
|
#define GUI_GRID_W (0.025)
|
||||||
@ -51,4 +50,4 @@ if (_scroll == "") exitWith {
|
|||||||
(_display displayCtrl 1201) ctrlCommit 0;
|
(_display displayCtrl 1201) ctrlCommit 0;
|
||||||
};
|
};
|
||||||
(_display displayCtrl 1002) ctrlSetText _scroll;
|
(_display displayCtrl 1002) ctrlSetText _scroll;
|
||||||
showHUD false;
|
showHUD false;
|
||||||
|
@ -1,4 +1,18 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Sort options by priority
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* Actions <ARRAY>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* _customActions call ace_interaction_fnc_sortOptionsByPriority
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_actions", "_count", "_index", "_actionN", "_actionM"];
|
private ["_actions", "_count", "_index", "_actionN", "_actionM"];
|
||||||
|
@ -1,4 +1,19 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
EXPLODE_3_PVT(_this,_tapper,_target,_shoulderNum);
|
EXPLODE_3_PVT(_this,_tapper,_target,_shoulderNum);
|
||||||
|
@ -1,4 +1,20 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Updates tooltip's position
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Tooltip Display <NUMBER>
|
||||||
|
* 1: X Coordinate <NUMBER>
|
||||||
|
* 2: Y Coordinate <NUMBER>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player, 0.5, 0.5] call ace_interaction_fnc_updateTooltipPosition
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
|
Reference in New Issue
Block a user