getPlayerChannel: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma3 | | arma3 | ||
|1.42 | |1.42 | ||
|arg= global | |arg= global | ||
|gr1= Radio and Chat | |gr1= Radio and Chat | ||
| 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: | | 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: | ||
Line 52: | Line 52: | ||
{{!}} 14 | {{!}} 14 | ||
{{!}} 15 | {{!}} 15 | ||
{{!}}} | {{!}}} | ||
| [[getPlayerChannel]] player | | [[getPlayerChannel]] player | ||
|p1= player: [[Object]] | |p1= player: [[Object]] | ||
| [[Number]] - [[Channel IDs|channel ID]] | | [[Number]] - [[Channel IDs|channel ID]] | ||
|x1= <code>[[private]] _channelID = [[getPlayerChannel]] [[player]];</code> | |x1= <code>[[private]] _channelID = [[getPlayerChannel]] [[player]];</code> | ||
|[[setCurrentChannel]], [[currentChannel]], [[enableChannel]], [[channelEnabled]], [[radioChannelCreate]], [[radioChannelInfo]] | |[[setCurrentChannel]], [[currentChannel]], [[enableChannel]], [[channelEnabled]], [[radioChannelCreate]], [[radioChannelInfo]] | ||
}} | }} | ||
<h3 style="display:none">Bottom Section</h3> | <h3 style="display:none">Bottom Section</h3> |
Revision as of 00:41, 18 January 2021
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.
- Prior to Arma 3 v2.01.146856 did not detect when someone talked 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.
channel ID number correspondence N/A Global Side Command Group Vehicle Direct Custom1 Custom2 Custom3 Custom4 Custom5 Custom6 Custom7 Custom8 Custom9 Custom10 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 - Groups:
- Radio and Chat
Syntax
- Syntax:
- getPlayerChannel player
- Parameters:
- player: Object
- Return Value:
- Number - channel ID
Examples
- Example 1:
private _channelID = 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