Other great resources: Official JS API docs, Scripting Forum
chat()
- Aubergine
Owned by Aubergine
Send an in-game message to a specific player, your alliance or everyone.
Syntax
chat(to, message);
Parameters
Parameter | Type | Mandatory | Description | Game version |
---|---|---|---|---|
to | Number, Constant | Who should the message be sent to?
| 3.2 | |
message | String | The message to send to the recipient. | 3.2 |
Return value
Notes
When you send a chat message to another player, it will echo the message to your own eventChat().
Examples
Send a message to your allies
chat(ALLIES, "Hello friends");
Send a message to player 2
// remember that players are zero-referenced, so player #1 = 0, player #2 = 1, etc. chat(1, "Hello player 2");
Availability 3.2+
Requires:
- Warzone 3.2 and above.
Contents
Jump to:
See also
Related API features:
- Player Scope – constants relating to chat messages
- eventChat() – receive chat messages
- console() – send a message to the script's player console
- debug() – send a message to the terminal or logs
Add-on APIs: