Nuclide
Software Development Kit for id Technology
env_shooter Class Reference

About this class

Server-Entity: Model Shooter.

QUAKED env_shooter (1 .5 0) (-8 -8 -8) (8 8 8) EVSHOOTER_REPEATABLE

OVERVIEW

Shoots model entities from its location.

KEYS

  • "targetname" : Name
  • "target" : Target when triggered.
  • "killtarget" : Target to kill when triggered.
  • "angles" : Sets the pitch, yaw and roll direction of the shooter.
  • "shootmodel" : Model file to shoot.
  • "shootsounds" : PCM sample to play whenever a piece shoots out.
  • "m_iGibs" : Amount of models shot in total.
  • "m_flDelay" : Delay before being able to be fired again.
  • "m_flVelocity" : Speed of the models in units per second.
  • "delay" : Delay between shots.
  • "m_flVariance" : Variance in shot trajectory.
  • "m_flGibLife" : Life of the individual model piece.
  • "scale" : Scale modifier of the model pieces.

INPUTS

  • "Shoot" : Causes the shooter to shoot.

TRIVIA

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

Inheritance diagram for env_shooter:
NSRenderableEntity gibshooter

Public Member Functions

void env_shooter (void)
 
virtual void Spawned (void)
 Called when the entity is fulled initialized. 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 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 Input (entity, string, string)
 Called when we are being prompted by another object/function with an input message. More...
 
nonvirtual void ShootGib (void)
 
nonvirtual void ShooterLoop (void)
 

Constructor & Destructor Documentation

◆ env_shooter()

void env_shooter::env_shooter ( void  )

Member Function Documentation

◆ Input()

void env_shooter::Input ( entity  eAct,
string  strInput,
string  strData 
)
virtual

Called when we are being prompted by another object/function with an input message.

Reimplemented from NSRenderableEntity.

◆ Respawn()

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

◆ ShooterLoop()

void env_shooter::ShooterLoop ( void  )

◆ ShootGib()

void env_shooter::ShootGib ( void  )

◆ Spawned()

void env_shooter::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_shooter::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 env_shooter::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: