setCurrentChannel: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(description, see also)
Line 9: Line 9:
__________________________________________________________________________________________
__________________________________________________________________________________________


| Sets given channel as current channel. Returns [[true]] on success. Channel / Number correspondence:  
| Sets given channel as current chat channel. Scripted way of selecting desired channel on the UI. The given channel may be disabled (see [[enableChannel]]), this is why this command returns boolean, [[true]] on success or [[false]] on failure. Correspondence between channel and number:
* 0 - Global
* 0 <nowiki>=</nowiki> Global
* 1 - Side
* 1 <nowiki>=</nowiki> Side
* 2 - Command
* 2 <nowiki>=</nowiki> Command
* 3 - Group
* 3 <nowiki>=</nowiki> Group
* 4 - Vehicle
* 4 <nowiki>=</nowiki> Vehicle
* 5 - Direct
* 5 <nowiki>=</nowiki> Direct (Is not detected by [[getPlayerChannel]])
* 6-15 <nowiki>=</nowiki> Custom Radio (see [[radioChannelCreate]])
|= Description
|= Description
____________________________________________________________________________________________
____________________________________________________________________________________________
Line 26: Line 27:
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>_isset = [[setCurrentChannel]] 5;</code> |= Example 1
|x1= <code>_isDirectSelected = [[setCurrentChannel]] 5; // sets Direct channel as current active</code> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________


|[[getPlayerChannel]], [[currentChannel]], [[enableChannel]]|= See also
|[[getPlayerChannel]], [[currentChannel]], [[enableChannel]], [[channelEnabled]], [[radioChannelCreate]]|= See also


}}
}}

Revision as of 01:32, 3 February 2016

-wrong parameter ("a3") defined!-[[:Category:Introduced with a3 version 1.42|1.42]]
Hover & click on the images for description

Description

Description:
Sets given channel as current chat channel. Scripted way of selecting desired channel on the UI. The given channel may be disabled (see enableChannel), this is why this command returns boolean, true on success or false on failure. Correspondence between channel and number:
Groups:
Uncategorised

Syntax

Syntax:
setCurrentChannel channel
Parameters:
channel: Number
Return Value:
Boolean

Examples

Example 1:
_isDirectSelected = setCurrentChannel 5; // sets Direct channel as current active

Additional Information

See also:
getPlayerChannelcurrentChannelenableChannelchannelEnabledradioChannelCreate

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

[[Category:Introduced with a3 version 1.42]][[ Category: a3: New Scripting Commands | SETCURRENTCHANNEL]][[ Category: a3: Scripting Commands | SETCURRENTCHANNEL]]

Notes

Bottom Section

Posted on December 9, 2015 - 16:45 (UTC)
Commy2
This command can be used together with custom radio channels, but an offset of 5 must be added to the index from radioChannelCreate. _index = radioChannelCreate [[1, 0, 0, 1], "Custom Channel 1", "%UNIT_NAME", [player]]; setCurrentChannel (_index + 5);