### Install Project Gems Source: https://github.com/acemod/ace3/blob/master/docs/README.md Installs all the Ruby gems required by the project using Bundler. Ensure Bundler is installed first. ```bash bundle install ``` -------------------------------- ### Create Slideshow Example Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/slideshow-framework.md This example demonstrates how to create a slideshow with specific screen objects, controller objects, image paths, action names, slide duration, set name, and texture selection. ```sqf [object1, object2], [controller1], ["images\image1.paa", "images\image2.paa"], ["Action1", "Action2"], 5, "My Slides", 1] call ace_slideshow_fnc_createSlideshow; ``` -------------------------------- ### Install Node Packages Source: https://github.com/acemod/ace3/blob/master/docs/README.md Installs necessary Node.js packages for the project. Ensure Node.js is installed. ```bash npm install ``` -------------------------------- ### Whitelist Example 1 Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/checkPBOs-framework.md Example whitelist for the '@cyp_pushtohear_a3' mod. ```plaintext ["cyp_pushtohear_a3"] ``` -------------------------------- ### Map Slideshow Example Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/slideshow-framework.md This example shows how to create a slideshow using procedurally generated map images. It initializes textures with default and custom parameters and then uses them to create a slideshow on specified objects. ```sqf tex1 = [] call ace_slideshow_fnc_mapImage; tex2 = [(getPos aWhiteboard), 0.5, [[getpos aWhiteboard, "you", "mil_start"]], 0] call ace_slideshow_fnc_mapImage; tex3 = [[4000, 4000], 0.5, [[[5000, 5000], "target", "mil_objective"]], 2] call ace_slideshow_fnc_mapImage; [[aWhiteboard], [], [tex1, tex2, tex3], ["Full", "Sat Start", "Sat Objective"]] call ace_slideshow_fnc_createSlideshow; ``` -------------------------------- ### Example: Target Event Usage Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/events-framework.md Demonstrates adding an event handler and then calling it on a target machine. ```sqf // Event handler added on a target machine ["ace_interact_tapShoulder", ace_example_fnc_onTapShoulder] call CBA_fnc_addEventHandler; // Event called on another machine (tapping above target machine) ["ace_interact_tapShoulder", [arguments], [target]] call CBA_fnc_targetEvent; ``` -------------------------------- ### Install cargo-make Source: https://github.com/acemod/ace3/blob/master/docs/wiki/development/extension-guidelines.md Installs the cargo-make tool, which is used for managing build tasks. Ensure to use the --force flag if a previous version is already installed. ```bash cargo install --no-default-features --force cargo-make ``` -------------------------------- ### Map Slideshow Advanced Example Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/slideshow-framework.md This advanced example demonstrates creating a map slideshow with a custom initialization code that adds a draw event handler and live map updates using per-frame handlers. It then creates a slideshow on specified objects using the generated map texture. ```sqf private _initCode = { params ["_map", "", "_displayID"]; // Add custom draw event handler (will only be called when display is actually updated) _map ctrlAddEventHandler ["draw", { params ["_map"]; _map drawIcon ["\A3\Drones_F\Air_F_Gamma\UAV_02\Data\UI\Map_UAV_02_CA.paa", [0, 0, 1, 1], getPos theUAV, 24, 24, getDir theUAV]; }]; // Live update the map [{ params ["_displayID","_idPFH"]; private _display = findDisplay _displayID; if (isNull _display) exitWith { systemChat format ["%1 - removing pfeh", _this]; [_idPFH] call CBA_fnc_removePerFrameHandler; }; displayUpdate _display; private _map = _display displayCtrl 1; _map ctrlMapAnimAdd [0, 0.3, getpos theUAV]; ctrlMapAnimCommit _map; }, 0, _displayID ] call CBA_fnc_addPerFrameHandler; }; tex4 = [nil, 0.3, [[getpos aComputer, "you", "mil_start"]], 2, _initCode] call ace_slideshow_fnc_mapImage; [[aComputer, aComputer2], [], [tex4], ["Sat Follow UAV"]] call ace_slideshow_fnc_createSlideshow; ``` -------------------------------- ### Whitelist Example 2 Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/checkPBOs-framework.md Example whitelist for the '@BC-Phoenix' mod, listing specific CfgPatches classes. ```plaintext ["blastcore_sun", "blastcore_smokecs", "warfxpe", "blastcore_vep"] ``` -------------------------------- ### Install Ruby 2.0 and Related Packages Source: https://github.com/acemod/ace3/blob/master/docs/README.md Installs a specific Ruby version (2.0) and development headers, along with a tool to manage Ruby versions. ```bash sudo apt-add-repository ppa:brightbox/ruby-ng sudo apt-get update sudo apt-get install ruby2.0 ruby2.0-dev ruby-switch ``` -------------------------------- ### Build and Run Jekyll Docker Container Source: https://github.com/acemod/ace3/blob/master/docs/README.md Builds and starts the Jekyll development server within a Docker container. Requires Docker and Docker Compose to be installed. ```bash docker-compose up ``` -------------------------------- ### Install Development Tools on Debian/Ubuntu Source: https://github.com/acemod/ace3/blob/master/docs/README.md Installs essential build tools like make and gcc, required for compiling certain Ruby gems. ```bash sudo apt-get install make gcc ``` -------------------------------- ### Whitelist Example 4 (Regex) Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/checkPBOs-framework.md Example whitelist for JSRS Soundmod using a Regex pattern to match multiple addons. ```plaintext ["jsrs_soundmod_2025_.+"] ``` -------------------------------- ### Navigate to ACE3 Docs Directory Source: https://github.com/acemod/ace3/blob/master/docs/README.md Change your current directory to the main docs folder for Docker or manual Jekyll setup. ```bash cd /docs ``` -------------------------------- ### Whitelist Example 3 Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/checkPBOs-framework.md Combined whitelist for '@cyp_pushtohear_a3' and '@BC-Phoenix' mods. ```plaintext ["cyp_pushtohear_a3", "blastcore_sun", "blastcore_smokecs", "warfxpe", "blastcore_vep"] ``` -------------------------------- ### Wardrobe Configuration with Macros Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/wardrobe-framework.md Example of how to configure ACE Wardrobe items using macros, including including necessary header files and defining base classes. ```cpp #include "\z\ace\addons\wardrobe\script_macros_wardrobe.hpp" class ace_wardrobe { // Remove unused imported base classes once done class ace_wardrobe_base; class ace_wardrobe_base_H_visor_up; class ace_wardrobe_base_H_visor_down; class ace_wardrobe_base_H_goggles_on; class ace_wardrobe_base_H_goggles_off; class ace_wardrobe_base_H_mask_on; class ace_wardrobe_base_H_mask_off; class ace_wardrobe_base_U_sleeves_up; class ace_wardrobe_base_U_sleeves_down; class ace_wardrobe_base_U_gloves_on; class ace_wardrobe_base_U_gloves_off; class ace_wardrobe_base_U_jacket_open; class ace_wardrobe_base_U_jacket_closed; class ace_wardrobe_base_U_hood_raised; class ace_wardrobe_base_U_hood_lowered; // Begin to define your configs ... }; ``` -------------------------------- ### Install Bundler Gem Source: https://github.com/acemod/ace3/blob/master/docs/README.md Installs the Bundler gem, a dependency manager for Ruby projects. This is a prerequisite for installing project gems. ```bash gem install bundler ``` -------------------------------- ### Serve Jekyll Site Locally Source: https://github.com/acemod/ace3/blob/master/docs/README.md Starts the Jekyll development server with specific configurations for future posts, incremental builds, and a development configuration file. Use `--force_polling` on WSL if file watching fails. ```bash bundle exec jekyll serve --future --incremental --config _config_dev.yml ``` -------------------------------- ### Config String Macros Source: https://github.com/acemod/ace3/blob/master/docs/wiki/development/coding-guidelines.md Macros for defining configuration strings, which must start with a '$' and reference localized strings. ```ArmaScript "$STR_ACE_balls_banana" ``` ```ArmaScript "$STR_ACE_leg_banana" ``` -------------------------------- ### Launch Arma 3 with Test Build Modline Source: https://github.com/acemod/ace3/blob/master/docs/wiki/development/setting-up-the-development-environment.md Use this modline to start Arma 3 with the binarized test build. This build is meant for sharing and group testing. ```bash -mod=@CBA_A3;z\ace -skipIntro -noSplash -showScriptErrors -debug ``` -------------------------------- ### SQF Indentation Example Source: https://github.com/acemod/ace3/blob/master/docs/wiki/development/coding-guidelines.md Demonstrates correct indentation in SQF, where each new scope is indented by 4 spaces relative to the previous one. ```sqf call { call { if (/* condition */) then { /* code */ }; }; }; ``` -------------------------------- ### Connect Explosive Example Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/explosives-framework.md Use the `ace_explosives_fnc_connectExplosive` function to link an explosive object to a unit with a specified detonator type. ```sqf [player, claymore1, "ACE_Clacker"] call ace_explosives_fnc_connectExplosive; ``` -------------------------------- ### ACE Viewports Configuration Example Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/viewports-framework.md Defines custom viewport configurations for a vehicle. Use this to set up camera positions, attachment points, and other viewport properties for different roles within a vehicle. ```cpp class myVehicle { class ace_viewports { class Template { // type [STRING] - Optional type = ""; // camLocation [ARRAY or STRING] - Required camLocation = "memoryPointP1"; camLocation[] = {1,2,3}; // model offset // camAttach [ARRAY or NUMBER] - Required camAttach[] = {0,0}; // Turret path camAttach = 55; // Direction in degrees // screenLocation [ARRAY or STRING] - Optional screenLocation = "memoryPointP1x"; screenLocation[] = {1,2,3}; // maxDistance [NUMBER] - Optional maxDistance = 0.75; // compartments [ARRAY] - Optional compartments[]={"Compartment1"}; // roles [ARRAY] - Optional roles[]={"cargo"}; }; class periscope_0 { camLocation[] = {0.987915, -0.324707, -0.0673385}; camAttach = 70; roles[]={"cargo"}; }; class commandersView { screenLocation[] = {0.729126,-0.191597,-0.573349}; maxDistance = 5; type = "screen"; camLocation[] = {0,0,0.05}; camAttach[] = {0,0}; roles[]={"cargo"}; }; }; }; ``` -------------------------------- ### Configure Mission Parameters for ACE Settings Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/settings-framework.md Example of how to set up Mission Parameters in description.ext to dynamically control ACE3 settings. Ensure the parameter name matches the ACE setting and include the ACE_setting = 1 flag. Only BOOL or SCALAR settings are currently supported. ```cpp class Params { class ace_medical_level { //This needs to match an ace_setting, this one is a "SCALAR"(number) title = "Medical Level"; // Name that is shown ACE_setting = 1; //Marks param to be read as an ace setting, without this nothing will happen! values[] = {1, 2}; //Values that ace_medical_level can be set to texts[] = {"Basic", "Advanced"}; //Text names to show for values (Basic will set level to 1, Advanced will set level to 2) default = 2; //Default value used - Value should be in the values[] list }; class ace_repair_addSpareParts { //This is a "BOOL" title = "$STR_ACE_Repair_addSpareParts_name"; //You can use ACE's stringtables ACE_setting = 1; values[] = {0, 1}; //setting is a BOOL, but values still need to be numbers, so 0 is false, 1 is true texts[] = {"False", "True"}; default = 1; //Default value used - Value should be in the values[] list }; }; ``` -------------------------------- ### Add Detonation Handler Example Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/explosives-framework.md Implement custom logic to block or allow detonations using `ace_explosives_fnc_addDetonateHandler`. This example shows blocking cell phones and limiting range for RF clackers. ```sqf [{ params ["_unit", "_range", "_explosive", "_fuzeTime", "_triggerItem"]; if (_triggerItem == "ace_cellphone") exitWith { systemChat "Blocking Cell Phone"; false }; // always block cell phones if (_triggerItem == "ace_m26_clacker") exitWith { _range = _range / 1000; private _actualRange = _unit distance _explosive; systemChat format ["Limited Range For RF Clacker ["%1m / %2m"]", _actualRange toFixed 1, _range toFixed 1]; (_actualRange < _range) // return bool }; // allow anything else (like timers / wired clackers) true }] call ace_explosives_fnc_addDetonateHandler; ``` -------------------------------- ### Build ACE3 for Testing (HEMTT CLI) Source: https://github.com/acemod/ace3/blob/master/docs/wiki/development/setting-up-the-development-environment.md Alternative command-line execution for creating a binarized PBO build in .hemttout/build. This build is suitable for sharing and group testing, but not for final release. ```bash $ hemtt build ``` -------------------------------- ### Using onPrepare and onCut Functions Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/fastroping-framework.md Implement custom logic for door operations and FRIES animations during fastroping preparation and rope cutting using `onPrepare` and `onCut` functions. ACE3 provides common functions like `ace_fastroping_fnc_onCutCommon` and `ace_fastroping_fnc_onPrepareCommon`, but custom functions can also be defined. ```APIDOC ## Using onPrepare and onCut functions The `onCut` and `onPrepare` functions are responsible for opening/closing the helicopter doors and animating the FRIES (if equipped) when the FRIES gets prepared and the ropes get cut. ACE3 provides two functions that are compatible with most helicopters and all ACE3 FRIES. It is recommended to use the naming scheme for doors that is present in the base game so you can use the already existing functions `ace_fastroping_fnc_onCutCommon` and `ace_fastroping_fnc_onPrepareCommon`. You can however define your own functions if you so desire. Note that these functions run in the unscheduled environment, so commands like `sleep` and `waitUntil` will not work unless you use `spawn`. It is recommended to use `ace_common_fnc_waitAndExecute` and `ace_common_fnc_waitUntilAndExecute` instead though. ``` -------------------------------- ### ace_settingsInitialized Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/events-framework.md Fires when all ACE3 modules have been loaded and their settings are ready. ```APIDOC ## ace_settingsInitialized ### Description All modules are read and settings are ready. ### Parameters None. ``` -------------------------------- ### ace_refuel_fnc_getFuel Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/refuel-framework.md Gets the current fuel supply from a fuel truck. ```APIDOC ## ace_refuel_fnc_getFuel ### Description Gets the current fuel supply from a fuel truck. ### Method Call ### Parameters #### Arguments * 0 - Fuel Truck (Object) - Required ### Return Value Fuel amount left (in liters) (Number) ### Example ``` [fuelTruck] call ace_refuel_fnc_getFuel; ``` #### Example Arguments * `fuelTruck`: My fuel truck object ``` -------------------------------- ### ace_explosives_defuseStart Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/events-framework.md Fires when a unit starts defusing an explosive device. ```APIDOC ## ace_explosives_defuseStart ### Description Unit starts defusing explosive. ### Parameters - **_explosive** (Object) - The explosive device being defused. - **_unit** (Unit) - The unit attempting to defuse. ``` -------------------------------- ### Initialize a Jerry Can with Default Fuel Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/refuel-framework.md Make an object into a jerry can with the default fuel capacity using `ace_refuel_fnc_makeJerryCan`. This should be run on all clients and the server. ```sqf [can] call ace_refuel_fnc_makeJerryCan; ``` -------------------------------- ### ace_captives_setHandcuffed Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/events-framework.md Sets a unit to either start or stop being handcuffed. ```APIDOC ## ace_captives_setHandcuffed ### Description Sets a unit to either start or stop being handcuffed. ### Parameters - **_unit** (Unit) - The unit to set the handcuff state for. - **_state** (BOOL) - The desired handcuff state (true for handcuffed, false for not). ``` -------------------------------- ### ace_captives_setSurrendered Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/events-framework.md Sets a unit to either start or stop surrendering. ```APIDOC ## ace_captives_setSurrendered ### Description Sets a unit to either start or stop surrendering. ### Parameters - **_unit** (Unit) - The unit to set the surrender state for. - **_state** (BOOL) - The desired surrender state (true to surrender, false to stop). ``` -------------------------------- ### ace_captives_escortingCaptive Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/events-framework.md Fires when a caller starts or stops escorting a captive unit. ```APIDOC ## ace_captives_escortingCaptive ### Description Caller starting or stopping escort of unit. ### Parameters - **_unit** (Unit) - The captive unit being escorted. - **_state** (BOOL) - The state of the escort (true for starting, false for stopping). - **_caller** (Object) - The object performing the escort. ``` -------------------------------- ### Initialize ACE Arsenal with Specific Items Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/arsenal-framework.md Adds specified virtual items to a box and enables ACE Arsenal interaction. Passing `true` for the second argument adds all compatible items. ```sqf [_box, ["MyItem1", "MyItem2", "MyItemN"]] call ace_arsenal_fnc_initBox; ``` ```sqf [_box, true] call ace_arsenal_fnc_initBox; ``` ```sqf [_box, false, false] call ace_arsenal_fnc_initBox; ``` -------------------------------- ### Function Pre-initialization Macro Source: https://github.com/acemod/ace3/blob/master/docs/wiki/development/coding-guidelines.md The PREP macro is used in XEH_preInit.sqf to index functions for CBA's function caching system, improving load times. ```ArmaScript #define DISABLE_COMPILE_CACHE #include "script_component.hpp" ``` -------------------------------- ### Define Custom Fortify Presets in Description.ext Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/fortify-framework.md Defines custom fortification presets and categories using a configuration class. Presets can include display names, objects with costs, and optional categories. ```cpp class ACEX_Fortify_Presets { class TAG_MyPreset { displayName = "My Preset"; objects[] = { {"Sandbag", 5}, {"Bunker", 50} }; }; class TAG_categories { displayName = "My Categories"; objects[] = { {"Sandbag", 5, "A Category"}, {"Bunker", 50, "TAG_MyPreset"} // will use the localized displayName of that preset ("My Preset") }; }; }; ``` -------------------------------- ### Scripted Explosion Example Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/explosives-framework.md Use the `ace_explosives_fnc_scriptedExplosive` function to detonate multiple explosive objects with an optional randomized delay. ```sqf [[charge1, charge2], -3] call ace_explosives_fnc_scriptedExplosive; ``` -------------------------------- ### Variable Access Macros Source: https://github.com/acemod/ace3/blob/master/docs/wiki/development/coding-guidelines.md These macros provide convenient access to get and set variables across different namespaces. ```ArmaScript player getVariable ["MyVarName", false] ``` ```ArmaScript missionNamespace getVariable ["MyVarName", objNull] ``` ```ArmaScript uiNamespace getVariable ["MyVarName", displayNull] ``` ```ArmaScript player setVariable ["MyVarName", 127] ``` ```ArmaScript player setVariable ["MyVarName", 127, true] ``` ```ArmaScript missionNamespace setVariable ["MyVarName", player] ``` ```ArmaScript uiNamespace setVariable ["MyVarName", _control] ``` -------------------------------- ### Build ACE3 for Testing (HEMTT) Source: https://github.com/acemod/ace3/blob/master/docs/wiki/development/setting-up-the-development-environment.md Executes the build script to create a binarized PBO build in .hemttout/build. This build is suitable for sharing and group testing, but not for final release. ```batch build.bat ``` -------------------------------- ### Define Uniform Sleeves Configuration Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/wardrobe-framework.md Example of defining uniform variants with different sleeve states (down/up) and no component requirements. ```cpp class ace_wardrobe { class ace_wardrobe_base_U_sleeves_down; class ace_wardrobe_base_U_sleeves_up; class U_B_CTRG_1: ace_wardrobe_base_U_sleeves_down { components[] = {}; class modifiableTo { class U_B_CTRG_3 {}; }; }; class U_B_CTRG_3: ace_wardrobe_base_U_sleeves_up { components[] = {}; class modifiableTo { class U_B_CTRG_1 {}; }; }; }; ``` -------------------------------- ### Define Config Class Source: https://github.com/acemod/ace3/blob/master/docs/wiki/development/coding-guidelines.md Define configuration classes within their respective header files. This example shows the structure for ACE_Settings.hpp. ```cpp class ACE_Settings { // Content }; ``` -------------------------------- ### ACE3 Setting Configuration Example Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/settings-framework.md Defines a setting within the ACE_Settings class. Use 'isClientSettable' to control visibility in client options and 'typeName' to specify the data type. 'values' can provide descriptive strings for SCALAR types. ```cpp class ACE_Settings { class ACE_module_sampleSetting { // Following 2 entries are redundant if isClientSettable = 0 displayName = "$STR_ACE_Common_SettingName"; // Stringtable entry with the setting name description = "$STR_ACE_Common_SettingDescription"; // Stringtable entry with the setting description isClientSettable = 1; // Show in client options menu (0-no, 1-yes) typeName = "SCALAR"; // Type (BOOL/SCALAR/STRING/ARRAY/COLOR) value = 1; // Value // Following entry is redundant if typeName is NOT "SCALAR" values[] = {"Disabled", "Enabled", "Only Cursor", "Only On Keypress", "Only Cursor and KeyPress"}; // (Optional) Stringtable entries that describe the options // Following entry is present only in export force = 0; // Force the setting (0-no, 1-yes), exported settings are forced by default }; }; ``` -------------------------------- ### Trivial Code Update Example Source: https://github.com/acemod/ace3/blob/master/docs/wiki/development/merging-pull-requests.md This diff shows a trivial update, such as a spelling or indentation fix, which can be merged immediately by a maintainer. ```diff valueA = 12; valueB = 31; - valueC =2; + valueC = 2; ``` -------------------------------- ### Include KillTracker Configuration Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/killtracker-framework.md Include this configuration in your mission's `description.ext` file to enable the killtracker debriefing section. Ensure the path to `killtracker.inc` is correct. ```cpp class CfgDebriefingSections { #if __has_include("\z\ace\addons\killtracker\killtracker.inc") #include "\z\ace\addons\killtracker\killtracker.inc" #endif }; ``` -------------------------------- ### Get All Spectating Players Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/spectator-framework.md Call this function to retrieve an array of all players currently spectating. This includes both alive and dead players. ```sqf [] call ace_spectator_fnc_players ``` -------------------------------- ### Standard For Loop Syntax Source: https://github.com/acemod/ace3/blob/master/docs/wiki/development/coding-guidelines.md Prefer the standard `for ... from ... to ... step ... do` loop syntax over the older C-style `for [{...},{...},{...}] do` syntax for clarity and consistency. ```sqf for "_y" from # to # step # do { ... } ``` -------------------------------- ### Update Compiled Assets Source: https://github.com/acemod/ace3/blob/master/docs/README.md Runs the Grunt task to update compiled JavaScript and CSS files. This requires Node packages to be installed. ```bash grunt ``` -------------------------------- ### Create Release Build for ACE3 (HEMTT) Source: https://github.com/acemod/ace3/blob/master/docs/wiki/development/setting-up-the-development-environment.md Generates a fully binarized and optimized release build of ACE3. The output is placed in .hemttout/release, with redistributable archives in the 'releases' folder. ```bash $ hemtt release ``` -------------------------------- ### Initialize ACE Arsenal on a Box Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/arsenal-framework.md Quickly add a full ACE Arsenal to a box for all clients. Use `this` for the box's init field. ```sqf [_box, true] call ace_arsenal_fnc_initBox; ``` -------------------------------- ### Advanced Dynamic Interaction Menu Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/interactionMenu-framework.md An advanced example demonstrating dynamic creation of child actions based on player inventory and modifying the parent action's display name. It also includes a hover effect to display a hint. ```sqf _condition = { true }; _statement = { params ["_target", "_player", "_params"]; diag_log format ["_statement [%1, %2, %3]", _target, _player, _params]; // Run on hover: ["ace_common_displayTextStructured", ["someone is thinking of giving you items", 1.5, _target], [_target]] call CBA_fnc_targetEvent; }; _insertChildren = { params ["_target", "_player", "_params"]; diag_log format ["_insertChildren [%1, %2, %3]", _target, _player, _params]; // Add children to this action private _actions = []; { private _childStatement = {diag_log format ["givingItem %1", _this]; _target addItem (_this select 2);}; private _action = [format ["item:%1",_x], _x, "", _childStatement, {true}, {}, _x] call ace_interact_menu_fnc_createAction; _actions pushBack [_action, [], _target]; // New action, it's children, and the action's target } forEach (items _player); _actions }; _modifierFunc = { params ["_target", "_player", "_params", "_actionData"]; diag_log format ["_modifierFunc [%1, %2, %3]", _target, _player, _params]; // Modify the action - index 1 is the display name, 2 is the icon... _actionData set [1, format ["Give Items: %1", count (items player)]]; }; _action = ["GiveItems", "?", "", _statement, _condition, _insertChildren, [123], "", 4, [false, false, false, true, false], _modifierFunc] call ace_interact_menu_fnc_createAction; [q3, 0, ["ACE_MainActions"], _action] call ace_interact_menu_fnc_addActionToObject; ``` -------------------------------- ### Get Fuel Supply from a Fuel Truck Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/refuel-framework.md Retrieve the current amount of fuel available in a fuel truck object using `ace_refuel_fnc_getFuel`. ```sqf [fuelTruck] call ace_refuel_fnc_getFuel; ``` -------------------------------- ### Get Current Supply Count Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/rearm-framework.md Retrieve the current supply count of an ammunition truck. This function returns a number representing the available supply. ```sqf [ammo_truck] call ace_rearm_fnc_getSupplyCount; ``` -------------------------------- ### Initialize Arsenal Box with Items Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/arsenal-framework.md Call this function to initialize an Arsenal box with a specific list of items. Ensure the item array is correctly formatted. ```sqf [_box, ["item1", "item2", "itemN"]] call ace_arsenal_fnc_initBox ``` -------------------------------- ### Getting weapon safety status Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/safemode-framework.md Retrieves the current safety status of a weapon's muzzle. The muzzle can be specified, or the current muzzle will be used. ```APIDOC ## ace_safemode_fnc_getWeaponSafety ### Description Getter for weapon safety state. ### Arguments - **Unit** (OBJECT) - The unit whose weapon safety is to be queried. - **Weapon** (STRING) - The name of the weapon. - **Muzzle** (STRING) - Optional. Defaults to the current muzzle of the weapon. The specific muzzle to query. ### Return Value Safety status (BOOL) - `true` if safety is engaged, `false` otherwise. ### Example ```sqf [ACE_player, currentWeapon ACE_player] call ace_safemode_fnc_getWeaponSafety; ``` ``` -------------------------------- ### Set Vehicle Engine Startup Delay via Script Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/vehicles-framework.md Use the 'ace_vehicles_fnc_setVehicleStartDelay' function to dynamically set the engine startup delay for a specific vehicle object during gameplay. This function requires the vehicle object and the delay in seconds as arguments. ```sqf [myCar, 2.2] call ace_vehicles_fnc_setVehicleStartDelay; ``` -------------------------------- ### Get Weapon Safety Status Source: https://github.com/acemod/ace3/blob/master/docs/wiki/framework/safemode-framework.md Retrieves the safety status of a weapon's muzzle. If no muzzle is specified, it defaults to the current muzzle of the weapon. ```sqf * Getter for weapon safety state. * * Arguments: * 0: Unit * 1: Weapon * 2: Muzzle (default: current muzzle of weapon) * * Return Value: * Safety status * * Example: * [ACE_player, currentWeapon ACE_player] call ace_safemode_fnc_getWeaponSafety ```