BIS fnc dynamicGroups: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl>" to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...)
Line 1: Line 1:
{{Function|Comments=
{{Function


| a3 |Game name=
| a3


|1.42|Game version=
|1.42


|gr1 = Systems |GROUP1=
|gr1 = Systems


| Function that adds dynamic groups to the mission as seen in End Game. Function needs to be initialized on server and client. Clients can then use action TeamSwitch ("U" by default) to access the Dynamic Groups interface.
| Function that adds dynamic groups to the mission as seen in End Game. Function needs to be initialized on server and client. Clients can then use action TeamSwitch ("U" by default) to access the Dynamic Groups interface.
|DESCRIPTION=


| [mode, params] call [[BIS_fnc_dynamicGroups]] |SYNTAX=
 
| [mode, params] call [[BIS_fnc_dynamicGroups]]


|p1= mode: [[String]] - Mode, can be:
|p1= mode: [[String]] - Mode, can be:
Line 29: Line 29:
* "UnKickPlayer" - Unkicks a player from a group
* "UnKickPlayer" - Unkicks a player from a group
* "WasPlayerKickedFrom" - Whether given player was kicked from given group
* "WasPlayerKickedFrom" - Whether given player was kicked from given group
* "GetAllGroups" - Returns all registered and valid groups |PARAMETER1=
* "GetAllGroups" - Returns all registered and valid groups


|p2= params: [[Array]] - Parameter changes according to <tt>mode</tt>. Check the function in the Functions Viewer for detailed information |PARAMETER2=
|p2= params: [[Array]] - Parameter changes according to <tt>mode</tt>. Check the function in the Functions Viewer for detailed information


| [[Nothing]] |RETURNVALUE=
| [[Nothing]]
   
   
|x1= <code>["Initialize"] [[call]] [[BIS_fnc_dynamicGroups]];//Exec on Server</code> |EXAMPLE1=
|x1= <code>["Initialize"] [[call]] [[BIS_fnc_dynamicGroups]];//Exec on Server</code>
|x2= <code><nowiki>["InitializePlayer", [</nowiki>[[player]]<nowiki>]]</nowiki> [[call]] [[BIS_fnc_dynamicGroups]];//Exec on client</code> |EXAMPLE2=
|x2= <code><nowiki>["InitializePlayer", [</nowiki>[[player]]<nowiki>]]</nowiki> [[call]] [[BIS_fnc_dynamicGroups]];//Exec on client</code>


|[[Dynamic Groups]]|SEEALSO=
|[[Dynamic Groups]]


}}
}}

Revision as of 22:59, 17 January 2021

-wrong parameter ("a3") defined!-[[:Category:Introduced with a3 version 1.42|1.42]]
Hover & click on the images for description

Description

Description:
Function that adds dynamic groups to the mission as seen in End Game. Function needs to be initialized on server and client. Clients can then use action TeamSwitch ("U" by default) to access the Dynamic Groups interface.
Execution:
call
Groups:
Systems

Syntax

Syntax:
[mode, params] call BIS_fnc_dynamicGroups
Parameters:
mode: String - Mode, can be:
  • "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
params: Array - Parameter changes according to mode. Check the function in the Functions Viewer for detailed information
Return Value:
Nothing

Examples

Example 1:
["Initialize"] call BIS_fnc_dynamicGroups;//Exec on Server
Example 2:
["InitializePlayer", [player]] call BIS_fnc_dynamicGroups;//Exec on client

Additional Information

See also:
Dynamic Groups

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

[[Category:Introduced with a3 version 1.42]][[ Category: a3: New Functions | BIS FNC DYNAMICGROUPS]][[ Category: a3: Functions | BIS FNC DYNAMICGROUPS]]


Bottom Section