Nuclide
Software Development Kit for id Technology
func_brush Class Reference

About this class

Server-Entity: Dynamic Brush Model.

QUAKED func_brush (0 .5 .8) ?

OVERVIEW

Combination of func_illusionary, func_wall, func_wall_toggle. When triggered, it'll become invisible and lose its collision.

KEYS

  • "targetname" : Name
  • "Solidity" : Mode for choosing solidity. 0 : Toggle, 1 : Never, 2 : Always.
  • "StartDisabled" : Will make it spawn invisible.
  • "solidbsp" : Type of collision model to choose. 0 : Per-Poly, 1 : BSP file.
  • "excludednpc" : Name of the NPC classname that will not collide with this entity
  • "invert_exclusion" : Set to 1 if you want the 'excludednpc' key to act inverted

NOTES

The main thing func_brush is concerned with is appearance. When you trigger it on/off, it'll be made visible/invisible. Collision however depends on the setting of the "Solidity" key. If "Solidity" is toggle, the collision will ne enabled/disabled depending on whether or not the entity is visible/invisible. By default it's visible and has collision.

TRIVIA

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

Inheritance diagram for func_brush:
NSRenderableEntity

Public Member Functions

void func_brush (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 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 SpawnKey (string, string)
 This method handles entity key/value pairs on map load. More...
 

Constructor & Destructor Documentation

◆ func_brush()

void func_brush::func_brush ( void  )

Member Function Documentation

◆ Respawn()

void func_brush::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_brush::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_brush::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_brush::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_brush::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: