Nuclide
Software Development Kit for id Technology (BETA)

About this class

Shared-Entity: Announcement Speaker System.

QUAKED speaker (1 0 0) (-8 -8 -8) (8 8 8)

OVERVIEW

Creates a public announcement system that randomly plays announcements from the sentences.txt file.

KEYS

  • "targetname" : Name
  • "preset" : Preset sentence group.
  • "message" : Sentence group name (used when preset is 0)
  • "health" : Message volume (value from 0-10)

NOTES

Valid values for 'preset":

  • 0 = Use Sentence group name
  • 1 = C1A0_
  • 2 = C1A1_
  • 3 = C1A2_
  • 4 = C1A3_
  • 5 = C1A4_
  • 6 = C2A1_
  • 7 = C2A2_
  • 8 = C2A3_
  • 9 = C2A4_
  • 10 = C2A5_
  • 11 = C3A1_
  • 12 = C3A2_

TRIVIA

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

Inheritance diagram for speaker:
ncTalkMonster

Public Member Functions

void speaker (void)
 
virtual void Save (float)
 Handles saving a copy of this entity to a given filehandle. More...
 
virtual void Restore (string, string)
 Similar to ncIO::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 Spawned (void)
 Called when the entity is fulled initialized. More...
 
virtual void Respawn (void)
 Server: Called when the entity first spawns or when game-logic requests the entity to return to its original spawn state. More...
 
virtual void Trigger (entity, triggermode_t)
 Called whenever we're legacy triggered by another object or function. More...
 
nonvirtual void Announce (void)
 
virtual void EvaluateEntity (void)
 Run each tic after physics are run to determine if we need to send updates over the network. More...
 
virtual float SendEntity (entity, float)
 Called by the engine whenever we need to send a client an update about this entity. More...
 
virtual void ReceiveEntity (float, float)
 Client: Handles network updates from the server for the associated entity. More...
 

Constructor & Destructor Documentation

◆ speaker()

void speaker::speaker ( void  )

Member Function Documentation

◆ Announce()

void speaker::Announce ( void  )

◆ EvaluateEntity()

void speaker::EvaluateEntity ( void  )
virtual

Run each tic after physics are run to determine if we need to send updates over the network.

Reimplemented from ncMonster.

◆ ReceiveEntity()

void speaker::ReceiveEntity ( float  flNew,
float  flChanged 
)
virtual

Client: Handles network updates from the server for the associated entity.

Reimplemented from ncTalkMonster.

◆ Respawn()

void speaker::Respawn ( void  )
virtual

Server: Called when the entity first spawns or when game-logic requests the entity to return to its original spawn state.

Reimplemented from ncTalkMonster.

◆ Restore()

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

Similar to ncIO::SpawnKey() but for save-game fields.

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

Reimplemented from ncTalkMonster.

◆ Save()

void speaker::Save ( float  handle)
virtual

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

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

Reimplemented from ncTalkMonster.

◆ SendEntity()

float speaker::SendEntity ( entity  ,
float   
)
virtual

Called by the engine whenever we need to send a client an update about this entity.

Reimplemented from ncTalkMonster.

◆ Spawned()

void speaker::Spawned ( void  )
virtual

Called when the entity is fulled initialized.

Any spawn key/value info pairs have already been dealt with. So now we can make full decisions on the entity. Always make sure to call super::Spawned(); inside your method when overriding.

Reimplemented from ncSquadMonster.

◆ SpawnKey()

void speaker::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 ncIO.

Reimplemented from ncTalkMonster.

◆ Trigger()

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

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

Reimplemented from ncMonster.


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