Nuclide
Software Development Kit for id Tech
game_text Class Reference

Server-Entity: Custom Text Message Display. More...

Inheritance diagram for game_text:
NSPointTrigger

Public Member Functions

void game_text (void)
 
virtual void Save (float)
 Handles saving a copy of this entity to a given filehandle. More...
 
virtual void Restore (string, string)
 Similar to NSIO::SpawnKey but for save-game fields. More...
 
virtual void SpawnKey (string, string)
 This method handles entity key/value pairs on map load. More...
 
virtual void Trigger (entity, triggermode_t)
 Called whenever we're legacy triggered by another object or function. More...
 
virtual void Input (entity, string, string)
 Called when we are being prompted by another object/function with an input message. More...
 

Detailed Description

Server-Entity: Custom Text Message Display.

QUAKED game_text (1 0 0) (-8 -8 -8) (8 8 8) GTF_ALLPLAYERS

OVERVIEW

This entity displays a message of your choice on-screen.

KEYS

  • "targetname" : Name
  • "message" : Text to display. Can be a titles.txt entry.
  • "x" : Horizontal position of text. (0 - 1.0 = left to right, -1 = center)
  • "y" : Vertical position of text. (0 - 1.0 = top to bottom, -1 = center)
  • "effect" : Effect to apply to the text. 0 : Fade In/Out; 1 : Credits; 2 : Scan Out
  • "color" : The main colour in RGB255.
  • "color2" : The highlight colour in RGB255.
  • "fadein" : Time taken to fade in each character.
  • "fadeout" : Time taken to fade out message.
  • "holdtime" : Length of time to hold message on screen after fading in.
  • "fxtime" : Time the highlight lags behind the leading edge of the text in seconds.
  • "channel" : Message channel to use. Meant for overriding messages.

SPAWNFLAGS

  • GTF_ALLPLAYERS (1) : Broadcast message to all players, not just the activator.

NOTES

Line breaks inside "message" can be added with a
character.

TRIVIA

This entity was introduced in Half-Life (1998).

Constructor & Destructor Documentation

◆ game_text()

void game_text::game_text ( void  )

Member Function Documentation

◆ Input()

void game_text::Input ( entity  eAct,
string  strInput,
string  strData 
)
virtual

Called when we are being prompted by another object/function with an input message.

Reimplemented from NSEntity.

◆ Restore()

void game_text::Restore ( string  strKey,
string  strValue 
)
virtual

Similar to NSIO::SpawnKey but for save-game fields.

Whatever you write into file handles within your NSIO::Save() method needs to be read back in here.

Reimplemented from NSPointTrigger.

◆ Save()

void game_text::Save ( float  handle)
virtual

Handles saving a copy of this entity to a given filehandle.

Within you want to use the NSIO::SaveFloat() etc. methods to write the internal member attributes to the specified file handle.

Reimplemented from NSPointTrigger.

◆ SpawnKey()

void game_text::SpawnKey ( string  strKey,
string  strValue 
)
virtual

This method handles entity key/value pairs on map load.

You can easily convert the strValue parameter using the ReadFloat etc. methods that are part of NSIO.

Reimplemented from NSPointTrigger.

◆ Trigger()

void game_text::Trigger ( entity  act,
triggermode_t  state 
)
virtual

Called whenever we're legacy triggered by another object or function.

Reimplemented from NSTrigger.


The documentation for this class was generated from the following file: