Channel IDs: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Some wiki formatting)
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
= Introduction =
In {{arma3}}, chat, radio, VON and markers all use the same channel ID system. However, channel IDs for custom channels behave a bit differently. This is explained in the table below.
In {{arma3}}, chat, radio, VON and markers all use the same channel ID system. However, channel IDs for custom channels behave a bit differently. This is explained in the table below.


= Channel Explanation =  
 
== Description ==
 
{{Feature|informative|"Content" designates anything channel-related: markers, messages, voice.}}
{| class="wikitable sortable" width = "100%"
{| class="wikitable sortable" width = "100%"
|-
|-
! Channel ID !! Channel Name !! Visible To !! Additional Information
! Channel ID !! Channel Name !! Visible To !! Additional Information
|-
|-
| -1 || None || All players. |
| -1 || None || All players. || Is used when a marker is created with [[createMarker]] and the '''channelID''' parameter was not defined. Markers in "none" channel are visible in all other channels as well.
| Is used when a marker is created with [[createMarker]] and the '''channelID''' parameter was not defined. Markers in "none" channel are visible in all other channels as well.
|-  
|-  
| 0 || Global || All players. ||
| 0 || Global || All players. ||
|-
|-
| 1 || Side || Content<ref name="content" /> is only visible to the [[side]] of the player who created it. ||
| 1 || Side || Content is only visible to the [[side]] of the player who created it. ||
|-
|-
| 2 || Command ||  ||  
| 2 || Command ||  ||  
|-
|-
| 3 || Group || Content<ref name="content" /> is only visible for the players in the group of the player who created it. || This channel cannot be disabled. It's the default fallback channel if all other channels are disabled.
| 3 || Group || Content is only visible for the players in the group of the player who created it. || This channel cannot be disabled. It's the default fallback channel if all other channels are disabled.
|-
|-
| 4 || Vehicle || Content<ref name="content" /> is only visible to the vehicle's crew. ||  
| 4 || Vehicle || Content is only visible to the vehicle's crew. ||  
|-
|-
| 5 || Direct || To players in close proximity. ||  
| 5 || Direct || Players in close proximity. ||  
|-
|-
| 6 - 15 || Custom Channels || Content<ref name="content" /> will only be available for players which have been assigned to this channel. See [[radioChannelAdd]] || Custom channels can be created on the fly. See [[radioChannelCreate]].  
| 6..15 || Custom Channels || Content will only be available for players which have been assigned to this channel. See [[radioChannelAdd]]. || Custom channels can be created on the fly. See [[radioChannelCreate]].  
{{Warning|The '''custom channel ID''' returned by [[radioChannelCreate]] is going to be in a range from 1 - 10 (0 if failed). Internally, these numbers are converted to the '''channel IDs'''  6 - 15 which are reserved for custom channels.
{{Feature|warning|The '''custom channel ID''' returned by [[radioChannelCreate]] is going to be in a range from 1 - 10 (0 if failed). Internally, these numbers are converted to the '''channel IDs'''  6 - 15 which are reserved for custom channels.
{{{!}} class{{=}}"wikitable"  
: {{{!}} class{{=}}"wikitable align-center"
{{!}}-
{{!}}-
! Channel ID
! Channel ID
{{!}} 6
{{!}} style{{=}}"width: 1.5em" {{!}} '''6'''
{{!}} 7
{{!}} style{{=}}"width: 1.5em" {{!}} 7
{{!}} 8
{{!}} style{{=}}"width: 1.5em" {{!}} 8
{{!}} 9
{{!}} style{{=}}"width: 1.5em" {{!}} 9
{{!}} 10
{{!}} style{{=}}"width: 1.5em" {{!}} 10
{{!}} 11
{{!}} style{{=}}"width: 1.5em" {{!}} 11
{{!}} 12
{{!}} style{{=}}"width: 1.5em" {{!}} 12
{{!}} 13
{{!}} style{{=}}"width: 1.5em" {{!}} 13
{{!}} 14
{{!}} style{{=}}"width: 1.5em" {{!}} 14
{{!}} 15
{{!}} style{{=}}"width: 1.5em" {{!}} '''15'''
{{!}}-
{{!}}-
! Custom Channel ID
! Custom Channel ID
{{!}} 1
{{!}} '''1'''
{{!}} 2
{{!}} 2
{{!}} 3
{{!}} 3
Line 49: Line 50:
{{!}} 8
{{!}} 8
{{!}} 9
{{!}} 9
{{!}} 10
{{!}} '''10'''
{{!}}} <!--- close inner table --->
{{!}}} <!--- close inner table --->
}} <!--- close warning template --->
}} <!--- close warning template --->
|} <!--- close outer table --->
|} <!--- close outer table --->


== Custom Channel ID Example ==
{{cc|Create custom channel}}
_customChannelID = [[radioChannelCreate]] [[0.96, 0.34, 0.13, 0.8], "Q-dance Radio", "%UNIT_NAME", <nowiki>[</nowiki>[[player]]]]; {{cc|_customChannelID is 1}}


{{cc|Switch current channel of the player to the newly created channel}}.
== Colours ==
[[setCurrentChannel]] 6; {{cc|Note the channel ID used here. Even though the ID returned by [[radioChannelCreate]] is 1, we have to use 6 as channel ID. See table above.}}


{{cc|Let us use this channel for a message}}
[[File:xChat.jpg|right]]
[[player]] [[customChat]] [_customChannelID, "Hi, I am a custom chat message"]; {{cc|Since this command uses the '''customChannelID''' we have to use 1 (_customChannelID) here}}
<sqf>
 
