Nuclide
Software Development Kit for id Tech
trigger_hurt Class Reference

Server-Entity: Damages/Hurts Characters. More...

Inheritance diagram for trigger_hurt:
NSBrushTrigger

Public Member Functions

void trigger_hurt (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 Trigger (entity, triggermode_t)
 Called whenever we're legacy triggered by another object or function. More...
 
virtual void Touch (entity)
 Called whenever we're touching another entity. 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 SpawnKey (string, string)
 This method handles entity key/value pairs on map load. 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: Damages/Hurts Characters.

QUAKED trigger_hurt (.5 .5 .5) ? SF_HURT_ONCE SF_HURT_OFF x SF_HURT_NOPLAYERS SF_HURT_FIREONPLAYER SF_HURT_TOUCHPLAYER

OVERVIEW

Trigger volume that damages everything it touches.

KEYS

  • "targetname" : Name
  • "target" : Target when triggered.
  • "delay" : Delay until target is triggered.
  • "killtarget" : Target to kill when triggered.
  • "dmg" : Damage inflicted.

SPAWNFLAGS

  • SF_HURT_ONCE (1) : Stop once it's been triggered the first time.
  • SF_HURT_OFF (2) : Needs to be triggered in order to work again.
  • SF_HURT_NOPLAYERS (8) : Will only hurt NPCs.
  • SF_HURT_TOUCHPLAYER (16) : Will only hurt players.
  • SF_HURT_FIREONPLAYER (32) : Only trigger a target if a player activates it.

TRIVIA

This entity was introduced in Quake (1996).

Constructor & Destructor Documentation

◆ trigger_hurt()

void trigger_hurt::trigger_hurt ( void  )

Member Function Documentation

◆ Input()

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

◆ Respawn()

void trigger_hurt::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 NSBrushTrigger.

◆ Restore()

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

◆ Save()

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

◆ Spawned()

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

◆ Touch()

void trigger_hurt::Touch ( entity  eToucher)
virtual

Called whenever we're touching another entity.

Reimplemented from NSTrigger.

◆ Trigger()

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