Nuclide
Software Development Kit for id Technology
NSWorldspawn Class Reference

About this class

Shared-Entity: Game World.

QUAKED worldspawn (0 0 0) ?

OVERVIEW

Only used for the world.

KEYS

  • "message" : Full title of the map. (e.g. "Barbie's Domain")
  • "author" : Author of the map.
  • "chaptertitle" : Titles.txt entry to display when entering the level.
  • "sounds" : CD track to play. Numerical value. Most likely starts at '2'.
  • "_fog" : Fog in the playable area. Format: (density red green blue alpha depthbias)
  • "_skyroomfog" : Fog in the skybox area. Format: (density red green blue alpha depthbias)
  • "skyname" : Which skybox to use. (e.g. "textures/skies/sundown")
  • "ambientsound" : Sound shader to play in the background (looping) for when other env_soundscape entities are NOT active.
  • "startdark" : Starts the level with a fade in similar to using an env_fade, which lasts for nine seconds.
  • "hdr_iris_minvalue" : Minimum HDR brightness adjustment. Default is "0.0".
  • "hdr_iris_maxvalue" : Maximum HDR brightness adjustment. Default is "2.0".
  • "hdr_iris_multiplier" : HDR effect multiplier. Default is "1.0".
  • "hdr_iris_fade_up" : HDR iris fade up speed. Default is "0.1".
  • "hdr_iris_fade_down" : HDR iris fade down speed. Default is "0.5".
  • "_litwater" : Set to 1 for a HL BSP to have lightmapped water surfaces.

NOTES

A map must only have one worldspawn entity. Every game can have varying key definitions for the worldspawn entity. It's also not affected by "killtarget".

TRIVIA

This entity was introduced in Quake (1996).

Inheritance diagram for NSWorldspawn:
NSEntity

Public Member Functions

void NSWorldspawn (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...
 

Constructor & Destructor Documentation

◆ NSWorldspawn()

void NSWorldspawn::NSWorldspawn ( void  )

Member Function Documentation

◆ Restore()

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

◆ Save()

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

◆ Spawned()

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


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