Nuclide
Software Development Kit for id Technology
func_pendulum Class Reference

About this class

Server-Entity: Swinging Pendulum.

QUAKED func_pendulum (0 .5 .8) ? FUNCPEND_STARTON x x FUNCPEND_NONSOLID FUNCPEND_RETURNONTRIGGER x FUNCPEND_XAXIS FUNCPEND_YAXIS

OVERVIEW

A brush that swings along a pivot point like a pendulum.

KEYS

  • "targetname" : Name
  • "damp" : Dampening factor.
  • "distance" : Swinging distance in euler-angles.
  • "speed" : Speed at which it swings in units-per-second.

SPAWNFLAGS

  • FUNCPEND_STARTON (1) : Start swinging immediately.
  • FUNCPEND_NONSOLID (8) : Don't do collision testing against this entity.
  • FUNCPEND_RETURNONTRIGGER (16) : Once it gets triggered it'll return to its starting position.
  • FUNCPEND_XAXIS (64) : Swing on the X-axis.
  • FUNCPEND_YAXIS (128) : Swing on the Y-axis.

NOTES

Please include an origin brush so that a pivot point will be defined.

TRIVIA

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

Inheritance diagram for func_pendulum:
NSRenderableEntity

Public Member Functions

void func_pendulum (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 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 customphysics (void)
 

Constructor & Destructor Documentation

◆ func_pendulum()

void func_pendulum::func_pendulum ( void  )

Member Function Documentation

◆ customphysics()

void func_pendulum::customphysics ( void  )
virtual

◆ Respawn()

void func_pendulum::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 NSRenderableEntity.

◆ Restore()

void func_pendulum::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 NSRenderableEntity.

◆ Save()

void func_pendulum::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 NSRenderableEntity.

◆ SpawnKey()

void func_pendulum::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 NSRenderableEntity.

◆ Trigger()

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