Nuclide
Software Development Kit for id Technology
env_explosion Class Reference

About this class

Server-Entity: Explosion Creator.

QUAKED env_explosion (1 .5 0) (-8 -8 -8) (8 8 8) NO_DAMAGE REPEATABLE x x x NO_SOUND

OVERVIEW

When triggered, creates an explosion at its location.

KEYS

  • "targetname" : Name
  • "target" : Target when triggered.
  • "killtarget" : Target to kill when triggered.
  • "iMagnitude" : Magnitude of the explosion.
  • "explosion_custom_effect" : Sets a custom explosion particle effect to appear.
  • "explosion_custom_sound" : Sets a custom explosion sound to play.

INPUTS

  • "Explode" : Triggers the explosion effect.

SPAWNFLAGS

  • NO_DAMAGE (1) : Make this explosion purely decorative, without radius damage.
  • REPEATABLE (2) : Makes this explosion triggerable more than once.
  • NO_SOUND (64) : Do not play the sound effect.
  • NOTUNDERWATER (8192) : Don't cause damage underwater.
  • GENERIC_DAMAGE (16384) : Act as if damage wasn't caused by an explosion type, making gibbing more difficult - some games may ignore it however.

TRIVIA

This entity was introduced in Half-Life (1998).

Inheritance diagram for env_explosion:
NSPointTrigger

Public Member Functions

void env_explosion (void)
 
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 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 Input (entity, string, string)
 Called when we are being prompted by another object/function with an input message. More...
 
nonvirtual float GetExplosionRadius (void)
 Returns the radius of the explosion. More...
 
nonvirtual int GetExplosionDamage (void)
 Returns the maximum damage the explosion delivers. More...
 

Constructor & Destructor Documentation

◆ env_explosion()

void env_explosion::env_explosion ( void  )

Member Function Documentation

◆ GetExplosionDamage()

int env_explosion::GetExplosionDamage ( void  )

Returns the maximum damage the explosion delivers.

◆ GetExplosionRadius()

float env_explosion::GetExplosionRadius ( void  )

Returns the radius of the explosion.

◆ Input()

void env_explosion::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 env_explosion::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 NSPointTrigger.

◆ Restore()

void env_explosion::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 NSPointTrigger.

◆ Save()

void env_explosion::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 NSPointTrigger.

◆ Spawned()

void env_explosion::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 env_explosion::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 NSPointTrigger.

◆ Trigger()

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