Nuclide
Software Development Kit for id Tech
trigger_teleport Class Reference
Inheritance diagram for trigger_teleport:
NSBrushTrigger

Public Member Functions

void trigger_teleport (void)
 
virtual void Touch (entity)
 Called whenever we're touching another entity. 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 SpawnKey (string, string)
 This method handles entity key/value pairs on map load. More...
 
virtual void Save (float)
 Handles saving a copy of this entity to a given filehandle. More...
 
virtual void Restore (string, string)
 Similar to ::SpawnKey but for save-game fields. More...
 
nonvirtual bool CanPass (NSEntity)
 

Detailed Description

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

OVERVIEW

Teleportation volume. Teleports anything it touches to the position of any entity set as the "target".

KEYS

  • "targetname" : Name
  • "target" : Which target to teleport to.
  • "snd_teleport" : SoundDef to play on the entity teleporting.
  • "snd_teleport_enter" : SoundDef to play on the teleporter entrance.
  • "snd_teleport_exit" : SoundDef to play on the teleporter exit.
  • "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.

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

Works best with info_teleport_destination, but you can in theory use any other point entity as well.

TRIVIA

This entity was introduced in Quake (1996).

Constructor & Destructor Documentation

◆ trigger_teleport()

void trigger_teleport::trigger_teleport ( void  )

Member Function Documentation

◆ CanPass()

bool trigger_teleport::CanPass ( NSEntity  target)

◆ Respawn()

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

◆ Restore()

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

Similar to ::SpawnKey but for save-game fields.

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

Reimplemented from NSEntity.

◆ Save()

void trigger_teleport::Save ( float  handle)
virtual

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

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

Reimplemented from NSEntity.

◆ Spawned()

void trigger_teleport::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_teleport::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_teleport::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: