shadow_control
From Valve Developer Community
This is a point entity available in all Source games.
Contents |
Entity Description
Defines the direction, color and attenuation distance of Dynamic Shadows for the entire map.- The properties of this entity apply to the whole map. Multiple instances of this entity within a map may cause errors.
- Its basic properties are controlled by three Entities used in combination: light_environment defines (a) the color and intensity of the Diffuse Skylight and (b) the direction, color and intensity of the Direct Sunlight. It also creates (buggy, unconfigurable) Dynamic Shadows which can only be overridden/controlled by the shadow_control Entity. env_sun places a glow sprite in the skybox to represent the Sun's apparent position in the sky. To make sense of it all, just make sure you have only one of each of these entities in your map, and that the Pitch and Yaw <angles> are set the same for all three of them. (Pitch is equivalent to the Sun's Angle of Elevation from the ground, and Yaw is its Compass Bearing.)
- The Sky List article suggests some settings for some of Valve's skyboxes. The worldspawn Entity defines which skybox to use. Note also that env_fog_controller settings will look wrong if they don't correspond to the particular skybox in use.
Keyvalues
-
Targetname:
- Name <string>
- The targetname other entities refer to this entity by.
-
Angles:
- Pitch Yaw Roll (Y Z X)
<angle> - This entity's angular orientation in the world.
- color
- <color255> The color of the shadows.
- distance
- <float> The maximum distance the shadow is allowed to cast, in inches.
- disableallshadows
- <boolean> All Shadows Disabled (This feature is only available in the Half Life 2 engine)
Inputs
-
Targetname:
-
Kill - Removes this entity from the world.
-
KillHierarchy - Removes this entity and all its children from the world.
-
AddOutput <string> - Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
- Format:
<key> <value> - Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite> -
FireUser1toFireUser4 - Fire the
OnUseroutputs; see User Inputs and Outputs.
- color <color255>
- Set the shadow color.
- direction <vector>
- Set the shadow direction.
- SetDistance <float>
- Set the maximum shadow cast distance.
- SetAngles <angles>
- Set the shadow direction.
- SetShadowsDisabled <integer>
- Set shadows disabled state.
Outputs
-
Targetname:
-
Kill - Removes this entity from the world.
-
KillHierarchy - Removes this entity and all its children from the world.
-
AddOutput <string> - Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
- Format:
<key> <value> - Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite> -
FireUser1toFireUser4 - Fire the
OnUseroutputs; see User Inputs and Outputs.


