-
Notifications
You must be signed in to change notification settings - Fork 54
Custom Modules
###Content:
###Note: This page is dedicated to the "Execute Code" module. This module allows you executing scripts and thus, also implementing Custom Modules.
###Register Custom Module:
As in Ares you can define your own custom modules. The function to register custom modules is Ares_fnc_RegisterCustomModule
.
There are two wais to use that function:
- You can define a custom module in the mission. As an example you can place the code below in init.sqf of your mission:
if (local player and (isClass (configFile >> "CfgPatches" >> "achilles_modules_f_achilles"))) then
{
["My Category", "My Module",
{
_module_position = param [0,[0,0,0],];
_selected_object = param [1,ObjNull,[ObjNull]];
systemChat format ["Module position: %1", _module_position];
systemChat format ["Selected Object: %1", _selected_object ]
}] call Ares_fnc_RegisterCustomModule;
};
- Execute
Ares_fnc_RegisterCustomModule
with the Execute Code module.
###Integrate Selection Option: A template to integrate the [Selection Option] is presented below:
["My Category", "My Module",
{
private "_selected_objects"; _module_position = param [0,[0,0,0],];
_selected_object = param [1,ObjNull,[ObjNull]];
if (isNull _selected_object) then
{
_selected_objects = ["objects"] call Achilles_fnc_SelectUnits;
} else
{
_selected_objects = [_selected_object];
};
if (isNil "_selected_objects") exitWith {};
if (count _selected_objects == 0) exitWith
{
["No object was selected!"] call Ares_fnc_ShowZeusMessage;
playSound "FD_Start_F"
};
systemChat str [_module_position, _selected_objects];
}] call Ares_fnc_RegisterCustomModule;
As you see in the line with systemChat, there are two private variables available:
- _module_position ARRAY Returns position AGLS where the module was placed.
- _selected_object ARRAY Array of selected objects.
###Dynamic Dialogs:
Achilles
Discuss topic | BIS forum | Create an issue
- Home
- About the Add-on (external link)
- Add-on Configuration
- Ares Wiki (external link)
Considerations for Reinforcement Module- Custom Modules
- Custom Music
- Execute Code
- FAQ
- Informative Module Icons
- Key Assignements
- Module Information
- Recommended Add-ons
- Restrict Code Execute
- Selection Option
Tips and Tricks- Using ACE3
- Zeus Guides
- Zeus Setup