Nuclide
Software Development Kit for id Tech
env_beverage Class Reference

Server-Entity: Health Refuelling Beverage. More...

Inheritance diagram for env_beverage:
NSRenderableEntity

Public Member Functions

void env_beverage (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 Spawned (void)
 Called when the entity is fulled initialized. More...
 
virtual void Trigger (entity, triggermode_t)
 Called whenever we're legacy triggered by another object or function. More...
 

Detailed Description

Server-Entity: Health Refuelling Beverage.

QUAKED env_beverage (1 .5 0) (-8 -8 -8) (8 8 8)

OVERVIEW

Upon being triggered, the entity will spawn item_food in its place in the shape of a soda can.

KEYS

  • "targetname" : Name
  • "target" : Target when triggered.
  • "killtarget" : Target to kill when triggered.
  • "health" : Amount of soda-cans that can be dispensed at maximum
  • "angles" : Sets the pitch, yaw and roll angles of the soda
  • "skin" : Sets the beverage type. Values from 0-6 are valid. Check notes.

NOTES

Mainly used in vending machines. You can choose a few select types of beverage.

Beverage-list:

  • 0 : Coca Cola
  • 1 : Sprite
  • 2 : Diet Coke
  • 3 : Orange
  • 4 : Surge
  • 5 : Moxie
  • 6 : Random (will pack one of the above, picked at the start of the map)

TRIVIA

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

Constructor & Destructor Documentation

◆ env_beverage()

void env_beverage::env_beverage ( void  )

Member Function Documentation

◆ Restore()

void env_beverage::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_beverage::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.

◆ Spawned()

void env_beverage::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_beverage::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_beverage::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: