getPlayerChannel

From Bohemia Interactive Community
Jump to: navigation, search
Introduced with Arma 3 version 1.42
  Arguments of this scripting command don't have to be local to the client the command is executed on

Click on the images for descriptions

Introduced in

Game:
Arma 3
Version:
1.42

Description

Description:
Returns channel number for given player, provided that player is speaking, otherwise -1. Having mic on is not enough, player has to make a sound. There are several limitations to this command:
  • It does not work on dedicated server, the return is always -1, only client can detect other client talking.
  • It does not detect when someone talks on direct chat at all anywhere.
  • The client on which command is executed has to able to receive transmission before the transmission channel can be detected. For example if a player is not in the same group as a speaker and the speaker speaks on Group Channel, the player cannot hear the speaker and therefore cannot detect what channel the speaker is on.
In short, this command mimics the speaking icon from the UI. Correspondence between channel and number:
  • 0 = Global
  • 1 = Side
  • 2 = Command
  • 3 = Group
  • 4 = Vehicle
  • 5 = Direct (Is not detected by getPlayerChannel)
  • 6-15 = Custom Radio (see radioChannelCreate)

Syntax

Syntax:
getPlayerChannel player
Parameters:
player: Object
Return Value:
Number

Examples

Example 1:
_channel = getPlayerChannel player;

Additional Information

Multiplayer:
-
See also:
setCurrentChannelcurrentChannelenableChannelchannelEnabledradioChannelCreate

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section