gui.AddCaption
Description
Pushes text to the closed caption box.
The function will not work, if the console command variable
closecaption
is set to 0.Arguments
1 string captionStream
The caption to emit. See Closed Captions for more info.
Note the ability to add special commands to captions, such as <sfx>
to mark the caption as a sound effect caption, which would be hidden if cc_subtitles
is set to 1. (To only show dialogue subtitles)
3 boolean fromPlayer = false
Is this caption coming from the player?
This is used to give different colors to the caption to differentiate, for example, whether the SMG is fired by the player or an NPC.
Example
Prints "Hello World" in bold