Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Comment:
Migrated to Confluence 5.3
Excerpt |
---|
Send an in-game message to a specific player, your alliance or everyone. |
Syntax
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
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
It's not clear from the C++ code (to me at least) what the return values might be
ExampleNotes
When you send a chat message to another player, it will echo the message to your own eventChat().
Examples
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
chat(ALLIES, "Hello friends"); |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
// remember that players are zero-referenced, so player #1 = 0, player #2 = 1, etc.
chat(1, "Hello player 2"); |
Div | ||||||
---|---|---|---|---|---|---|
| ||||||
Availability
Requires:
|
Div | ||||
---|---|---|---|---|
| ||||
ContentsJump to:
|
Div | ||
---|---|---|
| ||
See alsoRelated API features:
Add-on APIs: |