Nuclide
Software Development Kit for id Tech
func_trackchange Class Reference

Server-Entity: func_tracktrain Track Controller. More...

Inheritance diagram for func_trackchange:
func_platrot func_trackautochange

Public Member Functions

void func_trackchange (void)
 
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 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 MoverFinishesMoving (void)
 Overridable: Called when the mover completes its movement to a destination. More...
 
virtual void MoverStartsMoving (void)
 Overridable: Called when the mover starts moving from its position to another. More...
 

Detailed Description

Server-Entity: func_tracktrain Track Controller.

QUAKED func_trackchange (0 .5 .8) ? x x x BOTTOM NOMOVE x X_AXIS Y_AXIS

OVERVIEW

A rotating, moving platform that will transport func_tracktrain entities between two path_track entities.

KEYS

  • "targetname" : Name
  • "height" : Travel altitude in game units.
  • "rotation" : Amount of spinning rotation in degrees.
  • "train" : Name of the train to be switched.
  • "toptrack" : Name of the top track.
  • "bottomtrack" : Name of the bottom track.
  • "speed" : Movement and rotation speed in game units per second.

SPAWNFLAGS

  • BOTTOM (8) : Start at the bottom track.
  • NOMOVE (16) : Only rotate, don't move.
  • X_AXIS (64) : Rotate on the X-Axis.
  • Y_AXIS (128) : Rotate on the Y-Axis.

NOTES

This version of the entity is designed for interactive trains. If you want to use them with automated (trigger controlled) func_tracktrain entities, use func_trackautochange.

TRIVIA

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

Constructor & Destructor Documentation

◆ func_trackchange()

void func_trackchange::func_trackchange ( void  )

Member Function Documentation

◆ MoverFinishesMoving()

void func_trackchange::MoverFinishesMoving ( void  )
virtual

Overridable: Called when the mover completes its movement to a destination.

Reimplemented from func_plat.

◆ MoverStartsMoving()

void func_trackchange::MoverStartsMoving ( void  )
virtual

Overridable: Called when the mover starts moving from its position to another.

Reimplemented from func_plat.

◆ Restore()

void func_trackchange::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_platrot.

◆ Save()

void func_trackchange::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_platrot.

◆ Spawned()

void func_trackchange::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_plat.

◆ SpawnKey()

void func_trackchange::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_platrot.


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