Dynamic Groups – Arma 3
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 1: | Line 1: | ||
<div class="float-right">[[File:arma3_DynamicGroups.jpg|thumb|center|alt= Dynamic Groups|Dynamic Groups]]</div> | |||
{{GVI|arma3|1.42}} | {{GVI|arma3|1.42}} | ||
{{TOC}} | |||
== Installation == | == Installation == | ||
To add the Dynamic Groups functionality to your mission do the following steps: | To add the Dynamic Groups functionality to your mission do the following steps: | ||
* Create a file in your mission root folder and name it [[Event Scripts#initServer.sqf|initServer.sqf]] (if you don't have it there already). This file is executed only on the server, when the mission starts. | |||
Create a file in your mission root folder and name it [[Event Scripts#initServer.sqf|initServer.sqf]] (if you don't have it there already). This file is executed only on the server, when the mission starts. | ** Into this file, copy & paste one of these lines to make the server initialise the Dynamic Groups framework: <sqf> | ||
["Initialize"] call BIS_fnc_dynamicGroups; // initialises the Dynamic Groups framework | |||
// or | |||
["Initialize", [true]] call BIS_fnc_dynamicGroups; // initialises the Dynamic Groups framework and groups led by a player at mission start will be registered | |||
<sqf>["Initialize"] call BIS_fnc_dynamicGroups; // | </sqf> | ||
* Create another file in your mission root folder and name it [[Event Scripts#initPlayerLocal.sqf|initPlayerLocal.sqf]] (if you don't have it there already). | |||
** This file is executed only by machines which have a human player when the mission starts (every machine but a dedicated server or a [[Arma 3: Headless Client||headless client]] - see [[hasInterface]]). | |||
** Into this file, copy & paste one of these lines to make a client/player initialise the Dynamic Groups framework: <sqf> | |||
["InitializePlayer", [player]] call BIS_fnc_dynamicGroups; // initialises the player/client side Dynamic Groups framework | |||
// or | |||
["InitializePlayer", [player, true]] call BIS_fnc_dynamicGroups; // initialises the player/client side Dynamic Groups framework and registers the player group | |||
Create another file in your mission root folder and name it [[Event Scripts#initPlayerLocal.sqf|initPlayerLocal.sqf]] (if you don't have it there already). | </sqf> | ||
This file is executed only by machines which have a human player when the mission starts | |||
<sqf>["InitializePlayer", [player]] call BIS_fnc_dynamicGroups; // | |||
== | == Dynamic Groups Interface Access == | ||
The Dynamic Groups interface is tied to the '''TeamSwitch''' action, and | The Dynamic Groups interface is tied to the '''TeamSwitch''' action, and its default keybind is {{Controls|U}}. | ||
== Additional Functionality == | == Additional Functionality == | ||
If you would like to register a group manually (same as a player clicking '''CREATE''' button in the UI) use '''RegisterGroup'''. Please note that the leader you pass | If you would like to register a group manually (same as a player clicking the '''CREATE''' button in the UI) use '''RegisterGroup'''. | ||
Please note that the leader you pass must be the actual leader of the given group, for example: | |||
<sqf> | <sqf> | ||
if (isServer) then | if (isServer) then |
Revision as of 20:51, 27 May 2023
Installation
To add the Dynamic Groups functionality to your mission do the following steps:
- Create a file in your mission root folder and name it initServer.sqf (if you don't have it there already). This file is executed only on the server, when the mission starts.
- Into this file, copy & paste one of these lines to make the server initialise the Dynamic Groups framework: ["Initialize"] call BIS_fnc_dynamicGroups; // initialises the Dynamic Groups framework // or ["Initialize", [true]] call BIS_fnc_dynamicGroups; // initialises the Dynamic Groups framework and groups led by a player at mission start will be registered
- Into this file, copy & paste one of these lines to make the server initialise the Dynamic Groups framework:
- Create another file in your mission root folder and name it initPlayerLocal.sqf (if you don't have it there already).
- This file is executed only by machines which have a human player when the mission starts (every machine but a dedicated server or a |headless client - see hasInterface).
- Into this file, copy & paste one of these lines to make a client/player initialise the Dynamic Groups framework: ["InitializePlayer", [player]] call BIS_fnc_dynamicGroups; // initialises the player/client side Dynamic Groups framework // or ["InitializePlayer", [player, true]] call BIS_fnc_dynamicGroups; // initialises the player/client side Dynamic Groups framework and registers the player group
Dynamic Groups Interface Access
The Dynamic Groups interface is tied to the TeamSwitch action, and its default keybind is U.
Additional Functionality
If you would like to register a group manually (same as a player clicking the CREATE button in the UI) use RegisterGroup. Please note that the leader you pass must be the actual leader of the given group, for example:
See BIS_fnc_dynamicGroups in the Functions Viewer for more sub-functions and their parameters.