Nuclide
Software Development Kit for id Technology (BETA)
ncTalkMonster Class Reference

About this class

This class represents ncMonsters that talk.

QUAKED ncTalkMonster (0 0.8 0.8) (-16 -16 0) (16 16 72) WAITTILLSEEN GAG MONSTERCLIP x PRISONER x IGNOREPLAYER WAITFORSCRIPT PREDISASTER FADECORPSE MULTIPLAYER FALLING HORDE

OVERVIEW

This class represents ncMonsters that talk. They need to network extra information and can speak more complicated dialogue using the Sentences system.

They also can communicate with other ncTalkMonster based entities.

KEYS

  • "targetname" : Name
  • "netname" : Name used for obituaries and debug info.
  • "maxs" : Bounding box mins.
  • "mins" : Bounding box maxs.

KEYS - SENTENCES

  • "talk_answer" : SentenceDef to play when they're providing a generic answer to a question.
  • "talk_ask" : SentenceDef to play when they're asking a question.
  • "talk_ally_shot" : SentenceDef to play when they're commenting on an ally being shot.
  • "talk_greet" : SentenceDef to play when greeting an ally.
  • "talk_idle" : SentenceDef to play when idling about.
  • "talk_panic" : SentenceDef to play when the state from being calm changes to being fearful.
  • "talk_hearing" : SentenceDef to play when commenting on a suspicious noise.
  • "talk_smelling" : SentenceDef to play when commenting on a suspicious smell.
  • "talk_stare" : SentenceDef to play when commenting on the player staring at them.
  • "talk_survived" : SentenceDef to play when they've survived an attack.
  • "talk_wounded" : SentenceDef to play when they've been severely wounded.
  • "talk_alert" : SentenceDef to play when they've become alerted.
  • "talk_player_ask" : SentenceDef to play when they want to ask the player a question.
  • "talk_player_greet" : SentenceDef to play when they want to greet the player.
  • "talk_player_idle" : SentenceDef to play when they hang around the player.
  • "talk_player_wounded1" :
  • "talk_player_wounded2" :
  • "talk_player_wounded3" :
  • "talk_unfollow" : SentenceDef to play for when they're choosing to unfollow someone.
  • "talk_follow" : SentenceDef to play for when they're choosing follow someone.
  • "talk_stop_follow" : SentenceDef to play for when they're being asked to unfollow someone.
  • "talk_deny_follow" : SentenceDef to play for when they're denying the follow request.
  • "follow_on_use" : Can be either 0 or 1, will decide if they can follow someone.
  • "follow_dist" : Distance between the it and the player its following.
  • "follow_maxdist" : Maximum distance between it and the player before giving up following them.

For more keys, see ncMonster.

Inheritance diagram for ncTalkMonster:
ncSquadMonster ambient_generic monster_generic speaker

Public Member Functions

void ncTalkMonster (void)
 
virtual void Sentence (string)
 When called, will play a Sentence over the network. More...
 
virtual void Speak (string)
 When called, will play a single sample (.wav/.ogg) over the network. More...
 
virtual void WarnAllies (void)
 When called, will alert all allies in a nearby area. More...
 
virtual void StartleAllies (void)
 When called, will startle all allies in a nearby area. More...
 
virtual void FollowPlayer (void)
 Internal use only. More...
 
virtual void FollowChain (void)
 Internal use only. More...
 
virtual void RunAI (void)
 Internal use only. More...
 
virtual void PanicFrame (void)
 Run every frame if we're in a state of panic. More...
 
virtual void OnPlayerUse (void)
 
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 SpawnKey (string, string)
 This method handles entity key/value pairs on map load. 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 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 Touch (entity)
 Called whenever we're touching another entity. More...
 
virtual void TalkPanic (void)
 Called when they're in a state of panic. More...
 
virtual void TalkPlayerAsk (void)
 Called when they want to ask the player a question. More...
 
virtual void SeenPlayer (ncActor)
 Called when they are greeting the player. More...
 
virtual void SeenFriend (ncActor)
 Called when they are chit-chatting with the player. More...
 
virtual void TalkPlayerWounded1 (void)
 Called when they tell the player that they're wounded. More...
 
virtual void TalkPlayerWounded2 (void)
 Called when they tell the player that severely wounded. More...
 
virtual void TalkPlayerWounded3 (void)
 Called when they tell the player that they're near death. More...
 
virtual void TalkUnfollow (void)
 Called when they tell the player that they'll give up following. More...
 
virtual void TalkFollow (void)
 Called when they tell the player that they'll start following. More...
 
virtual void TalkStopFollow (void)
 Called when they tell the player that they'll stop following. More...
 
virtual void TalkDenyFollow (void)
 Called when they tell the player they won't follow you. More...
 
virtual float predraw (void)
 
virtual void ReceiveEntity (float, float)
 Client: Handles network updates from the server for the associated entity. More...
 
virtual void SentenceSample (string)
 Plays a single sample from a sentence. More...
 
virtual void ProcessWordQue (void)
 Called once per frame to process the word queue. More...
 
