commandChat: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "Category:Scripting Commands ArmA2" to "Category:Scripting Commands Arma 2") |
m (Changed unitName to unit to avoid misunderstandings) |
||
(40 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| arma2 | | |game1= arma2 | ||
|version1= 1.00 | |||
|1. | |game2= arma2oa | ||
|version2= 1.50 | |||
| | |game3= tkoh | ||
|version3= 1.00 | |||
| | |game4= arma3 | ||
|version4= 0.50 | |||
| | |arg= global | ||
| | |eff= local | ||
| | |gr1= Radio and Chat | ||
| | |gr2= Sounds | ||
| [[ | |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]].}} | ||
| | |s1= unit [[commandChat]] chatText | ||
| | |p1= unit: [[Object]] - unit transmitting message | ||
| | |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 37: | Line 46: | ||
* "OPF" | * "OPF" | ||
* "IND" | * "IND" | ||
* "IND_G" | * "IND_G" | ||
}} | |||
| | |p23= chatText: [[String]] - message to transmit | ||
|r2= [[Nothing]] | |r2= [[Nothing]] | ||
|x1= < | |x1= <sqf>_soldierOne commandChat "Show this text";</sqf> | ||
|x2= < | |x2= <sqf>[playerSide, "HQ"] commandChat "Do this! That's an order!";</sqf> | ||
|x3= [[File:xChat.jpg|right]] | |x3= [[File:xChat.jpg|right]] | ||
<sqf> | |||
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"; | ||
</sqf> | |||
| | |seealso= [[globalChat]] [[groupChat]] [[vehicleChat]] [[sideChat]] [[customChat]] [[systemChat]] [[commandRadio]] | ||
}} | }} | ||
Latest revision as of 09:16, 2 February 2024
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)
- 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:
- Example 3:
-
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
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
Categories:
- Scripting Commands
- Introduced with Arma 2 version 1.00
- Arma 2: New Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Radio and Chat
- Command Group: Sounds
- Scripting Commands: Local Effect