getPlayerChannel: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "|= Game version" to "|Game version=") |
Lou Montana (talk | contribs) m (add radioChannelInfo link) |
||
Line 2: | Line 2: | ||
______________________________________________________________________________________________ | ______________________________________________________________________________________________ | ||
| | | arma3 |Game name= | ||
|1.42|Game version= | |1.42|Game version= | ||
Line 14: | Line 14: | ||
* 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. | * 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: | In short, this command mimics the speaking icon from the UI. Correspondence between channel and number: | ||
* 0 | * 0 {{=}} Global | ||
* 1 | * 1 {{=}} Side | ||
* 2 | * 2 {{=}} Command | ||
* 3 | * 3 {{=}} Group | ||
* 4 | * 4 {{=}} Vehicle | ||
* 5 | * 5 {{=}} Direct (Is not detected by [[getPlayerChannel]]) | ||
* 6-15 | * 6-15 {{=}} Custom Radio (see [[radioChannelCreate]]) |DESCRIPTION= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[getPlayerChannel]] player |SYNTAX= | ||
|p1= player: [[Object]] |PARAMETER1= | |p1= player: [[Object]] |PARAMETER1= | ||
Line 30: | Line 30: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>_channel = [[getPlayerChannel]] [[player]];</code> |EXAMPLE1= | |x1= <code>[[private]] _channel = [[getPlayerChannel]] [[player]];</code> |EXAMPLE1= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|[[setCurrentChannel]], [[currentChannel]], [[enableChannel]], [[channelEnabled]], [[radioChannelCreate]] |SEEALSO= | |[[setCurrentChannel]], [[currentChannel]], [[enableChannel]], [[channelEnabled]], [[radioChannelCreate]], [[radioChannelInfo]] |SEEALSO= | ||
}} | }} | ||
Line 46: | Line 45: | ||
<h3 style="display:none">Bottom Section</h3> | <h3 style="display:none">Bottom Section</h3> | ||
[[Category: | [[Category:Command Group: Radio Control]] |
Revision as of 17:44, 16 August 2020
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.
- 0 = Global
- 1 = Side
- 2 = Command
- 3 = Group
- 4 = Vehicle
- 5 = Direct (Is not detected by getPlayerChannel)
- 6-15 = Custom Radio (see radioChannelCreate)
- Groups:
- Uncategorised
Syntax
- Syntax:
- getPlayerChannel player
- Parameters:
- player: Object
- Return Value:
- Number
Examples
- Example 1:
private _channel = getPlayerChannel player;
Additional Information
- See also:
- setCurrentChannelcurrentChannelenableChannelchannelEnabledradioChannelCreateradioChannelInfo
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