Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt

Send an in-game message to a specific player, your alliance or everyone.

...

Availability

Warzone 3.2 and above.

Syntax

Code Block
themeEclipse
languagejavascript
linenumberstrue
chat(to,message);

...

ParameterTypeMandatoryDescriptionGame version
to

Number,

Constant

(tick)

Who should the message be sent to?

  • Specify a player id to send to that specific player
  • Or use one of the following constants:
    Child pages (Children Display)
    alltrue
    depthall
    pageChat Scope
    excerpttrue
3.2
messageString(tick)The message to send to the recipient.3.2

Return value

Not know at present.(question) It's not clear from the C++ code (to me at least) what the return values might be (sad)

Example

Code Block
themeEclipse
languagejavascript
titleSend a message to your allies
linenumberstrue
chat(ALLIES,"Hello friends");
Code Block
themeEclipse
languagejavascript
titleSend a message to player 2
linenumberstrue
// remember that players are zero-referenced, so player #1 = 0, player #2 = 1, etc.
chat(1,"Hello player 2");

...

See also