Nuclide
Software Development Kit for id Technology
trigger_changelevel Class Reference

About this class

Server-Entity: Triggers Level Changes.

QUAKED trigger_changelevel (.5 .5 .5) ? NO_INTERMISSION TRIGGER_ONLY

OVERVIEW

A trigger volume that initiates a level change, from one map to the next. It can be used in combination with info_landmark and trigger_transition to define a shared point and a transition area for entities respectively.

KEYS

  • "targetname" : Name
  • "map" : Next .bsp file name to transition to.
  • "landmark" : Landmark name to target.
  • "changedelay" : Time in seconds until the transition happens.

INPUTS

  • "ChangeLevel" : Triggers the level to change.

OUTPUTS

  • "OnChangeLevel" : Fired when the level changes.

SPAWNFLAGS

  • NO_INTERMISSION (1) : Don't show intermission cam (unimplemented).
  • TRIGGER_ONLY (2) : Can't activate through touching, only via triggers.

NOTES

When a landmark is specified, you will have to position two info_landmark entities across your two levels with the same name. They'll mark a translation point for the coordinates in your levels.

If you have set a landmark, you might also want to restrict the area in which entities get carried across to the next level. This is accomplished by placing a trigger_transition volume with the same name as the specified landmark.

If you do not make use of the trigger_transition entity, it will carry over all of the entities that are in the same PVS (room and attached hallways) of the info_landmark.

The PVS-culling method can prove difficult to work with. Developers have been spotted using 'killtarget' on entities before level transitions take place to manually filter through them (Half-Life's c1a0e - c1a0c).

TRIVIA

This entity was introduced in Quake (1996).

Inheritance diagram for trigger_changelevel:
NSBrushTrigger

Public Member Functions

void trigger_changelevel (void)
 
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 RestoreComplete (void)
 Called when the entity has been successfully restored from a savegame file. More...
 
virtual void SpawnKey (string, string)
 This method handles entity key/value pairs on map load. 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 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...
 
virtual void Change (void)
 
virtual void Touch (entity)
 Called whenever we're touching another entity. More...
 
virtual int IsInside (entity, entity)
 

Constructor & Destructor Documentation

◆ trigger_changelevel()

void trigger_changelevel::trigger_changelevel ( void  )

Member Function Documentation

◆ Change()

void trigger_changelevel::Change ( void  )
virtual

◆ Input()

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

◆ IsInside()

int trigger_changelevel::IsInside ( entity  ePlayer,
entity  eVolume 
)
virtual

◆ Respawn()

void trigger_changelevel::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_changelevel::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.

◆ RestoreComplete()

void trigger_changelevel::RestoreComplete ( void  )
virtual

Called when the entity has been successfully restored from a savegame file.

Reimplemented from NSIO.

◆ Save()

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

Called whenever we're touching another entity.

Reimplemented from NSTrigger.

◆ Trigger()

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