Nuclide
Software Development Kit for id Technology
trigger_multiple Class Reference

About this class

Server-Entity: Multi Use Trigger Volume.

QUAKED trigger_multiple (.5 .5 .5) ? CLIENTS NPCS PUSHABLES PHYSICS FRIENDLIES CLIENTSINVEHICLES EVERYTHING x x CLIENTSNOTINVEHICLES DEBRIS NPCSINVEHICLES NOBOTS

OVERVIEW

A trigger volume which works more than once.

KEYS

  • "targetname" : Name
  • "target" : Target when triggered.
  • "killtarget" : Target to kill when triggered.
  • "delay" : Delay until target is triggered.
  • "wait" : Time until this entity can trigger again
  • "StartDisabled" : Entity will have to be enabled in order to work when set to 1.

INPUTS

  • "Enable" : Enable the entity.
  • "Disable" : Disable the entity.
  • "Toggle" : Toggles between enabled/disabled states.

OUTPUTS

  • "OnStartTouch": Triggered when something starts touching this volume
  • "OnEndTouchAll": Triggered when nothing touched the entity no more

SPAWNFLAGS

  • TF_CLIENTS (1) : Clients can touch it.
  • TF_NPCS (2) : NPCs can touch it.
  • TF_PUSHABLE (4) : Pushables can touch it.
  • TF_PHYSICS (8) : NSPhysicsEntity based classes can touch it.
  • TF_FRIENDLIES (16) : Friendly NPCs can touch it.
  • TF_CLIENTSINVEHICLES (32) : Clients within vehicles can touch it.
  • TF_EVERYTHING (64) : Everything can touch it.
  • TF_CLIENTSNOTINVEHICLES (512) : Clients outside vehicles can touch it.
  • TF_DEBRIS (1024) : Debris can touch it.
  • TF_NPCSINVEHICLES (2048) : NPCs in vehicles can touch it.
  • TF_NOBOTS (4096) : Bots are never allowed to touch it.

SPAWNFLAGS (LEGACY)

These work when 'StartDisabled' is not set in the entity definition.

  • TM_MONSTERS (1) : Allow NPCs to activate this entity.
  • TM_NOCLIENTS (2) : Don't allow players to activate this entity.
  • TM_PUSHABLES (4) : Allow func_pushables to trigger this entity.

NOTES

If you want an entity like this that can only be used once, see trigger_once.

TRIVIA

This entity was introduced in Quake (1996).

Inheritance diagram for trigger_multiple:
NSBrushTrigger

Public Member Functions

void trigger_multiple (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 Touch (entity)
 Called whenever we're touching another entity. 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...
 
virtual void EndTouch (entity)
 Called when we stopped touching the last touched entity. More...
 

Constructor & Destructor Documentation

◆ trigger_multiple()

void trigger_multiple::trigger_multiple ( void  )

Member Function Documentation

◆ EndTouch()

void trigger_multiple::EndTouch ( entity  eToucher)
virtual

Called when we stopped touching the last touched entity.

Reimplemented from NSTrigger.

◆ Input()

void trigger_multiple::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 trigger_multiple::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_multiple::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_multiple::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_multiple::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_multiple::Touch ( entity  eToucher)
virtual

Called whenever we're touching another entity.

Reimplemented from NSTrigger.


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