Colobot Wiki
Advertisement

Syntax:

message ( text, type );

Prints a message on top of the screen. After a few seconds, the message disappears automatically.

text: string[]

Text that is to be displayed. It is possible to append several texts and/or values with the operator +:

message("Not found");
message(angle);
message(n + " object(s) found");
message("Distance = " + dist + " meters");

type: int (default value DisplayMessage)[]

Type of the message, that determines the background color. 

  • DisplayMessage  Standard message on yellow background.
  • DisplayInfo     Information on green background.
  • DisplayWarning  Warning on blue background.
  • DisplayError    Error on red background.

Return value: void[]

None.

Advertisement