Arma 3
Dynamic Recon Ops - Altis
chazbotic Sep 12, 2021 @ 12:47pm
added ACE Arsenal
great mission framework and thanks for working on it so much over the years.

my group exclusively uses CBA/ACE3 et c so the BIS VA from the lobby and starting area was a "pain point".

so i went through and for instances where BIS_fnc_arsenal was called where it would have a complete VA, i added the appropriate ACE Arsenal calls. figured i'd share it with you :)

in initPlayerLocal.sqf, i added another action so that a player can "break out" of the ready menu and access the ACE Arsenal that way and have the action removed appropriately. i'm not ninja enough to mess with adding a button to the interface and have it not look ugly, so this works for us:

_actionID2 = player addAction ["<t color='#FFDF00'>Open ACE Arsenal</t>", { [player, player, true] call ACE_arsenal_fnc_openBox; }, nil, 7 ]; <some other code> player removeAction _actionID2;

initially for the openLobby script i had thought to directly replace VA with ACE, but i can see you're detecting the camera to know when VA is open/closed. while does does raise events, a first pass using an event handler to listen and proceed on closed messed with other things, so i opted to leave it be.

for resupply crates i did the following:

in sundayFunctions.sqf
sun_addArsenal = { (_this select 0) addAction ["Arsenal", "['Open', true] call BIS_fnc_arsenal", nil, 6]; [(_this select 0), true] call ACE_arsenal_fnc_initBox; };

in setPlayersBase.sqf (so players can use the resupply crate for additional ACE barbie time stuff if the base location is created):
// Supply crates <some code> ["AmmoboxInit", [_resupply, true]] spawn BIS_fnc_arsenal; [_resupply, true] call ACE_arsenal_fnc_initBox;


and in setupPlayersFaction.sqf for the supply crate there:
["AmmoboxInit", [_box, true]] spawn BIS_fnc_arsenal; [_box, true] call ACE_arsenal_fnc_initBox; [_box] spawn { waitUntil {(missionNameSpace getVariable ["playersReady", 0]) == 1}; [(_this select 0)] call sun_supplyBox; };

for our gameplay i purposely omitted adding it to the resupply crate that you can call in as a support since that already scans and adds magazines, et c
< >
Showing 1-1 of 1 comments
chazbotic Sep 12, 2021 @ 1:35pm 
btw this is where i was toying around with the openArsenal.sqf script to use an event listener, but while it works, it's ugly and the camera is changed from the third person "arsenal" camera to the unit's 1st person view too soon for some reason, maybe as an artifact of selectPlayer somehow.

<old code for VA commented out> _CHZ_arsenalDisplayOpened = ["ACE_arsenal_displayOpened", { private _debug = (_thisArgs select 0); private _unit = (_thisArgs select 1); if (_debug) then {systemChat "Arsenal opened."}; _unit setVariable ["CHZ_arsenalDisplayOpened", true, true]; }, [_debug, _unit]] call CBA_fnc_addEventHandlerArgs; _CHZ_arsenalDisplayClosed = ["ACE_arsenal_displayClosed", { private _debug = (_thisArgs select 0); private _unit = (_thisArgs select 1); if (_debug) then {systemChat "Arsenal closed."}; _unit setVariable ["CHZ_arsenalDisplayOpened", false, true]; }, [_debug, _unit]] call CBA_fnc_addEventHandlerArgs; [_unit, _unit, true] call ACE_arsenal_fnc_openBox; waitUntil {(_unit getVariable ["CHZ_arsenalDisplayOpened", false])}; waitUntil {!(_unit getVariable ["CHZ_arsenalDisplayOpened", false])}; <more code with selectPlayer and return to lobby dialog>
< >
Showing 1-1 of 1 comments
Per page: 1530 50