mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into pr/9758
This commit is contained in:
commit
db3fc19e22
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,3 +20,4 @@ CHANGELOG.md
|
||||
sqfvm.exe
|
||||
ArmaScriptCompiler.exe
|
||||
*.sqfc
|
||||
!extras/**/*.zip
|
||||
|
@ -36,6 +36,15 @@ call FUNC(compileStats);
|
||||
EGVAR(common,blockItemReplacement) = false;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(cargoChanged), {
|
||||
params ["_display"];
|
||||
// Only update actions if necessary, this can get performance-intensive using the arrow keys
|
||||
if (!GVAR(updateActionsOnCargoChange)) exitWith {};
|
||||
private _actionInfo = [_display];
|
||||
_actionInfo append GVAR(actionInfo);
|
||||
[QGVAR(displayActions), _actionInfo] call CBA_fnc_localEvent;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// Setup Tools tab
|
||||
[keys (uiNamespace getVariable [QGVAR(configItemsTools), createHashMap]), LLSTRING(toolsTab), TOOLS_TAB_ICON, -1, true] call FUNC(addRightPanelButton);
|
||||
|
||||
|
@ -155,6 +155,8 @@
|
||||
#define IDC_statsNextPage 53
|
||||
#define IDC_statsCurrentPage 54
|
||||
#define IDC_actionsBox 90
|
||||
#define IDC_actionsBackground1 90010
|
||||
#define IDC_actionsBackground2 90011
|
||||
#define IDC_actionsText1 9001
|
||||
#define IDC_actionsButton1 9002
|
||||
#define IDC_actionsText2 9003
|
||||
|
@ -10,6 +10,7 @@
|
||||
* 3: Actions <ARRAY of ARRAYS>
|
||||
* 4: Condition <CODE> (default: {true})
|
||||
* 5: Scope editor <NUMBER> (default: 2)
|
||||
* 6: Update when cargo content changes <BOOL> (default: false)
|
||||
*
|
||||
* Return Value:
|
||||
* 0: Array of IDs <ARRAY of STRINGS>
|
||||
@ -30,7 +31,8 @@ params [
|
||||
["_title", "", [""]],
|
||||
["_actions", [], [[]]],
|
||||
["_rootCondition", {true}, [{}]],
|
||||
["_scopeEditor", 2, [0]]
|
||||
["_scopeEditor", 2, [0]],
|
||||
["_updateOnCargoChange", false, [false]]
|
||||
];
|
||||
|
||||
// Compile actions from config (in case this is called before preInit)
|
||||
@ -119,4 +121,8 @@ private _group = [];
|
||||
};
|
||||
} forEach _tabs;
|
||||
|
||||
if (_updateOnCargoChange) then {
|
||||
GVAR(updateActionsOnCargoChange) = true;
|
||||
};
|
||||
|
||||
_return
|
||||
|
@ -37,6 +37,8 @@ private _actionList = [
|
||||
|
||||
private _configGroupEntries = "true" configClasses (configFile >> QGVAR(actions));
|
||||
|
||||
GVAR(updateActionsOnCargoChange) = false;
|
||||
|
||||
{
|
||||
private _scopeEditor = getNumber (_x >> "scopeEditor");
|
||||
|
||||
@ -48,6 +50,10 @@ private _configGroupEntries = "true" configClasses (configFile >> QGVAR(actions)
|
||||
private _rootDisplayName = getText (_x >> "displayName");
|
||||
private _rootCondition = getText (_x >> "condition");
|
||||
private _rootTabs = getArray (_x >> "tabs");
|
||||
private _updateOnCargoChanged = getNumber (_x >> "updateOnCargoChanged");
|
||||
if (_updateOnCargoChanged > 0) then {
|
||||
GVAR(updateActionsOnCargoChange) = true;
|
||||
};
|
||||
|
||||
if (_rootCondition != "") then {
|
||||
_rootCondition = compile _rootCondition;
|
||||
|
@ -15,7 +15,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_display", "_control", "_curSel", "_itemCfg"];
|
||||
|
||||
GVAR(actionsInfo) = [_control, _curSel, _itemCfg];
|
||||
@ -46,13 +45,12 @@ private _groups = (GVAR(actionList) select _panel) select {
|
||||
};
|
||||
|
||||
private _show = _groups isNotEqualTo [];
|
||||
private _ctrl = _display displayCtrl IDC_actionsBox;
|
||||
_ctrl ctrlShow _show;
|
||||
_ctrl ctrlCommit 0.15;
|
||||
private _actionsBoxCtrl = _display displayCtrl IDC_actionsBox;
|
||||
_actionsBoxCtrl ctrlShow _show;
|
||||
_actionsBoxCtrl ctrlCommit 0.15;
|
||||
|
||||
if (!_show) exitWith {};
|
||||
|
||||
private _actionsBoxCtrl = _display displayCtrl IDC_actionsBox;
|
||||
private _actionsCurrentPageCtrl = _display displayCtrl IDC_actionsCurrentPage;
|
||||
|
||||
private _currentPage = GVAR(currentActionPage);
|
||||
@ -83,10 +81,11 @@ _actionsCurrentPageCtrl ctrlSetFade 0;
|
||||
_actionsCurrentPageCtrl ctrlShow true;
|
||||
_actionsCurrentPageCtrl ctrlCommit 0;
|
||||
|
||||
private _activeCtrls = [];
|
||||
{
|
||||
_x params ["", "_type", "_label", "_statement"];
|
||||
|
||||
private _idc = 9001 + _forEachIndex * 2;
|
||||
private _idc = IDC_actionsText1 + _forEachIndex * 2;
|
||||
private _actionTextCtrl = _display displayCtrl _idc;
|
||||
private _actionButtonCtrl = _display displayCtrl (_idc + 1);
|
||||
|
||||
@ -99,13 +98,23 @@ _actionsCurrentPageCtrl ctrlCommit 0;
|
||||
[true] call FUNC(refresh);
|
||||
}] call CBA_fnc_execNextFrame;
|
||||
}];
|
||||
|
||||
if (_activeCtrls isNotEqualTo []) then {
|
||||
(ctrlPosition (_activeCtrls select -1)) params ["", "_lastPosY", "", "_lastPosH"];
|
||||
_actionButtonCtrl ctrlSetPositionY (_lastPosY + _lastPosH + GRID_H);
|
||||
} else {
|
||||
_actionButtonCtrl ctrlSetPositionY (6 * GRID_H);
|
||||
};
|
||||
|
||||
_actionButtonCtrl ctrlAddEventHandler ["ButtonClick", _statement];
|
||||
_actionButtonCtrl ctrlSetText _label;
|
||||
_actionButtonCtrl ctrlSetFade 0;
|
||||
_actionButtonCtrl ctrlEnable true;
|
||||
_actionButtonCtrl ctrlCommit 0;
|
||||
_actionTextCtrl ctrlSetFade 1;
|
||||
_actionTextCtrl ctrlEnable false;
|
||||
_actionTextCtrl ctrlCommit 0;
|
||||
_activeCtrls pushBack _actionButtonCtrl;
|
||||
};
|
||||
case ACTION_TYPE_TEXT: {
|
||||
private _text = call _statement;
|
||||
@ -113,13 +122,25 @@ _actionsCurrentPageCtrl ctrlCommit 0;
|
||||
if (isNil "_text") then {
|
||||
_text = "";
|
||||
};
|
||||
if (_text isEqualType []) then {
|
||||
_text = _text joinString endl;
|
||||
};
|
||||
if (_activeCtrls isNotEqualTo []) then {
|
||||
(ctrlPosition (_activeCtrls select -1)) params ["", "_lastPosY", "", "_lastPosH"];
|
||||
_actionTextCtrl ctrlSetPositionY (_lastPosY + _lastPosH + GRID_H);
|
||||
} else {
|
||||
_actionTextCtrl ctrlSetPositionY (5 * GRID_H);
|
||||
};
|
||||
|
||||
_actionTextCtrl ctrlSetText _text;
|
||||
_actionTextCtrl ctrlSetPositionH (ctrlTextHeight _actionTextCtrl);
|
||||
_actionTextCtrl ctrlSetFade 0;
|
||||
_actionTextCtrl ctrlEnable false;
|
||||
_actionTextCtrl ctrlCommit 0;
|
||||
_actionButtonCtrl ctrlSetFade 1;
|
||||
_actionButtonCtrl ctrlEnable false;
|
||||
_actionButtonCtrl ctrlCommit 0;
|
||||
_activeCtrls pushBack _actionTextCtrl;
|
||||
};
|
||||
default {
|
||||
_actionTextCtrl ctrlSetFade 1;
|
||||
@ -134,7 +155,7 @@ _actionsCurrentPageCtrl ctrlCommit 0;
|
||||
private _actionCount = count _items;
|
||||
|
||||
{
|
||||
private _idc = 9001 + _x * 2;
|
||||
private _idc = IDC_actionsText1 + _x * 2;
|
||||
private _actionTextCtrl = _display displayCtrl _idc;
|
||||
private _actionButtonCtrl = _display displayCtrl (_idc + 1);
|
||||
|
||||
@ -145,6 +166,11 @@ private _actionCount = count _items;
|
||||
} forEach ([0, 1, 2, 3, 4] select [_actionCount, 5]);
|
||||
|
||||
private _pos = ctrlPosition _actionsBoxCtrl;
|
||||
_pos set [3, ([11, (5 * _actionCount) + 6] select (_actionCount > 0)) * GRID_H];
|
||||
_actionsBoxCtrl ctrlSetPosition _pos;
|
||||
(ctrlPosition (_activeCtrls select -1)) params ["", "_lastPosY", "", "_lastPosH"];
|
||||
private _actionsBoxHeight = _lastPosY + _lastPosH + GRID_H;
|
||||
_actionsBoxCtrl ctrlSetPositionH _actionsBoxHeight;
|
||||
_actionsBoxCtrl ctrlCommit 0;
|
||||
|
||||
private _background = _display displayCtrl IDC_actionsBackground1;
|
||||
_background ctrlSetPositionH _actionsBoxHeight;
|
||||
_background ctrlCommit 0;
|
||||
|
@ -450,22 +450,22 @@ class GVAR(display) {
|
||||
h = QUOTE(55 * GRID_H);
|
||||
class controls {
|
||||
class actionsStaticBackground1: ctrlStaticBackground {
|
||||
idc = -1;
|
||||
idc = IDC_actionsBackground1;
|
||||
x = QUOTE(0);
|
||||
y = QUOTE(0);
|
||||
w = QUOTE(47 * GRID_W);
|
||||
h = QUOTE(56 * GRID_H);
|
||||
h = QUOTE(55 * GRID_H);
|
||||
colorBackground[]={0.1,0.1,0.1,0.5};
|
||||
};
|
||||
class actionsStaticBackground2: ctrlStaticBackground {
|
||||
idc = -1;
|
||||
idc = IDC_actionsBackground2;
|
||||
x = QUOTE(0);
|
||||
y = QUOTE(0);
|
||||
w = QUOTE(47 * GRID_W);
|
||||
h = QUOTE(5 * GRID_H);
|
||||
colorBackground[]={0.1,0.1,0.1,0.8};
|
||||
};
|
||||
class actionsText1: RscText {
|
||||
class actionsText1: RscTextMulti {
|
||||
idc = IDC_actionsText1;
|
||||
fade = 1;
|
||||
x = QUOTE(0 * GRID_W);
|
||||
@ -479,6 +479,7 @@ class GVAR(display) {
|
||||
};
|
||||
class actionsButton1: ctrlButton {
|
||||
idc = IDC_actionsButton1;
|
||||
onMouseEnter = QUOTE(ctrlSetFocus (_this select 0));
|
||||
fade = 1;
|
||||
text = "";
|
||||
x = QUOTE(1 * GRID_W);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -86,6 +86,12 @@
|
||||
if (!isNull objectParent _unit && {local objectParent _unit}) exitWith {
|
||||
[_unit] call FUNC(lockUnconsciousSeat);
|
||||
};
|
||||
|
||||
// Prevent second ragdoll of uncon units when they're killed
|
||||
if (IS_UNCONSCIOUS(_unit) && !isAwake _unit) then {
|
||||
_unit enableSimulation false;
|
||||
[{_this enableSimulation true}, _unit, 2] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["CAManBase", "deleted", {
|
||||
|
@ -45,5 +45,48 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_SelfActions {
|
||||
class GVAR(reloadTurret) {
|
||||
displayName = "$STR_controls_tooltips_RELOAD_MAGAZINE";
|
||||
condition = QUOTE(call FUNC(canSwapTurretMagazine));
|
||||
statement = QUOTE(call FUNC(swapTurretMagazine));
|
||||
icon = "\A3\ui_f\data\igui\cfg\simpletasks\types\rearm_ca.paa";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Tank: LandVehicle {
|
||||
class ACE_SelfActions {
|
||||
class GVAR(reloadTurret) {
|
||||
displayName = "$STR_controls_tooltips_RELOAD_MAGAZINE";
|
||||
condition = QUOTE(call FUNC(canSwapTurretMagazine));
|
||||
statement = QUOTE(call FUNC(swapTurretMagazine));
|
||||
icon = "\A3\ui_f\data\igui\cfg\simpletasks\types\rearm_ca.paa";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Car: LandVehicle {
|
||||
class ACE_SelfActions {
|
||||
class GVAR(reloadTurret) {
|
||||
displayName = "$STR_controls_tooltips_RELOAD_MAGAZINE";
|
||||
condition = QUOTE(call FUNC(canSwapTurretMagazine));
|
||||
statement = QUOTE(call FUNC(swapTurretMagazine));
|
||||
icon = "\A3\ui_f\data\igui\cfg\simpletasks\types\rearm_ca.paa";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Air;
|
||||
class Helicopter: Air {
|
||||
class ACE_SelfActions {
|
||||
class GVAR(reloadTurret) {
|
||||
displayName = "$STR_controls_tooltips_RELOAD_MAGAZINE";
|
||||
condition = QUOTE(call FUNC(canSwapTurretMagazine));
|
||||
statement = QUOTE(call FUNC(swapTurretMagazine));
|
||||
icon = "\A3\ui_f\data\igui\cfg\simpletasks\types\rearm_ca.paa";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
16
addons/reload/CfgWeapons.hpp
Normal file
16
addons/reload/CfgWeapons.hpp
Normal file
@ -0,0 +1,16 @@
|
||||
class CfgWeapons {
|
||||
class HMG_01;
|
||||
class HMG_static: HMG_01 {
|
||||
type = 1; // makes it possible to swap to the fullest magazine
|
||||
};
|
||||
|
||||
class GMG_F;
|
||||
class GMG_20mm: GMG_F {
|
||||
type = 1;
|
||||
};
|
||||
|
||||
class CannonCore;
|
||||
class mortar_82mm: CannonCore {
|
||||
type = 1;
|
||||
};
|
||||
};
|
@ -1,7 +1,9 @@
|
||||
PREP(canCheckAmmo);
|
||||
PREP(canCheckAmmoSelf);
|
||||
PREP(canSwapTurretMagazine);
|
||||
PREP(getAmmoToLinkBelt);
|
||||
PREP(checkAmmo);
|
||||
PREP(displayAmmo);
|
||||
PREP(onTake);
|
||||
PREP(startLinkingBelt);
|
||||
PREP(swapTurretMagazine);
|
||||
|
@ -53,3 +53,18 @@
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
#include "initKeybinds.inc.sqf"
|
||||
|
||||
// Reload when default reload keybind is pressed
|
||||
addUserActionEventHandler ["ReloadMagazine", "Activate", {
|
||||
private _vehicle = objectParent ACE_player;
|
||||
|
||||
// If on foot, skip
|
||||
if (isNull _vehicle) exitWith {};
|
||||
|
||||
// weaponState is only updated after 3 frames, so wait to run checks in case we're doing an engine reload at the same time
|
||||
[{
|
||||
if !(_this call FUNC(canSwapTurretMagazine)) exitWith {};
|
||||
|
||||
_this call FUNC(swapTurretMagazine);
|
||||
}, [_vehicle, ACE_player], 3] call CBA_fnc_execAfterNFrames;
|
||||
}];
|
||||
|
@ -14,10 +14,11 @@ class CfgPatches {
|
||||
};
|
||||
};
|
||||
|
||||
#include "ACE_Arsenal_Stats.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgMagazines.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgActions.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgMagazines.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "ACE_Arsenal_Stats.hpp"
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "ACE_UI.hpp"
|
||||
|
52
addons/reload/functions/fnc_canSwapTurretMagazine.sqf
Normal file
52
addons/reload/functions/fnc_canSwapTurretMagazine.sqf
Normal file
@ -0,0 +1,52 @@
|
||||
#include "..\script_component.hpp"
|
||||
/*
|
||||
* Author: PabstMirror, johnb43
|
||||
* Check if the player can reload their vehicle's magazine to one with more ammo.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Vehicle <OBJECT>
|
||||
* 1: Player <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Can swap turret magazine <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [vehicle player, player] call ace_reload_fnc_canSwapTurretMagazine
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_vehicle", "_unit"];
|
||||
TRACE_2("canSwapTurretMagazine",_vehicle,_unit);
|
||||
|
||||
private _turretPath = _vehicle unitTurret _unit;
|
||||
if (_turretPath in [[-1], []]) exitWith {false}; // skip driver / cargo
|
||||
if !(_vehicle turretLocal _turretPath) exitWith {false}; // just to be safe
|
||||
|
||||
(weaponState [_vehicle, _turretPath]) params ["_weapon", "_muzzle", "", "_magazine", "_ammoCount", "_roundReloadPhase", "_magazineReloadPhase"];
|
||||
TRACE_5("",_weapon,_muzzle,_magazine,_ammoCount,typeOf _vehicle);
|
||||
|
||||
if ((_weapon == "") || {_weapon != _muzzle}) exitWith {false}; // skip multi-muzzle (he/ap auto-cannons)
|
||||
if (_magazine == "") exitWith {false};
|
||||
if (_roundReloadPhase + _magazineReloadPhase != 0) exitWith {false}; // can't reload while already reloading or while shooting
|
||||
if (isText (configFile >> "CfgMagazines" >> _magazine >> "pylonWeapon")) exitWith {false};
|
||||
if (getNumber (configFile >> "CfgWeapons" >> _weapon >> "type") % 2 == 1) exitWith {false}; // engine support for magazine swapping
|
||||
|
||||
private _maxAmmo = getNumber (configFile >> "CfgMagazines" >> _magazine >> "count");
|
||||
if ((_ammoCount == 0) || {_ammoCount == _maxAmmo}) exitWith {false};
|
||||
|
||||
private _magAmmoCounts = [];
|
||||
|
||||
// Get count of rounds in magazines
|
||||
{
|
||||
_x params ["_xMag", "_xTurret", "_xAmmo"];
|
||||
|
||||
if ((_xMag == _magazine) && {_xTurret isEqualTo _turretPath}) then {
|
||||
_magAmmoCounts pushBack _xAmmo;
|
||||
};
|
||||
} forEach (magazinesAllTurrets _vehicle);
|
||||
|
||||
TRACE_1("",_magAmmoCounts);
|
||||
|
||||
// Select maximum
|
||||
(selectMax _magAmmoCounts) > _ammoCount
|
43
addons/reload/functions/fnc_swapTurretMagazine.sqf
Normal file
43
addons/reload/functions/fnc_swapTurretMagazine.sqf
Normal file
@ -0,0 +1,43 @@
|
||||
#include "..\script_component.hpp"
|
||||
/*
|
||||
* Author: PabstMirror, johnb43
|
||||
* Reloads a vehicles turret to a new magazine.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Vehicle <OBJECT>
|
||||
* 1: Player <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [vehicle player, player] call ace_reload_fnc_swapTurretMagazine
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_vehicle", "_unit"];
|
||||
TRACE_2("swapTurretMagazine",_vehicle,_unit);
|
||||
|
||||
private _turretPath = _vehicle unitTurret _unit;
|
||||
(weaponState [_vehicle, _turretPath]) params ["_weapon", "_muzzle", "", "_magazine"];
|
||||
TRACE_3("",_weapon,_magazine,typeOf _vehicle);
|
||||
|
||||
private _magazinesAllTurrets = [];
|
||||
|
||||
// Get magazines that are of the correct type; Exclude empty mags
|
||||
{
|
||||
_x params ["_xMag", "_xTurret", "_xAmmo"];
|
||||
|
||||
if ((_xMag == _magazine) && {_xTurret isEqualTo _turretPath} && {_xAmmo > 0}) then {
|
||||
_magazinesAllTurrets pushBack _x;
|
||||
};
|
||||
} forEach (magazinesAllTurrets _vehicle);
|
||||
|
||||
// Get count of rounds in magazines, then select maximum
|
||||
private _magAmmoCounts = _magazinesAllTurrets apply {_x select 2};
|
||||
private _mag = _magazinesAllTurrets select (_magAmmoCounts find (selectMax _magAmmoCounts));
|
||||
|
||||
TRACE_2("",_magAmmoCounts,_mag);
|
||||
|
||||
_unit action ["loadMagazine", _vehicle, _unit, _mag select 4, _mag select 3, _weapon, _muzzle];
|
@ -191,6 +191,9 @@ class CfgWeapons {
|
||||
class LMG_03_F: LMG_03_Base_F {
|
||||
magazineReloadTime = 0; // Fix for reloading every time weapon is equipped
|
||||
};
|
||||
class LMG_03_Vehicle_F: LMG_03_F {
|
||||
magazineReloadTime = 5.8; // Should be same as LMG_03_Base_F
|
||||
};
|
||||
|
||||
// Sniper and anti-materiel rifles /////////////////////////////////
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 137 KiB |
BIN
docs/img/wiki/feature/atragmx1ab.webp
Normal file
BIN
docs/img/wiki/feature/atragmx1ab.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 436 KiB |
BIN
docs/img/wiki/feature/atragmx1db.webp
Normal file
BIN
docs/img/wiki/feature/atragmx1db.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 339 KiB |
@ -22,7 +22,7 @@ Horus ATragMX software considers atmospheric conditions, gun data, ammunition, r
|
||||
|
||||
## 2. Requirement
|
||||
|
||||
- [Advanced Ballistics module enabled]({{ site.baseurl }}/wiki/feature/advanced-ballistics.html)
|
||||
- [Advanced Ballistics enabled]({{ site.baseurl }}/wiki/feature/advanced-ballistics.html)
|
||||
|
||||
|
||||
## 3. Usage
|
||||
@ -31,9 +31,9 @@ Horus ATragMX software considers atmospheric conditions, gun data, ammunition, r
|
||||
|
||||
#### 3.1.1 Interaction Menu
|
||||
|
||||
- Open the self interaction menu <kbd>Ctrl</kbd> + <kbd>⊞ Win</kbd>
|
||||
- Select `Equipment`
|
||||
- Select `Open AtragMx`
|
||||
- Open the self interaction menu <kbd>Ctrl</kbd> + <kbd>⊞ Win</kbd>.
|
||||
- Select `Equipment`.
|
||||
- Select `Open AtragMx`.
|
||||
|
||||
#### 3.1.2 Custom key
|
||||
|
||||
@ -43,43 +43,66 @@ Horus ATragMX software considers atmospheric conditions, gun data, ammunition, r
|
||||
|
||||
**Start of the mission:**
|
||||
|
||||
- Open the [Range Card]({{ site.baseurl }}/wiki/feature/rangecard.html) and check the cartridge, the zeroed distance, the rifle twist, the muzzle velocity at 15°C and the bore height.
|
||||
- Open the [Range Card]({{ site.baseurl }}/wiki/feature/rangecard.html) and check the ammunition: bullet diameter, bullet weight, rifle twist, muzzle velocity at 15°C, zeroed distance and bore height.
|
||||
|
||||
<img src="{{ site.baseurl }}/img/wiki/feature/atragmx1.webp" width="1400" height="600" alt="Range card" />
|
||||
<img src="{{ site.baseurl }}/img/wiki/feature/atragmx1ab.webp" width="1400" height="600" alt="Range card" />
|
||||
|
||||
- Open the AtragMx and the `Atmsphr` column, select `Default` and `Done`. [[Manual]](https://horusvision.com/download/manual_Horus_ATrag-v385.pdf#page=15)
|
||||
- `Open Gun` the 7.62x51mm M80 in the `GunList`. [[Manual]](https://horusvision.com/download/manual_Horus_ATrag-v385.pdf#page=25)
|
||||
- Select `E` (English unit) at the top right. [[Manual]](https://horusvision.com/download/manual_Horus_ATrag-v385.pdf#page=10)
|
||||
- Open the `Gun` column, check and update the `Bore`, the `Rifle Twist` and `Done`.
|
||||
- Open the AtragMx and the `Atmsphr` column, select `Default` and `Done`.
|
||||
- `Open Gun` the 7.62x51mm M80 in the `GunList`.
|
||||
- Select `E` (English unit) at the top right.
|
||||
- Open the `Gun` column, check and update the `Bore (inches)`, `Bullet Weight (grains)`, `Bullet Diam (inches)`, `Rifle Twist (in/trn)` and `Done`.
|
||||
- Select `M` (Metric unit) at the top right.
|
||||
- Open the `Gun` column, check and update the `Muzzle Velocity`, the `Zero Range` and `Done`.
|
||||
- *The Muzzle Velocity Table will be automatically updated.* [[Manual]](https://horusvision.com/download/manual_Horus_ATrag-v385.pdf#page=22)
|
||||
- *(Must be edited manually for specific cartridges according with the range card)*
|
||||
- Open the `Gun` column, check and update the `Muzzle Velocity (m/s)`, the `Zero Range (meters)` and `Done`.
|
||||
- *Muzzle Velocities (`Options` / `Muz Vel table`) may need a manual update according to the range card.*
|
||||
- *AtragMx is configured with `C1 coefficient` according to vanilla weapons and its ammunitions in `GunList`.*
|
||||
- *More information about C1: [Example with `Add New Gun` in `GunList`](#35-example-with-add-new-gun-in-gunlist).*
|
||||
- Check `Elev` = 0 with `ZR` = `TR` *(if not, open `Gun` column and `Done`)*.
|
||||
- Optionally, `Save Gun` and `Done` in the `GunList`.
|
||||
|
||||
|
||||
**In position:**
|
||||
|
||||
- Update the `Atmsphr` column with the [Kestrel 4500]({{ site.baseurl }}/wiki/feature/kestrel4500.html) and `Done`.
|
||||
- Update the `Atmsphr` column and `Done`. Requirement: [Kestrel 4500]({{ site.baseurl }}/wiki/feature/kestrel4500.html).
|
||||
- *Check the new `Muzzle Velocity` in the `Gun` column.*
|
||||
- Update the `Target` column (the [wind arrow]({{ site.baseurl }}/wiki/feature/weather.html) will also help). [[1]](https://horusvision.com/download/manual_Horus_ATrag-v385.pdf#page=16) [[2]](https://horusvision.com/download/manual_Horus_ATrag-v385.pdf#page=30) [[3]](https://horusvision.com/download/manual_Horus_ATrag-v385.pdf#page=32) [[4]](https://horusvision.com/download/manual_Horus_ATrag-v385.pdf#page=33)
|
||||
- *The latitude for all common maps can be found in the [ACE3 Github]({{ site.ace.githubUrl }}/blob/master/addons/common/functions/fnc_getMapData.sqf).*
|
||||
- Apply the vertical and horizontal elevations on the [scope]({{ site.baseurl }}/wiki/feature/scopes.html).
|
||||
- Control the breath and press.
|
||||
|
||||
- Update the `Target` column and `Done`. Requirement: [wind arrow]({{ site.baseurl }}/wiki/feature/weather.html), [Protractor]({{ site.baseurl }}/wiki/feature/advanced-ballistics#22-protractor.html), [Map Tools]({{ site.baseurl }}/wiki/feature/maptools.html). For advanced tools: [ACE3 Equipment]({{ site.baseurl }}/wiki/feature.html).
|
||||
- `Latitude`: *[ACE3 Github]({{ site.ace.githubUrl }}/blob/master/addons/common/functions/fnc_getMapData.sqf) or Eden Editor's Extended Debug Console: Watch:* `ace_common_maplatitude`.
|
||||
- `Dir of Fire (deg from N)`: *The value is therefore given as the direction of the barrel axis from true north.* **[Horus manual p.14]**
|
||||
- `Wind speed (m/s)`: *Two wind speed values (low and high) may be entered on the target screen,[...] Lead/Wind2 button on the screen.* **[Horus manual p.32]**
|
||||
- *Wind takes into account geographic location, season, time of day, obstacles, altitude and surface roughness: [Wind Profile](https://wind-data.ch/tools/profile.php?lng=en).*
|
||||
- `Wind Direction (clock)`: *Wind Direction is expressed in clock points.[...], wind is always described in terms of where it is coming from.* **[Horus manual p.16]**
|
||||
- `Inclination Angle`: *The degrees field is marked with a “d” and the cosine field with a “c”.* **[Horus manual p.33]**
|
||||
- `Target Speed`: *Target Speed Assist* **[Horus manual p.21]**
|
||||
- `Target Range (meters)`: *Parameter Limits minimum and maximum values: 25 - 3700 meters.* **[Horus manual p.17]**
|
||||
- Apply vertical (Page Up and Down keys as default) and horizontal (Left Ctrl + Page Up and Down keys as default) elevations to the [scope]({{ site.baseurl }}/wiki/feature/scopes.html).
|
||||
- Hold Breath (Left Shift as default) and Fire (Prim. Mouse. Btn. as default).
|
||||
|
||||
### 3.3 Example with Truing tool
|
||||
|
||||
- Open the `Truing Drop` in the `Options` menu. [[Manual]](https://horusvision.com/download/manual_Horus_ATrag-v385.pdf#page=23)
|
||||
- Add the actual `Target Range` in the `SUPER` column and `Calc`.
|
||||
- Add the same `Target Range` in the `SUB` column and `Calc`.
|
||||
- Apply the actual scope elevation in the `Drop` field and `Calc`.
|
||||
- `Accept` the new `C1`, `Gun` column and `Elev` are updated.
|
||||
- *The Drag Coefficient Table will be automatically updated.* [[Manual]](https://horusvision.com/download/manual_Horus_ATrag-v385.pdf#page=22)
|
||||
- Optionally, `Save Gun` and `Done` in the `GunList`.
|
||||
|
||||
> This process is called “Truing Drop”, or simply “Truing”. It involves taking 2 or 3 real flight data points (finding bullet drop at 2 or 3 places along its flight) and feeding it into the calculation parameters. **[Horus manual p.23]**
|
||||
|
||||
> The Truing Drop function is opened from ATrag’s main screen by selecting “Options” [...], then selecting “Truing Drop” from the menu that appears. **[Horus manual p.23]**
|
||||
|
||||
> With C1, you can also insert the new BC into the C1 table (with the target range value), or you can replace the C1 table with the following values:
|
||||
> 1. first entry: Zero Range, original C1.
|
||||
> 2. second entry: range at 75% of distance between transonic start and subsonic start, with original C1.
|
||||
> 3. third entry: range 200 (y/m) beyond subsonic start, with new calculated C1. **[Horus manual p.24]**
|
||||
|
||||
- Basic example with ammunition 7.62x51mm G7 ballistic coefficient.
|
||||
- Open the AtragMx and the `Atmsphr` column, select `Default` and `Done`.
|
||||
- `Open Gun` a custom profile in the `GunList`.
|
||||
- *More information about custom profile: [Example with `Add New Gun` in `GunList`](#35-example-with-add-new-gun-in-gunlist).*
|
||||
- Check `Elev` = 0 with `ZR` = `TR` *(if not, open `Gun` column and `Done`)*.
|
||||
- Open the `Truing Drop` in the `Options` menu.
|
||||
- Add the actual `Target Range` in the `SUPER` column and `Calc`.
|
||||
- Add the same `Target Range` in the `SUB` column and `Calc`.
|
||||
- Apply the actual scope elevation in the `Drop` field and `Calc`.
|
||||
- `Accept` the new `C1`, `Gun` column and `Elev` are updated.
|
||||
- *C1 Ballistic Coefficient vs. Distance Interpolation Table (`Options` / `Drag Coef Table`) will be updated.*
|
||||
- Optionally, `Save Gun` and `Done` in the `GunList`.
|
||||
|
||||
<img src="{{ site.baseurl }}/img/wiki/feature/atragmx2.webp" width="1127" height="600" alt="Calculation" />
|
||||
|
||||
- If a new `Target Range` is applied in the `Target` column, the ballistic coefficient `C1` and the elevation `Elev` will be automatically recalculated.
|
||||
|
||||
|
||||
- If a new `Target Range` is applied in the `Target` column, the ballistic coefficient `C1` and the elevation `Elev` will be recalculated.
|
||||
|
||||
<img src="{{ site.baseurl }}/img/wiki/feature/atragmx31.webp" width="1123" height="600" alt="Interpolation" />
|
||||
|
||||
<img src="{{ site.baseurl }}/img/wiki/feature/atragmx31a.webp" width="1123" height="600" alt="Extrapolation" />
|
||||
@ -87,23 +110,26 @@ Horus ATragMX software considers atmospheric conditions, gun data, ammunition, r
|
||||
### 3.4 Example with overwritten zero distance
|
||||
|
||||
- The `Default zero distance` can be overwritten with the [Scopes Options]({{ site.baseurl }}/wiki/feature/scopes.html), the [Scopes Framework]({{ site.baseurl }}/wiki/framework/scopes-framework.html) or the [CBA Settings System](https://github.com/CBATeam/CBA_A3/wiki/CBA-Settings-System).
|
||||
- In this case, the [Range Card]({{ site.baseurl }}/wiki/feature/rangecard.html) will be automatically updated, NOT the AtragMx.
|
||||
- Open the AtragMx and the `Atmsphr` column, select `Default` and `Done`. [[Manual]](https://horusvision.com/download/manual_Horus_ATrag-v385.pdf#page=15)
|
||||
- In this case, the [Range Card]({{ site.baseurl }}/wiki/feature/rangecard.html) will be updated, **NOT the AtragMx**.
|
||||
- Open the AtragMx and the `Atmsphr` column, select `Default` and `Done`.
|
||||
- Open the `Gun` column, check and update the `Zero Range` and `Done`.
|
||||
|
||||
- Check `Elev` = 0 with `ZR` = `TR` *(if not, open `Gun` column and `Done`)*.
|
||||
- Optionally, `Save Gun` and `Done` in the `GunList`.
|
||||
|
||||
<img src="{{ site.baseurl }}/img/wiki/feature/atragmx41.webp" width="1400" height="600" alt="Zero distance 300m" />
|
||||
|
||||
### 3.5 Example with `Add New Gun` in `GunList`
|
||||
|
||||
- Open the [Range Card]({{ site.baseurl }}/wiki/feature/rangecard.html) and check the bullet diameter, the bullet weight, the **(bullet Class Name)** and the muzzle velocities.
|
||||
- Open the AtragMx and the `Atmsphr` column, select `Default` and `Done`. [[Manual]](https://horusvision.com/download/manual_Horus_ATrag-v385.pdf#page=15)
|
||||
- Select `Add New Gun` in the `GunList`. [[Manual]](https://horusvision.com/download/manual_Horus_ATrag-v385.pdf#page=25)
|
||||
- Open the [Range Card]({{ site.baseurl }}/wiki/feature/rangecard.html) and check the ammunition: **bullet Class Name**, bullet diameter, bullet weight, rifle twist, muzzle velocities, zeroed distance and bore height.
|
||||
- Open the AtragMx and the `Atmsphr` column, select `Default` and `Done`.
|
||||
- Select `Add New Gun` in the `GunList`.
|
||||
- Add a `New Gun Name` and `Open Gun`.
|
||||
- Select `E` (English unit) at the top right. [[Manual]](https://horusvision.com/download/manual_Horus_ATrag-v385.pdf#page=10)
|
||||
- Open the `Gun` column, check and update the `Bullet Weight (grains)`, the `Bullet Diam (inches)` and `Done`.
|
||||
- Select `E` (English unit) at the top right.
|
||||
- Open the `Gun` column, check and update the `Bore (inches)`, `Bullet Weight (grains)`, `Bullet Diam (inches)`, `Rifle Twist (in/trn)` and `Done`.
|
||||
- Select `M` (Metric unit) at the top right.
|
||||
- Open the `Muz Vel Table` in the `Options` menu or click on `MV` in the `Gun` column.
|
||||
- Edit manually the `Muzzle Velocity Table` according with the [Range Card]({{ site.baseurl }}/wiki/feature/rangecard.html) and `Done`. [[Manual]](https://horusvision.com/download/manual_Horus_ATrag-v385.pdf#page=22)
|
||||
- Open the `Gun` column, check and update the `Zero Range (meters)` and `Done`.
|
||||
- Open the `Muz Vel Table` in the `Options` menu or click on `MV` in the `Gun` column.
|
||||
- Edit manually the `Muzzle Velocity Table` according to the [Range Card]({{ site.baseurl }}/wiki/feature/rangecard.html) and `Done`.
|
||||
- The `C1 coefficient` of the bullet can be found with the Eden Editor `Config Viewer`:
|
||||
|
||||
> configfile >> "CfgAmmo" >> "**bullet Class Name**" >> "ACE_ballisticCoefficients"
|
||||
@ -112,26 +138,92 @@ Horus ATragMX software considers atmospheric conditions, gun data, ammunition, r
|
||||
|
||||
- *The AtragMx accepts only **G1 ballistic coefficient**.*
|
||||
- *G7 ballistic coefficient can be converted, for example, with the online [JBM Ballistics Calculators](http://www.jbmballistics.com/cgi-bin/jbmgf-5.1.cgi)*.
|
||||
- Check `Elev` = 0 with `ZR` = `TR` *(if not, open `Gun` column and `Done`)*.
|
||||
- Optionally, `Save Gun` and `Done` in the `GunList`.
|
||||
|
||||
> Note: The ballistic coefficient can be calculated by using the [360 Degree Training Course mission](#5-resources) as a chronograph at different distances and [JBM Ballistics Calculators](http://www.jbmballistics.com/cgi-bin/jbmbcv-5.1.cgi) for example, an another ballistic software at your own convenience, or the [AtragMx Truing Tool](#33-example-with-truing-tool).
|
||||
|
||||
> Note: The ballistic coefficient can be calculated by using the [360 Degree Training Course mission](https://forums.bistudio.com/forums/topic/171228-sp-360-degree-training-course/) as a chronograph at different distances and [JBM Ballistics Calculators](http://www.jbmballistics.com/cgi-bin/jbmbcv-5.1.cgi) for example, an another ballistic software at your own convenience, or the [AtragMx Truing Tool](#33-example-with-truing-tool).
|
||||
|
||||
> Example direct conversion with .408 Cheytac 305 grains G7 BC 0.279 at 2000 meters 15°C:
|
||||
> Example direct conversion with .408 Cheytac 305 grains, G7 BC 0.279 at 2000 meters, ICAO conditions (15°C, 1013.25hPa, 0%):
|
||||
|
||||
<img src="{{ site.baseurl }}/img/wiki/feature/atragmx5.webp" width="1400" height="600" alt="Conversion G7/G1 BC" />
|
||||
|
||||
### 3.6 Adding ATragMX Presets
|
||||
### 3.6 Connecting AtragMx with Vector 21 and DAGR
|
||||
|
||||
- [ATragMX Framework]({{ site.baseurl }}/wiki/framework/atragmx.html)
|
||||
- Requirement: [Vector]({{ site.baseurl }}/wiki/framework/vector.html) and [DAGR]({{ site.baseurl }}/wiki/framework/dagr.html).
|
||||
- Open the self interaction menu <kbd>Ctrl</kbd> + <kbd>⊞ Win</kbd>.
|
||||
- Select `Equipment`.
|
||||
- Select `Configure DAGR` and `CONNECT TO` (DOWN and HELP/SEL) `Vector 21`(HELP/SEL).
|
||||
- Equip and use the Vector (B key as default).
|
||||
- Check target's [slope distance and azimuth]({{ site.baseurl }}/wiki/feature/vector#23-slope-distance-and-azimuth.html) (hold both R and Tab keys as default).
|
||||
- Open the [AtragMx properly configured before]({{ site.baseurl }}/wiki/feature/atragmx#32-example-with-m14-and-default-762mm-20rnd-mag.html) according to current rifle and ammunition.
|
||||
- Open the `Target` column: `Dir of Fire (deg from N)`, `Inclination Angle` and `Target Range (meters)` updated with Vector's values.
|
||||
|
||||
### 3.7 Reseting the AtragMx `GunList`
|
||||
### 3.7 Adding AtragMx Presets
|
||||
|
||||
- Open the Eden Editor and the Extended Debug Console (Ctrl+D).
|
||||
- Execute `call ace_atragmx_fnc_clear_user_data` (LOCAL EXEC).
|
||||
- [AtragMx Framework]({{ site.baseurl }}/wiki/framework/atragmx.html)
|
||||
|
||||
> Scope Base Angle value:
|
||||
> - Open the AtragMx and the `Atmsphr` column, select `Default` and `Done`.
|
||||
> - `Open Gun` the custom profile (with an arbitrary scope base angle) in the `GunList`.
|
||||
> - Check `Elev` value with `ZR` = `TR`.
|
||||
> - Open the `Gun` column and `Done`.
|
||||
> - Execute `copyToClipboard Str(ace_atragmx_workingMemory select 3);` [LOCAL EXEC] with the Eden Editor's Extended Debug Console.
|
||||
> - Paste new value to the `preset`.
|
||||
> - After new test, check `Elev` = 0 with `ZR` = `TR`.
|
||||
|
||||
### 3.7 Reseting AtragMx `GunList`
|
||||
|
||||
- Open the Eden Editor's Extended Debug Console.
|
||||
- Execute `call ace_atragmx_fnc_clear_user_data` or `call ace_atragmx_fnc_initGunList` [LOCAL EXEC], (`RESTART` eventually needed).
|
||||
- The original ACE3 `GunList` will be restored (all `Add New Gun` entries deleted).
|
||||
|
||||
### 3.8 Example with AtragMx and default ballistic (M14, 7.62mm 20Rnd Mag)
|
||||
|
||||
> Note: ACE3 has two external ballistics, the vanilla default ballistic (enabled as default) and the [Advanced Ballistics]({{ site.baseurl }}/wiki/feature/advanced-ballistics.html) (must be enabled). The ACE3 default ballistic doesn't take atmospheric conditions (except wind), powder temperature, rifle twist and Earth effects into account. The AtragMx will need for `Gun` column: `Bore`, `C1 Coefficient`, `Muzzle Velocity` and `Zero Range`. With `Target` column, `Latitude` and `Dir of Fire` are useless. `Atmsphr` column must not be updated.
|
||||
|
||||
**Start of the mission:**
|
||||
|
||||
- Open the [Range Card]({{ site.baseurl }}/wiki/feature/rangecard.html) and check the ammunition: **bullet Class Name**, muzzle velocity, zeroed distance and bore height.
|
||||
|
||||
<img src="{{ site.baseurl }}/img/wiki/feature/atragmx1db.webp" width="1400" height="600" alt="Range card" />
|
||||
|
||||
- Open the AtragMx and the `Atmsphr` column, select `Default` and `Done`.
|
||||
- Select `E` (English unit) at the top right.
|
||||
- Open the `Gun` column, check and update the `Bore (inches)` and `Done`.
|
||||
- Select `M` (Metric unit) at the top right.
|
||||
- Open the `Gun` column, check and update the `Muzzle Velocity (m/s)`, the `Zero Range (meters)` and `Done`.
|
||||
- `C1 coefficient` of the bullet = `airFriction x -1000`.
|
||||
- `airFriction` can be found with the Eden Editor `Config Viewer`:
|
||||
|
||||
> configfile >> "CfgAmmo" >> "**bullet Class Name**" >> "airFriction"
|
||||
|
||||
- *AtragMx is configured with `C1 coefficient` according to vanilla weapons and its ammunitions in `GunList`.*
|
||||
- *Spin drift and Earth effects not taken into account, `Options` / `Show Coriolis` can be disabled.*
|
||||
- Check `Elev` = 0 with `ZR` = `TR` *(if not, open `Gun` column and `Done`)*.
|
||||
- Optionally, `Save Gun` and `Done` in the `GunList`.
|
||||
|
||||
**In position:**
|
||||
|
||||
- **Do not update the `Atmsphr` column.** Default ballistic doesn't take into account temperature, pressure and humidity.
|
||||
- Update the `Target` column and `Done`. Requirement: [wind arrow]({{ site.baseurl }}/wiki/feature/weather.html), [Protractor]({{ site.baseurl }}/wiki/feature/advanced-ballistics#22-protractor.html), [Map Tools]({{ site.baseurl }}/wiki/feature/maptools.html). For advanced tools: [ACE3 Equipment]({{ site.baseurl }}/wiki/feature.html).
|
||||
- `Wind speed (m/s)`: *Two wind speed values (low and high) may be entered on the target screen,[...] Lead/Wind2 button on the screen.* **[Horus manual p.32]**
|
||||
- *Wind takes into account geographic location, season, time of day and obstacles.*
|
||||
- `Wind Direction (clock)`: *Wind Direction is expressed in clock points.[...], wind is always described in terms of where it is coming from.* **[Horus manual p.16]**
|
||||
- `Inclination Angle`: *The degrees field is marked with a “d” and the cosine field with a “c”.* **[Horus manual p.33]**
|
||||
- `Target Speed`: *Target Speed Assist* **[Horus manual p.21]**
|
||||
- `Target Range (meters)`: *Parameter Limits minimum and maximum values: 25 - 3700 meters.* **[Horus manual p.17]**
|
||||
- Apply vertical (Page Up and Down keys as default) and horizontal (Left Ctrl + Page Up and Down keys as default) elevations to the [scope]({{ site.baseurl }}/wiki/feature/scopes.html).
|
||||
- Hold Breath (Left Shift as default) and Fire (Prim. Mouse. Btn. as default).
|
||||
|
||||
|
||||
## 4. Official References
|
||||
|
||||
- [Official Manual]({{ site.ace.githubUrl }}/blob/master/extras/manual_Horus_ATrag-v385.pdf)
|
||||
- [Horus AtragMx Manual]({{ site.ace.githubUrl }}/blob/master/extras/manual_Horus_ATrag-v385.pdf)
|
||||
|
||||
|
||||
## 5. Resources
|
||||
|
||||
Missions by Ruthberg, author of Advanced Ballistics and its tools:
|
||||
|
||||
- Arma3 Missions folder: [360 Degree Training Course v1.3]({{ site.ace.githubUrl }}/blob/master/extras/ruthberg_missions/360_Degree_Training_Course-Missions.zip), *[Features](https://forums.bistudio.com/forums/topic/171228-sp-360-degree-training-course/)*
|
||||
- Eden Editor mission: [360 Degree Training Course Framework]({{ site.ace.githubUrl }}/blob/master/extras/ruthberg_missions/360_Degree_Training_Course-Framework.zip)
|
||||
|
@ -402,6 +402,8 @@ For actions involving frame delays or timers, a second call of the `ace_arsenal_
|
||||
|
||||
Since CBA frame functions are deactivated during preInit as of Oct 24th 2023, the refresh function is executed immediatelly after the action code is executed. Take note of this information and the comment below if you'd like your actions to be usable in 3DEN.
|
||||
|
||||
By default actions are updated whenever the arsenal is refreshed (`ace_arsenal_fnc_refresh`) and whenever item info (the bottom right GUI element that shows item name and author) is updated. If any action with the `updateOnCargoChanged` property is added, then actions will also be updated on container inventory changes.
|
||||
|
||||
### 7.1 Adding actions via config
|
||||
|
||||
```cpp
|
||||
@ -410,6 +412,7 @@ class ace_arsenal_actions {
|
||||
displayName = "My Actions";
|
||||
condition = QUOTE(true);
|
||||
scopeEditor = 2; // Only actions with scopeEditor = 2 are shown in 3DEN. Actions working with variables should take object variables being reset between editor view and mission start into account.
|
||||
updateOnCargoChanged = 1; // See comment above.
|
||||
tabs[] = {0,5};
|
||||
class text {
|
||||
// A simple text label
|
||||
@ -417,6 +420,7 @@ class ace_arsenal_actions {
|
||||
};
|
||||
class statement {
|
||||
// Statement output as text
|
||||
// Return can be string or array of strings: for array each entry is automatically displayed on a separate line
|
||||
textStatement = QUOTE([_this select 0] call tag_fnc_myTextStatement);
|
||||
};
|
||||
class button {
|
||||
@ -441,6 +445,7 @@ The focused unit object is passed to the condition and statement functions.
|
||||
3 | Actions | Array of arrays | Required
|
||||
4 | Condition | Code | Optional (default: `{true}`)
|
||||
5 | Scope editor | Number | Optional (default: `2`)
|
||||
6 | Update on cargo change | Boolean | Optional (default: `false`)
|
||||
|
||||
Return Value:
|
||||
- Array of action IDs
|
||||
|
Binary file not shown.
BIN
extras/ruthberg_missions/360_Degree_Training_Course-Missions.zip
Normal file
BIN
extras/ruthberg_missions/360_Degree_Training_Course-Missions.zip
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user