Nuclide
Software Development Kit for id Technology
func_pushable Class Reference

About this class

Server-Entity: Pushable Brush.

QUAKED func_pushable (0 .5 .8) ? SF_TRIGGER SF_TOUCH SF_PRESSURE x x x x BREAKABLE

OVERVIEW

This is essentially the same entity as a func_breakable, but a player can push and pull it around the level.

KEYS

  • "targetname" : Name
  • "target" : Target when triggered.
  • "killtarget" : Target to kill when triggered.
  • "friction" : Friction of the pushable. Default is 50.
  • "size" : Hull size to use. 0: Point, 1: Player, 2: Big, 3: Player Crouched

SPAWNFLAGS

  • SF_TRIGGER (1) : Break only when triggered.
  • SF_TOUCH (2) : Touch can break.
  • SF_PRESSURE (4) : Standing on top can break.

NOTES

It uses stepping player physics to move around. Please look at func_breakable for more entity keys, inputs and outputs.

The 'size' key only has to be specified when you use levels with hull-sizes.

TRIVIA

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

Inheritance diagram for func_pushable:
func_breakable

Public Member Functions

void func_pushable (void)
 
virtual void Spawned (void)
 Called when the entity is fulled initialized. 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 NSIO::SpawnKey but for save-game fields. More...
 
virtual void customphysics (void)
 
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 Touch (entity)
 Called whenever we're touching another entity. More...
 
virtual void OnPlayerUse (void)
 
virtual void OnRemoveEntity (void)
 Handles what happens before the entity gets removed from the client game. More...
 

Constructor & Destructor Documentation

◆ func_pushable()

void func_pushable::func_pushable ( void  )

Member Function Documentation

◆ customphysics()

void func_pushable::customphysics ( void  )
virtual

◆ OnPlayerUse()

void func_pushable::OnPlayerUse ( void  )
virtual

◆ OnRemoveEntity()

void func_pushable::OnRemoveEntity ( void  )
virtual

Handles what happens before the entity gets removed from the client game.

Reimplemented from NSIO.

◆ Respawn()

void func_pushable::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 func_breakable.

◆ Restore()

void func_pushable::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 func_breakable.

◆ Save()

void func_pushable::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 func_breakable.

◆ Spawned()

void func_pushable::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 func_breakable.

◆ SpawnKey()

void func_pushable::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 func_breakable.

◆ Touch()

void func_pushable::Touch ( entity  eToucher)
virtual

Called whenever we're touching another entity.

Reimplemented from func_breakable.


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