commandChat: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>")
m (Changed unitName to unit to avoid misunderstandings)
 
(5 intermediate revisions by one other user not shown)
Line 23: Line 23:
|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]])
|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 {{ic|simulation [[=]] "ItemRadio";}} in its [[CfgWeapons_Config_Reference#simulation.3D.22Weapon.22|CfgWeapons config]].}}
{{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]].}}


|s1= unitName [[commandChat]] chatText
|s1= unit [[commandChat]] chatText


|p1= unitName: [[Object]] - unit transmitting message
|p1= unit: [[Object]] - unit transmitting message


|p2= chatText: [[String]] - message to transmit
|p2= chatText: [[String]] - message to transmit
Line 35: Line 35:
|s2= [side, identity] [[commandChat]] chatText
|s2= [side, identity] [[commandChat]] chatText


|p21= [side, identity]: [[Array]]
|p21= side: [[Side]] - side to which the message will be seen


|p22= 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|
|p23= identity: [[String]] - class name of one of the identities in CfgHQIdentities. Possible identities in {{arma3}} are:
* "Base"
* "Base"
* "HQ"
* "HQ"
Line 48: Line 47:
* "IND"
* "IND"
* "IND_G"
* "IND_G"
}}


|p24= chatText: [[String]] - message to transmit
|p23= chatText: [[String]] - message to transmit


|r2= [[Nothing]]
|r2= [[Nothing]]


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


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


|x3= [[File:xChat.jpg|right]]
|x3= [[File:xChat.jpg|right]]
[[driver]] [[vehicle]] [[player]] [[sideChat]] "sideChat";
<sqf>
[[driver]] [[vehicle]] [[player]] [[globalChat]] "globalChat";
driver vehicle player sideChat "sideChat";
[[driver]] [[vehicle]] [[player]] [[groupChat]] "groupChat";
driver vehicle player globalChat "globalChat";
[[vehicle]] [[player]] [[vehicleChat]] "vehicleChat";
driver vehicle player groupChat "groupChat";
[[driver]] [[vehicle]] [[player]] [[commandChat]] "commandChat";
vehicle player vehicleChat "vehicleChat";
[[driver]] [[vehicle]] [[player]] [[customChat]] [1, "customChat"];
driver vehicle player commandChat "commandChat";
[[systemChat]] "systemChat";
driver vehicle player customChat [1, "customChat"];
<br><!-- needed for the text to display properly with the float…??? -->
systemChat "systemChat";
</sqf>


|seealso= [[globalChat]] [[groupChat]] [[vehicleChat]] [[sideChat]] [[customChat]] [[systemChat]] [[commandRadio]]
|seealso= [[globalChat]] [[groupChat]] [[vehicleChat]] [[sideChat]] [[customChat]] [[systemChat]] [[commandRadio]]
}}
}}

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