Worldspawn
From Valve Developer Community
This Brush-based Entity is available in all Source Games.
| Table of contents |
Entity Description
A single worldspawn Entity is present on every map. It represents all world brushes. It also stores general information about the map and can be edited via the Map Properties... option in the Edit menu in Hammer.
Constraints can be assigned to this object (by not specifying any name for the object in question). Any damage sustained from suicide, falling damage, or asphyxiation is set to be caused by worldspawn.
Technically: The properties of this entity apply to the whole map. Multiple instances of this entity within a map may cause errors.
It must also be noted that if you constrain the world and another object, and set No Collision between the two, then the object will sink out of the map.
In code it is represented by class CWorld (http://doxygen.page.needed/class_c_world.html), defined in world.cpp (http://doxygen.page.needed/world_8cpp-source.html).
Additional "Map Property" Entities
There are also a few "Map Property Entities" which should have only one instance per BSP map, and whose properties apply to the whole map. Multiple instances of these entities within a map may cause errors. Note that these Entities' keyvalues can change during gameplay via the Inputs and Outputs System, just like the Worldspawn's ResponseContext inputs ...
- Skybox related:
- env_fog_controller
- light_environment
- shadow_control
- env_sun (more than one?)
- sky_camera (unique location)
- Map Optimisation:
- Abstract:
- game_end
- info_intermission (unique location)
- info_player_start (unique location)
- logic_auto
- env_global
- and of course worldspawn itself.
Keyvalues
- <string> Response system context(s) for this entity. Format should be: 'key:value,key2:value2,etc'. When this entity speaks, the list of keys and values will be passed to the response rules system.
- message
- <string> Map Description / Title
- skyname
- chaptertitle
- <string> Chapter Title that appears on screen when this level starts.
- startdark
- <boolean> Level Fade In
- gametitle
- <boolean> Game Title should appear on screen when this level starts.
- newunit
- <boolean> Used to clear out
savegamedata of previous levels to keep thesavegamesize as small as possible. Only set it to Yes if the player cannot return to any previous levels
- 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 [Episode One Update]
- <filename> Detail.vbsp file to use for emitting detail props (found in directory
<root>/modname). Used only for the compiler
- detailmaterial [Episode One Update]
- <material> Detail material file
Day of Defeat: Source
- coldworld
- <boolean> If set, players will emit breath particles from their mouth attachments.
Inputs
- AddContext <string>
- Adds a context to this entity's list of response contexts. The format should be 'key:value'.
- RemoveContext <string>
- Remove a context from this entity's list of response contexts. The name should match the 'key' of a previously added context.
- Removes all contexts in this entity's list of response contexts.
