Worldspawn
From Valve Developer Community
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:
- Brushes (except those used by entities)
- Static props
- Map name, skybox, contexts...
Tip:Access these properties in Hammer with Main menu > Map > Map properties...
Some other notes:
- There can be only one. Fortunately, 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 kill) is attributed to the world.
- Constraints can be assigned to worldspawn by not specifying a name for their subject/target, but the results are rarely desirable.
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 (
To do: 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
Bug:The fade is carried out every time the map loads, including when loading from a saved game. Use env_fade instead. -
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> - Detail.vbsp file to use for creating detail props. Must be located in game root.
-
detailmaterial <material> - 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 <string>
- Pre-defined response system contexts for this entity. Format is
key:value,key:value,...
Inputs
-
ResponseContext:
-
AddContext <string> - Adds to the entity's list of response contexts. Format is
<key>:<value>. -
RemoveContext <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.
