PrintBold

From ZDoom Wiki
Jump to navigation Jump to search
Note: due to an oversight, the engine executes Print when this function is called. The function still prints to all player screens, but its default color is different. To rectify that, the CorrectPrintBold MAPINFO property must be set to true.


void PrintBold(item(s));

Usage

This is exactly the same as Print, except all players will see the printed text on the screen instead of just the activator of the script. It also uses a different default color. For a detailed description of the syntax, refer to Print.

Examples

This command is useful if you want a monster triggered script to print something to the screen. One way a monster can trigger a script is by setting it to their special field, so that when they die (or are otherwise activated), the script is run. Another possibility is to have ACS_Execute (or one of its variants) in one of the state in a custom actor's DECORATE code. This script takes one parameter, which is the TID of the monster which has this script.

script 99 (int monsterid)
{
	Thing_SpawnNoFog(monsterid, T_REDSKULLKEY, 0, 0);
	PrintBold(s:"The boss has been defeated!");
}

To clarify: set the monster TID to something unique, and the special to 80 (ACS_Execute). Set the parameters to (99, 0, monster's TID, 0, 0). When the monster is killed, a message will be reported to all players and the monster will drop a red skull key.