worldspawn
(Redirected from The world)
Jump to navigation
Jump to search
![]() |
---|
CWorld |
![]() |

This is a preserved entity.
If the game has round restart mechanics this entity may not behave as expected.
If the game has round restart mechanics this entity may not behave as expected.
worldspawn
is a semi-internal entity available in all Source games. It (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
- func_detail, and in some games func_ladder
- Map name, skybox, contexts...
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.)
Bug:Related to this, do not clone any part of your world after selecting it via map properties. This will duplicate worldspawn, causing crashes. Deselecting after this however and cloning after deselecting will behave as normal. (fixed in
) [todo tested in ?]
- 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.

Keyvalues

All
Source Games
- Targetname (targetname) <string>
- Name which other entities use to send inputs to this entity.
Map Description / Title (message) <string>- Deprecated.
Leftover fromQuake I. Typically used for author credits.
- Skybox Name (skyname) <sky name>
- Skybox material, relative to materials/skybox/. See Sky List.
- Chapter Title Message (chaptertitle) <string>
- Chapter Title that appears on-screen when this level starts.
- Level Fade In (startdark) <boolean>
- Fade in when the map loads.
- Display Game Title (gametitle) <boolean>
- Should the game's title appear on-screen when the map starts?


/scripts/hud_textures.txt
.Half-Life: Source is one of the games that does have them, for example.


ExpandExample from HL:S
A proper fix in the code for your mod would be to edit /game/client/message.cpp
's Paint() function, to check m_iconTitleHalf and m_iconTitleLife not being NULL.
- New Level Unit (newunit) <boolean>
- Used to clear out savegame data of previous levels to keep the savegame size as small as possible. Only set it to Yes if the player cannot return to any previous levels.
Note:
Portal 2 forces this to be enabled in code, so two-way transitions will not work correctly (one-way HL2 style transitions work fine though.)
- 0 : No, keep current
- 1 : Yes, clear previous levels
- Max occludee area (maxoccludeearea) <float>
- Min occluder area (minoccludeearea) <float>
- Prevents occlusion testing for entities that take up more or less than X% of the screen, respectively.
- Max occludee area (Xbox) (maxoccludeearea_x360) <float>
- Min occluder area (Xbox) (minoccludeearea_x360) <float>
- Same as above, but for
Xbox 360.
- Start Fade Pixels (maxpropscreenwidth) <float>
- Number of pixels wide at which all props in the level start to fade (<0 = use fademaxdist). This number is ignored if the prop has a specific fade distance specified.
- End Fade Pixels (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.
- Detail.vbsp file (detailvbsp) <file path>
- Detail.vbsp file to use for emitting detail props (relative to the mod's root directory)
- Detail material file (detailmaterial) <material>
- Material for detail sprites to use for drawing detail props
- World is cold (coldworld) <boolean>
- If set,
Day of Defeat: Source player models will emit clientside breath particles from their head attachments. No effect elsewhere.
- Minimum light level (_minlight) <float> !FGD
- The minimum level of ambient light that hits the world. It does not affect any entities, including props!
- World MinS (world_mins) <vector3> !FGD
- Autofilled by VBSP.
- World MaxS (world_maxs) <vector3> !FGD
- Autofilled by VBSP.
- Map revision (mapversion) <integer> !FGD
- Updated by Hammer each time the VMF is saved.
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.
Specific games
Valve games 

Non-Valve games 


Inputs
- SetChapterTitle <string > (only in
)
- Change the Chapter Title
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.