Nuclide
Software Development Kit for id Technology
env_physexplosion Class Reference

About this class

Server-Entity: Triggers Physics Explosion.

QUAKED env_physexplosion (1 .5 0) (-8 -8 -8) (8 8 8) NODAMAGE PUSHCLIENTS RADIAL TRACE SHAKE

OVERVIEW

A force-centered explosion, primarily targetted at physics objects and optionally, players/clients.

KEYS

  • "targetname" : Name
  • "magnitude" : Amount of force applied.
  • "radius" : Optional, overrides the radius of the 'explosion'.
  • "targetentityname" : Optional, will only target the named entity if specified.
  • "inner_radius" : Optional, will test from within this inner radius when TRACE (8) is set.

SPAWNFLAGS

  • NODAMAGE (1) : Do not damage physics entities.
  • PUSHCLIENTS (2) : Allow pushing of players.
  • RADIAL (4) : Disables any up/down forces from being applied.
  • TRACE (8) : Does a collision test with its targets.
  • SHAKE (16) : Push the view of the players around a bit.

TRIVIA

This entity was introduced in Half-Life 2 (2004).

Inheritance diagram for env_physexplosion:
NSPointTrigger

Public Member Functions

void env_physexplosion (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 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...
 
nonvirtual void TriggerExplosion (void)
 

Constructor & Destructor Documentation

◆ env_physexplosion()

void env_physexplosion::env_physexplosion ( void  )

Member Function Documentation

◆ Input()

void env_physexplosion::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 env_physexplosion::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_physexplosion::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.

◆ SpawnKey()

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

◆ TriggerExplosion()

void env_physexplosion::TriggerExplosion ( void  )

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