virtual void HandleAnimEvent (float, int, string)
 Callback for any model event that gets triggered while playing a framegroup. More...
 

Constructor & Destructor Documentation

◆ ncTalkMonster()

void ncTalkMonster::ncTalkMonster ( void  )

Member Function Documentation

◆ FollowChain()

void ncTalkMonster::FollowChain ( void  )
virtual

Internal use only.

Run every frame to update who we're following in the chain

◆ FollowPlayer()

void ncTalkMonster::FollowPlayer ( void  )
virtual

Internal use only.

Run every frame to run after the player we are set to follow.

◆ HandleAnimEvent()

void ncTalkMonster::HandleAnimEvent ( float  flTimeStamp,
int  iCode,
string  strData 
)
virtual

Callback for any model event that gets triggered while playing a framegroup.

Reimplemented from ncRenderableEntity.

◆ OnPlayerUse()

void ncTalkMonster::OnPlayerUse ( void  )
virtual

◆ PanicFrame()

void ncTalkMonster::PanicFrame ( void  )
virtual

Run every frame if we're in a state of panic.

◆ predraw()

virtual float ncTalkMonster::predraw ( void  )
virtual

Reimplemented from ncMonster.

Reimplemented in ambient_generic.

◆ ProcessWordQue()

virtual void ncTalkMonster::ProcessWordQue ( void  )
virtual

Called once per frame to process the word queue.

◆ ReceiveEntity()

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

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

Reimplemented from ncMonster.

Reimplemented in ambient_generic, and speaker.

◆ Respawn()

void ncTalkMonster::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 ncMonster.

Reimplemented in monster_generic, ambient_generic, and speaker.

◆ Restore()

void ncTalkMonster::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 ncSquadMonster.

Reimplemented in ambient_generic, and speaker.

◆ RunAI()

void ncTalkMonster::RunAI ( void  )
virtual

Internal use only.

Run every frame to go through the main AI loop.

Reimplemented from ncMonster.

◆ Save()

void ncTalkMonster::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 ncSquadMonster.

Reimplemented in ambient_generic, and speaker.

◆ SeenFriend()

void ncTalkMonster::SeenFriend ( ncActor  theActor)
virtual

Called when they are chit-chatting with the player.

Reimplemented from ncMonster.

◆ SeenPlayer()

void ncTalkMonster::SeenPlayer ( ncActor  thePlayer)
virtual

Called when they are greeting the player.

Reimplemented from ncMonster.

◆ SendEntity()

float ncTalkMonster::SendEntity ( entity  ,
float   
)
virtual

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

Reimplemented from ncMonster.

Reimplemented in ambient_generic, and speaker.

◆ Sentence()

void ncTalkMonster::Sentence ( string  sentence)
virtual

When called, will play a Sentence over the network.

◆ SentenceSample()

virtual void ncTalkMonster::SentenceSample ( string  )
virtual

Plays a single sample from a sentence.

Reimplemented in ambient_generic.

◆ SpawnKey()

void ncTalkMonster::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 ncSquadMonster.

Reimplemented in ambient_generic, and speaker.

◆ Speak()

void ncTalkMonster::Speak ( string  sentence)
virtual

When called, will play a single sample (.wav/.ogg) over the network.

◆ StartleAllies()

void ncTalkMonster::StartleAllies ( void  )
virtual

When called, will startle all allies in a nearby area.

◆ TalkDenyFollow()

void ncTalkMonster::TalkDenyFollow ( void  )
virtual

Called when they tell the player they won't follow you.

◆ TalkFollow()

void ncTalkMonster::TalkFollow ( void  )
virtual

Called when they tell the player that they'll start following.

◆ TalkPanic()

void ncTalkMonster::TalkPanic ( void  )
virtual

Called when they're in a state of panic.

◆ TalkPlayerAsk()

void ncTalkMonster::TalkPlayerAsk ( void  )
virtual

Called when they want to ask the player a question.

◆ TalkPlayerWounded1()

void ncTalkMonster::TalkPlayerWounded1 ( void  )
virtual

Called when they tell the player that they're wounded.

◆ TalkPlayerWounded2()

void ncTalkMonster::TalkPlayerWounded2 ( void  )
virtual

Called when they tell the player that severely wounded.

◆ TalkPlayerWounded3()

void ncTalkMonster::TalkPlayerWounded3 ( void  )
virtual

Called when they tell the player that they're near death.

◆ TalkStopFollow()

void ncTalkMonster::TalkStopFollow ( void  )
virtual

Called when they tell the player that they'll stop following.

◆ TalkUnfollow()

void ncTalkMonster::TalkUnfollow ( void  )
virtual

Called when they tell the player that they'll give up following.

◆ Touch()

void ncTalkMonster::Touch ( entity  eToucher)
virtual

Called whenever we're touching another entity.

Reimplemented from ncMonster.

◆ WarnAllies()

void ncTalkMonster::WarnAllies ( void  )
virtual

When called, will alert all allies in a nearby area.


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