Nuclide
Software Development Kit for id Tech
func_mortar_field Class Reference
Inheritance diagram for func_mortar_field:
NSBrushTrigger

Public Member Functions

void func_mortar_field (void)
 
virtual void Save (float)
 Handles saving a copy of this entity to a given filehandle. More...
 
virtual void Restore (string, string)
 Similar to ::SpawnKey but for save-game fields. More...
 
virtual void Trigger (entity, triggermode_t)
 Called whenever we're legacy triggered by another object or function. 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 SpawnKey (string, string)
 This method handles entity key/value pairs on map load. More...
 
nonvirtual void Fire (vector)
 
nonvirtual void FireRandom (void)
 
nonvirtual void FireTarget (entity)
 
nonvirtual void FireControlled (void)
 

Detailed Description

QUAKED func_mortar_field (0 .5 .8) ?

OVERVIEW

This brush volume acts as mortar drop area. When triggered, it'll drop mortar shells straight to the ground (with a bit of spread if specified).

KEYS

  • "targetname" : Name
  • "m_flSpread" : Maximum spread in game-units
  • "m_flCount" : Number of bombs dropped per strike
  • "m_flControl" : Targeting type. 0 = random, 1 = activator, 2 = controlled
  • "m_iszXController" : Name of the momentary_rot_button providing X-offset
  • "m_iszYController" : Name of the momentary_rot_button providing Y-offset

NOTES

It can be set to three different targeting modes, 0 will pick any random point in the volume as a drop position. 1 will target the person or entity activating it and 2 is a more complex mode which requires two momentary_rot_button entities to control the X and Y offset in the volume.

GoldSrc expects some hardcoded behaviour (sounds playing, hardcoded delay between mortar shell drops) that I haven't implemented yet. I'll turn those into map attribute keys so people can finally control sound, damage, delay and so on.

TRIVIA

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

Constructor & Destructor Documentation

◆ func_mortar_field()

void func_mortar_field::func_mortar_field ( void  )

Member Function Documentation

◆ Fire()

void func_mortar_field::Fire ( vector  vecOrg)

◆ FireControlled()

void func_mortar_field::FireControlled ( void  )

◆ FireRandom()

void func_mortar_field::FireRandom ( void  )

◆ FireTarget()

void func_mortar_field::FireTarget ( entity  act)

◆ Respawn()

void func_mortar_field::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 NSEntity.

◆ Restore()

void func_mortar_field::Restore ( string  strKey,
string  strValue 
)
virtual

Similar to ::SpawnKey but for save-game fields.

Whatever you write into file handles within your ::Save() method needs to be read back in here.

Reimplemented from NSEntity.

◆ Save()

void func_mortar_field::Save ( float  handle)
virtual

Handles saving a copy of this entity to a given filehandle.

Within you want to use the ::SaveFloat() etc. methods to write the internal member attributes to the specified file handle.

Reimplemented from NSEntity.

◆ SpawnKey()

void func_mortar_field::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 NSEntity.

◆ Trigger()

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