driver vehicle player sideChat "sideChat";
{{Important|Always be aware of what kind of channel ID you are currently working with and what channel ID is expected by the command you are using. See [[:Category:Command Group: Custom Radio and Chat|Command Group: Custom Radio and Chat]] for commands which expect a customChannelID!}}
driver vehicle player globalChat "globalChat";
driver vehicle player groupChat "groupChat";
vehicle player vehicleChat "vehicleChat";
driver vehicle player commandChat "commandChat";
driver vehicle player customChat [1, "customChat"];
systemChat "systemChat";
</sqf>


==Footnotes==
<references>
<ref name="content">Markers, messages, voice</ref>
</references>


<!---
== Changing Channels ==
{{Informative|Besides the above listed channels, there are also other channels not available through [[sqf]], with the only exception being [[systemChat]].}}
--->
<!---
= Channel Colours =  
[[File:xChat.jpg|right]]
[[driver]] [[vehicle]] [[player]] [[sideChat]] "sideChat";
[[driver]] [[vehicle]] [[player]] [[globalChat]] "globalChat";
[[driver]] [[vehicle]] [[player]] [[groupChat]] "groupChat";
[[vehicle]] [[player]] [[vehicleChat]] "vehicleChat";
[[driver]] [[vehicle]] [[player]] [[commandChat]] "commandChat";
[[driver]] [[vehicle]] [[player]] [[customChat]] [1, "customChat"];
[[systemChat]] "systemChat";


= Changing Channels =
; Ingame Controls
; Ingame Controls
: '''','''' and ''''.'''' to cycle through the channels
: {{Controls|,}} and {{Controls|.}} cycle through the channels


; Scripting
; Scripting
: [[setCurrentChannel]]
: [[setCurrentChannel]]
--->


= See Also =
 
== Custom Channel Example ==
 
<sqf>
// Create custom channel
_customChannelID = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], "Q-dance Radio", "%UNIT_NAME", [player]]; // _customChannelID is 1
 
// Switch current channel of the player to the newly created channel.
setCurrentChannel (_customChannelID + 5); // Note the channel ID used here. Even though the ID returned by radioChannelCreate is 1, we have to use 6 as channel ID - see table above.
 
// Let us use this channel for a message
player customChat [_customChannelID, "Hi, I am a custom chat message"]; // Since this command uses the customChannelID we have to use 1 (_customChannelID) here
</sqf>
 
{{Feature|important|
Always be aware of what kind of channel ID you are currently working with and what channel ID is expected by the command you are using.
See [[:Category:Command Group: Custom Radio and Chat|Command Group: Custom Radio and Chat]] for commands which expect a customChannelID.
}}
 
 
== See Also ==
 
* [[:Category:Command Group: Markers|Command Group: Markers]]
* [[:Category:Command Group: Markers|Command Group: Markers]]
* [[:Category:Command Group: Custom Radio and Chat|Command Group: Custom Radio and Chat]]
* [[:Category:Command Group: Custom Radio and Chat|Command Group: Custom Radio and Chat]]
* [[:Category:Command Group: Radio and Chat|Command Group: Radio and Chat]]
* [[:Category:Command Group: Radio and Chat|Command Group: Radio and Chat]]


[[Category:Scripting Topics|Data Types]]
[[Category:Scripting Topics|Data Types]]

Latest revision as of 13:16, 1 October 2024

In Arma 3, chat, radio, VON and markers all use the same channel ID system. However, channel IDs for custom channels behave a bit differently. This is explained in the table below.


Description

"Content" designates anything channel-related: markers, messages, voice.
Channel ID Channel Name Visible To Additional Information
-1 None All players. Is used when a marker is created with createMarker and the channelID parameter was not defined. Markers in "none" channel are visible in all other channels as well.
0 Global All players.
1 Side Content is only visible to the side of the player who created it.
2 Command
3 Group Content is only visible for the players in the group of the player who created it. This channel cannot be disabled. It's the default fallback channel if all other channels are disabled.
4 Vehicle Content is only visible to the vehicle's crew.
5 Direct Players in close proximity.
6..15 Custom Channels Content will only be available for players which have been assigned to this channel. See radioChannelAdd. Custom channels can be created on the fly. See radioChannelCreate.
The custom channel ID returned by radioChannelCreate is going to be in a range from 1 - 10 (0 if failed). Internally, these numbers are converted to the channel IDs 6 - 15 which are reserved for custom channels.
Channel ID 6 7 8 9 10 11 12 13 14 15
Custom Channel ID 1 2 3 4 5 6 7 8 9 10


Colours

xChat.jpg

driver vehicle player sideChat "sideChat"; driver vehicle player globalChat "globalChat"; driver vehicle player groupChat "groupChat"; vehicle player vehicleChat "vehicleChat"; driver vehicle player commandChat "commandChat"; driver vehicle player customChat [1, "customChat"]; systemChat "systemChat";


Changing Channels

Ingame Controls
, and . cycle through the channels
Scripting
setCurrentChannel


Custom Channel Example

// Create custom channel _customChannelID = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], "Q-dance Radio", "%UNIT_NAME", [player]]; // _customChannelID is 1 // Switch current channel of the player to the newly created channel. setCurrentChannel (_customChannelID + 5); // Note the channel ID used here. Even though the ID returned by radioChannelCreate is 1, we have to use 6 as channel ID - see table above. // Let us use this channel for a message player customChat [_customChannelID, "Hi, I am a custom chat message"]; // Since this command uses the customChannelID we have to use 1 (_customChannelID) here

Always be aware of what kind of channel ID you are currently working with and what channel ID is expected by the command you are using. See Command Group: Custom Radio and Chat for commands which expect a customChannelID.


See Also