radioChannelCreate: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
Hypoxic125 (talk | contribs) No edit summary |
||
Line 59: | Line 59: | ||
|timestamp= 20160121133000 | |timestamp= 20160121133000 | ||
|text= Make sure you add all units you intend to speak or receive messages on created custom channel to the channel. | |text= Make sure you add all units you intend to speak or receive messages on created custom channel to the channel. | ||
}} | |||
{{Note | |||
|user= Hypoxic125 | |||
|timestamp= 20221101063808 | |||
|text= Units are removed from the chat channel on RESPAWN. Be sure to add units back to their custom chat channels upon respawn via [[Event_Scripts#onPlayerRespawn.sqf|onPlayerRespawn.sqf]] or [[Arma_3:_Event_Handlers#Respawn|Respawn Event Handler]]. | |||
}} | }} |
Revision as of 07:38, 1 November 2022
Description
- Description:
- Create a custom radio channel with the given color, label, call sign and registered characters. The custom channel ID returned can be used to manipulate the created channel later. There are 10 slots for custom radio channels which would correspond to channels 6-15 (see getPlayerChannel). The command will find an unused index in this range and create it when found.
- Groups:
- Radio and ChatCustom Radio and Chat
Syntax
- Syntax:
- radioChannelCreate [color, label, callSign, units, sentenceType]
- Parameters:
- color: Array - RGBA color values
- label: String - label
- callSign: String - call sign
- units: Array - list of units in the channel
- sentenceType: Boolean - (Optional, default true)
- true - use Protocol message color from getArray (configFile >> "RscChatListDefault" >> "colorMessageProtocol")
- false - use Normal message color from getArray (configFile >> "RscChatListDefault" >> "colorMessage")
- Return Value:
- Number - created custom channel ID (used in customChat command), 0 if failed
Examples
- Example 1:
- _channelID = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], "Q-dance Radio", "%UNIT_NAME", [player1, player2]];
- Example 2:
- Example 3:
- Create custom channel and add all players to it, present and JIP:
if (isServer) then { private _channelName = "Q-dance Radio"; private _channelID = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], _channelName, "%UNIT_NAME", []]; if (_channelID == 0) exitWith {diag_log format ["Custom channel '%1' creation failed!", _channelName]}; [_channelID, {_this radioChannelAdd [player]}] remoteExec ["call", [0, -2] select isDedicated, _channelName]; };
Additional Information
- See also:
- radioChannelAdd radioChannelRemove radioChannelSetCallSign radioChannelSetLabel customChat customRadio setCurrentChannel currentChannel enableChannel channelEnabled getPlayerChannel
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
- Posted on Jan 21, 2016 - 13:30 (UTC)
- Make sure you add all units you intend to speak or receive messages on created custom channel to the channel.
- Posted on Nov 01, 2022 - 06:38 (UTC)
- Units are removed from the chat channel on RESPAWN. Be sure to add units back to their custom chat channels upon respawn via onPlayerRespawn.sqf or Respawn Event Handler.
Categories:
- Scripting Commands
- Introduced with Take On Helicopters version 1.00
- Take On Helicopters: New Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Radio and Chat
- Command Group: Custom Radio and Chat
- Scripting Commands: Global Effect
- Scripting Commands: Server Execution