Fandom

武装突袭 Wiki

Dynamic Groups

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 分享

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

Introduced with Arma 3 version 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.

Option 1:

["InitializePlayer", [player]] call BIS_fnc_dynamicGroups; // Initializes the player/client side Dynamic Groups framework

Option 2:

["InitializePlayer", [player, true]] call BIS_fnc_dynamicGroups; // Initializes the player/client side Dynamic Groups framework and registers the player group


Accessing the Dynamic Groups interface编辑

The Dynamic Groups interface is tied to TeamSwitch action, and it's default keybind is U.


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, must be the actual leader of the given group, for example:

if (isServer) then
{
   private ["_group", "_leader", "_data"];
   _group  = group player;
   _leader = leader _group;
   _data   = [nil, "Awesome Group", false]; // [<Insignia>, <Group Name>, <Private>]
 
   ["RegisterGroup", [_group, _leader, _data]] call BIS_fnc_dynamicGroups;
};

See BIS_fnc_dynamicGroups in Functions Viewer for more sub-functions and their parameters:

"Initialize" - Initializes dynamic groups on the server
"Terminate" - Terminates dynamic groups on the server
"InitializePlayer" - Does client side initialization
"TerminatePlayer" - Does client side termination
"IsInitialized" - Checks whether dynamic groups was initialized
"RegisterGroup" - Registers a group
"UnregisterGroup" - Unregisters a group
"IsGroupRegistered" - Whether a group was already registered or not
"SetName" - Sets the name of the group, in future, will also update GroupId of the group
"SetPrivateState" - Set the private state of a group
"SwitchLeader" - Switches the leader of given group to the given player
"AddGroupMember" - Add a group member to group
"RemoveGroupMember" - Switches a player from one group to another
"KickPlayer" - Kicks a player from group, player wont be able to join the group unless invited or is unkicked using UnKickPlayer
"UnKickPlayer" - Unkicks a player from a group
"WasPlayerKickedFrom" - Whether given player was kicked from given group
"GetAllGroups" - Returns all registered and valid groups
"GetAllGroupsOfSide" - Returns all registered and valid groups of given side

更多维基

随机维基