C-style formatting codes can be used in the messages to change their color and break them onto multiple lines. To break the text onto another line, use "\n". To change the text color, use "\c" followed by a color selector. The color selector can be one of the following:
Selector | Color |
---|---|
A | Brick |
B | Tan |
C | Grey/White |
D | Green |
E | Brown |
F | Gold |
G | Red |
H | Blue |
I | Orange |
- | The user's preferred color |
+ | A color guaranteed to be different from - |
Each time a new line begins, the text automatically is automatically changed to the user's preferred color.
If you want to print a backslash (which you can't because it's not in the Doom font), use "\\".
Examples:
print (s: "this is line 1\nthis is line 2");is displayed as:
this is line 1
this is line 2
print (s: "\cGThis is red\nThis is what the player likes");is displayed as:
This is redwith the first line in red, and the second being whatever color the player has set as the preferred color.
This is what the player likes
print (s: "\cDThis is green\n\cDSo is this");is displayed as:
This is greenwith both lines in green
So is this
print (s: "Some \c+words\c- are different");is displayed as:
Some words are differentwith everything but "words" being in the preferred color. "Words" is guaranteed not to be, although which color it is depends on what the preferred color is.
print (s: "There is a backslash here -> \\");would be displayed as:
There is a backslash here -> \except Doom doesn't have a backslash character, so it ends up as:
There is a backslash here ->