Message

Category: Messages
Since engine version: 4.6.5.0 CP

Description

Displays a message. Text can be formatted in C formatting style (see Format).

Syntax

bool Message (string strMessage, object pObj,  ...);

Parameters

strMessage:
Message to be displayed.
pObj:
[opt] Object above which to display the message. If unspecified or 0, the message is displayed globally.
...:
[opt] Additional formatting parameters

Remark

By using the character "|" a line break can be made. "<c AARRGGBB>Test</c>" results in "Test" printed in color (AA: transparency, RR: red, GG: green, BB blue; using hexadecimal notation). {{C4ID}} is printed as the picture of object with ID C4ID; by specifying a number, different parts of the picture graphics can be selected, e.g. {{C4ID:2}}.

Example

Message("Hallo %s!|Ich bin dein Clonk %s!", this(), GetPlayerName(GetOwner()), GetName());
This script will pop up a message above the clonk's head.
See also: AddMessage, CustomMessage, Log, PlayerMessage, PlrMessage
PeterW, Dezember 2001