Nuclide
Software Development Kit for id Tech
scripted_sentence Class Reference

Server-Entity: Voice Acted Sequence Controller. More...

Inheritance diagram for scripted_sentence:
NSPointTrigger

Public Member Functions

void scripted_sentence (void)
 
virtual void Spawned (void)
 Called when the entity is fulled initialized. More...
 
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...
 
nonvirtual void AllowRefire (void)
 
nonvirtual void SentenceEnded (void)
 

Detailed Description

Server-Entity: Voice Acted Sequence Controller.

QUAKED scripted_sentence (1 0 0) (-8 -8 -8) (8 8 8)

OVERVIEW

Triggers a sound event on the client side associated with an entity in the world. It'll enable mouth flapping and all sorts of other cool effects.

KEYS

  • "targetname" : Name
  • "target" : Target when triggered.
  • "killtarget" : Target to kill when triggered.
  • "entity" : Name of the entity that'll speak the sentence.
  • "sentence" : Name of sentence from titles.txt.
  • "pitch" : Desired sound pitch. May be overridden in the titles.txt entry.
  • "delay" : Delay before it'll be triggered.
  • "wait" : Delay before it can be triggered again? UNUSED RIGHT NOW.
  • "listener" : The name of the entity we'll look at when speaking. Can be "player".
  • "refire" : Additional time in seconds before the entity can be triggered again.
  • "duration" : Time after which the target stops talking.

INPUTS

  • "BeginSentence" : Starts the sentence.

OUTPUTS

  • "OnBeginSentence" : Fired when the sentence starts.
  • "OnEndSentence" : Fired when the sentence ends.

TRIVIA

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

Constructor & Destructor Documentation

◆ scripted_sentence()

void scripted_sentence::scripted_sentence ( void  )

Member Function Documentation

◆ AllowRefire()

void scripted_sentence::AllowRefire ( void  )

◆ Input()

void scripted_sentence::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 scripted_sentence::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 scripted_sentence::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.

◆ SentenceEnded()

void scripted_sentence::SentenceEnded ( void  )

◆ Spawned()

void scripted_sentence::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 NSEntity.

◆ SpawnKey()

void scripted_sentence::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 scripted_sentence::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: