Dynamic Groups – Arma 3
No edit summary |
No edit summary |
||
Line 14: | Line 14: | ||
==Installation== | ==Installation== | ||
To add Dynamic Groups functionality to your mission do the following steps: | To add Dynamic Groups functionality to your mission do the following steps: | ||
====InitServer.sqf==== | ====InitServer.sqf==== | ||
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. | 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. | ||
Onto this file, copy & paste the following line, which will make the server initialize the Dynamic Groups framework. | Onto this file, copy & paste the following line, which will make the server initialize the Dynamic Groups framework. | ||
Option 1 | |||
<blockquote> | <blockquote> | ||
["Initialize"] [[call]] [[BIS_fnc_dynamicGroups]]; // Initializes the Dynamic Groups framework | ["Initialize"] [[call]] [[BIS_fnc_dynamicGroups]]; // Initializes the Dynamic Groups framework | ||
</blockquote> | </blockquote> | ||
Option 2 | |||
<blockquote> | <blockquote> | ||
["Initialize", [true]] [[call]] [[BIS_fnc_dynamicGroups]]; // Initializes the Dynamic Groups framework and groups led by a player at mission start will be registered | ["Initialize", [true]] [[call]] [[BIS_fnc_dynamicGroups]]; // Initializes the Dynamic Groups framework and groups led by a player at mission start will be registered | ||
Line 28: | Line 32: | ||
Note that, this function has no effect if called in a machine which is not the server. | Note that, this function has no effect if called in a machine which is not the server. | ||
====InitPlayerLocal.sqf==== | ====InitPlayerLocal.sqf==== | ||
Line 35: | Line 41: | ||
["InitializePlayer", <nowiki>[</nowiki>[[player]]<nowiki>]</nowiki>] [[call]] [[BIS_fnc_dynamicGroups]]; | ["InitializePlayer", <nowiki>[</nowiki>[[player]]<nowiki>]</nowiki>] [[call]] [[BIS_fnc_dynamicGroups]]; | ||
</blockquote> | </blockquote> | ||
==Accessing the Dynamic Groups interface== | ==Accessing the Dynamic Groups interface== | ||
The Dynamic Groups interface is tied to '''TeamSwitch''' action, and it's default state keyboard key is '''T'''. | The Dynamic Groups interface is tied to '''TeamSwitch''' action, and it's default state keyboard key is '''T'''. |
Revision as of 10:25, 22 June 2015
-wrong parameter ("A3") defined!-[[:Category:Introduced with A3 version 1.42|1.42]]
DYNAMIC GROUPS
Installation
To add Dynamic Groups functionality to your mission do the following steps:
InitServer.sqf
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. Onto this file, copy & paste the following line, which will make the server initialize the Dynamic Groups framework.
Option 1
["Initialize"] call BIS_fnc_dynamicGroups; // Initializes the Dynamic Groups framework
Option 2
["Initialize", [true]] call BIS_fnc_dynamicGroups; // Initializes the Dynamic Groups framework and groups led by a player at mission start will be registered
Note that, this function has no effect if called in a machine which is not the server.
InitPlayerLocal.sqf
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, which means everyone but a dedicated server, will actually execute this file. Onto this file, copy & paste the following line, which will make a client/player initialize the Dynamic Groups framework.
["InitializePlayer", [player]] call BIS_fnc_dynamicGroups;
Accessing the Dynamic Groups interface
The Dynamic Groups interface is tied to TeamSwitch action, and it's default state keyboard key is T.