Worldspawn

From Valve Developer Community
Revision as of 06:13, 11 May 2011 by TomEdwards (talk | contribs)
Jump to navigation Jump to search

Worldspawn (or just "the world") is the single entity that stores the noninteractive parts of a map, alongside some global configuration options. In other words:

Some other notes:

  • There can be only one. (Since Hammer doesn't allow worldspawn to be created directly it's very difficult for this rule to be broken.)
  • Damage from the environment and suicide is ordinarily attributed to the world.
  • Constraints can be assigned to worldspawn by not specifying a name for their subject/target.

See also

Related entities

There are a few other 'map property' entities which should not have more than one instance in a map. They are:

Skybox
env_fog_controller
light_environment
shadow_control
env_sun (
Todo: actually, multiple suns might be allowable
)
sky_camera (unique location)
Optimisation
game_ragdoll_manager
game_weapon_manager
game_gib_manager
water_lod_control
Logic
game_end
info_intermission (unique location)
env_global

Keyvalues

message <string>
Map's description / title. Doesn't seem to be used anywhere any more.
skyname <sky material prefix>
Skybox material. See Sky List.
chaptertitle <string>
Chapter Title that appears on screen when this level starts.
startdark <bool>
Fades the map in
Icon-Bug.pngBug:The fade is carried out every time the map loads, including when loading from a saved game. Use env_fade instead.  [todo tested in ?]
gametitle <bool>
Should the game's title appear on-screen when the map starts?
newunit <bool>
Used to clear out saved data of previous maps, which reduces saves' filesize. Only enable if the player cannot return to any previous map.
maxoccludeearea <float>
Prevents occlusion testing for entities that take up more than X% of the screen.
minoccluderarea <float>
Prevents this occluder from being used if it takes up less than X% of the screen.
maxpropscreenwidth <float>
Number of pixels wide at which all props in the level start to fade (-1 = use fademaxdist). This number is ignored if the prop has a specific fade distance specified.
minpropscreenwidth <float>
Minimum number of pixels wide at which the prop is visible (0 = don't fade out). This number is ignored if the prop has a specific fade distance specified.
detailvbsp <file> (in all games since Half-Life 2: Episode One)
Detail.vbsp file to use for creating detail props. Must be located in game root.
detailmaterial <material> (in all games since Half-Life 2: Episode One)
Detail material file
coldworld <bool>
If set, Day of Defeat: Source player models will emit breath particles from their mouth attachments. No effect elsewhere.
ResponseContext:
Response Contexts (ResponseContext) <string>
Pre-defined response system context{s} for this entity. Format is key:value,key:value,... When this entity speaks, the list of keys & values will be passed to the response rules system.

Inputs

ResponseContext:
AddContext <stringRedirectInput/string>
Adds to the entity's list of response contexts. Format is <key>:<value>.
RemoveContext <stringRedirectInput/string>
Remove a context from this entity's list. The name should match the key of an existing context.
ClearContext
Removes all contexts from this entity's list.