commandChat: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|PARAMETER3= |p24=" to "|PARAMETER23= |p24=")
m (Changed unitName to unit to avoid misunderstandings)
 
(44 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma2 |Game name=
|game1= arma2
|version1= 1.00


|1.00|Game version=
|game2= arma2oa
|version2= 1.50


|arg= global |Multiplayer Arguments=
|game3= tkoh
|version3= 1.00


|eff= local |Multiplayer Effects=
|game4= arma3
____________________________________________________________________________________________
|version4= 0.50


| Types text to the command radio channel. Must have assigned "ItemRadio" to see or transmit the messages. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see [[remoteExec]]) |DESCRIPTION=
|arg= global
____________________________________________________________________________________________


|eff= local


| unitName '''commandChat''' chatText |SYNTAX=
|gr1= Radio and Chat


|p1= unitName: [[Object]] - unit transmitting message|PARAMETER1=
|gr2= Sounds
|p2= chatText: [[String]] - message to transmit |PARAMETER2=


| [[Nothing]] |RETURNVALUE=
|descr= Types text to the command radio channel. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see [[remoteExec]])


{{Feature|important|The unit must have an [[assignItem|assigned]] radio item (such as '''''"ItemRadio"''''') to see or transmit the messages. A radio item must have the property <syntaxhighlight lang="cpp" inline>simulation = "ItemRadio";</syntaxhighlight> in its [[CfgWeapons_Config_Reference#simulation.3D.22Weapon.22|CfgWeapons config]].}}


|s2= [side, identity] '''commandChat''' chatText |SYNTAX2=
|s1= unit [[commandChat]] chatText


|p21= [side, identity]: [[Array]] |PARAMETER21=
|p1= unit: [[Object]] - unit transmitting message
|p22= side: [[Side]] - side to which the message will be seen |PARAMETER22=
 
|p23= identity: [[String]] - class name of one of the identities in CfgHQIdentities. Possible identities in Arma 3 are:
|p2= chatText: [[String]] - message to transmit
 
|r1= [[Nothing]]
 
|s2= [side, identity] [[commandChat]] chatText
 
|p21= side: [[Side]] - side to which the message will be seen
 
|p22= identity: [[String]] - class name of one of the identities in CfgHQIdentities. Possible identities in {{arma3}} are:
{{Columns|2|
* "Base"
* "Base"
* "HQ"
* "HQ"
Line 35: Line 46:
* "OPF"
* "OPF"
* "IND"
* "IND"
* "IND_G" |PARAMETER23=
* "IND_G"
}}


|p24= chatText: [[String]] - message to transmit |PARAMETER4=
|p23= chatText: [[String]] - message to transmit
|r2=  [[Nothing]] |RETURNVALUE=


|r2= [[Nothing]]


|x1= <code>_soldierOne [[commandChat]] "Show this text";</code>|EXAMPLE1=
|x1= <sqf>_soldierOne commandChat "Show this text";</sqf>


|x2= <code><nowiki>[</nowiki>[[playerSide]], "HQ"] [[commandChat]] "Do this! That's an order!";</code>|EXAMPLE2=
|x2= <sqf>[playerSide, "HQ"] commandChat "Do this! That's an order!";</sqf>


|x3= <code>[[driver]] [[vehicle]] [[player]] [[sideChat]] "sideChat";
|x3= [[File:xChat.jpg|right]]
[[driver]] [[vehicle]] [[player]] [[globalChat]] "globalChat";
<sqf>
[[driver]] [[vehicle]] [[player]] [[groupChat]] "groupChat";
driver vehicle player sideChat "sideChat";
[[vehicle]] [[player]] [[vehicleChat]] "vehicleChat";
driver vehicle player globalChat "globalChat";
[[driver]] [[vehicle]] [[player]] [[commandChat]] "commandChat";
driver vehicle player groupChat "groupChat";
[[driver]] [[vehicle]] [[player]] [[customChat]] [1, "customChat"];
vehicle player vehicleChat "vehicleChat";
[[systemChat]] "systemChat";</code>
driver vehicle player commandChat "commandChat";
<br>[[Image:xChat.jpg]]|EXAMPLE3=
driver vehicle player customChat [1, "customChat"];
systemChat "systemChat";
</sqf>


| [[globalChat]], [[groupChat]], [[vehicleChat]], [[sideChat]], [[customChat]], [[systemChat]], [[commandRadio]] |SEEALSO=
|seealso= [[globalChat]] [[groupChat]] [[vehicleChat]] [[sideChat]] [[customChat]] [[systemChat]] [[commandRadio]]
 
|  |MPBEHAVIOUR=
____________________________________________________________________________________________
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 09:16, 2 February 2024

Hover & click on the images for description

Description

Description:
Types text to the command radio channel. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec)
The unit must have an assigned radio item (such as "ItemRadio") to see or transmit the messages. A radio item must have the property simulation = "ItemRadio"; in its CfgWeapons config.
Groups:
Radio and ChatSounds

Syntax

Syntax:
unit commandChat chatText
Parameters:
unit: Object - unit transmitting message
chatText: String - message to transmit
Return Value:
Nothing

Alternative Syntax

Syntax:
[side, identity] commandChat chatText
Parameters:
side: Side - side to which the message will be seen
identity: String - class name of one of the identities in CfgHQIdentities. Possible identities in Arma 3 are:
  • "Base"
  • "HQ"
  • "PAPA_BEAR"
  • "AirBase"
  • "BLU"
  • "OPF"
  • "IND"
  • "IND_G"
chatText: String - message to transmit
Return Value:
Nothing

Examples

Example 1:
_soldierOne commandChat "Show this text";
Example 2:
[playerSide, "HQ"] commandChat "Do this! That's an order!";
Example 3:
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";

Additional Information

See also:
globalChat groupChat vehicleChat sideChat customChat systemChat commandRadio

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