light_dynamic is a point entity available in all Source games. It is an invisible light source that changes over time. Can be turned on and off through inputs, and can aim at any object, including moving ones. Dynamic lights are calculated on the fly in the game, which means they have a higher processing cost but are much more flexible than static lighting. It is also the only entity except
env_projectedtexture that can light up brushes in real-time (but it doesn't replace their original lighting).
- Entity to point at
- The name of an entity in the map that the dynamic light will point at.
- Light color
- The RGB render color of the spotlight. Colors must be between 0 and 255.
- Light brightness
- The intensity of the spotlight.
- Inner (bright) angle
- The angles of the inner spotlight beam. 0 makes it omnidirectional.
- Outer (fading) angle
- The angles of the outer spotlight beam. 0 makes it omnidirectional.
- Used instead of Pitch Yaw Roll's value for reasons unknown.
- Maximum distance
- This is the distance that light is allowed to cast, in inches.
- Spotlight end radius
- This is the radius of the light, in inches, at the object that it is hitting.
- Various Custom Appearance (see below) presets.
Light Appearances Literal Value Description Sequence Preview 0 Normal
10 Fluorescent flicker
2 Slow, strong pulse
11 Slow pulse, noblack
5 Gentle pulse
1 Flicker A
6 Flicker B
3 Candle A
7 Candle B
8 Candle C
4 Fast strobe
9 Slow strobe
12 !FGD Underwater light mutation
- The classname defines the type of entity. Classnames can be changed using
AddOutput, which will influence how the engine deals with the entity in certain circumstances.
- Global Entity Name
- Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.
- Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma. Every entity can be parented, even point entities. Entities which are parented will be forced to transition to the next map, such as from a
trigger_transition. Some entities which aren't intended to be parented may not function correctly.
phys_constraintcan be used as a workaround to parenting.
- Origin (X Y Z)
- The position of this entity's center in the world. Rotating entities typically rotate around their origin.
- Pitch Yaw Roll (X Y Z)
- This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.Note: This works on brush entities, although Hammer doesn't show the new angles.
- Toggles features of an entity, its specific number is determined by the combination of flags added.
- Response Contexts
- Pre-defined response system contexts for this entity. Format is
key:value,key:value,.... Contexts may be filtered.
- Local Time
- The local time of the entity, independent of the global clock. Used mainly for physics calculations.
- Hammer ID
- The entity's Hammer ID. Mainly used by plugins and debugging commands, such as
ent_keyvalue. Can be manually assigned with the "hammerid" or "id" keyvalue. Entities spawned at run-time are not assigned any Hammer ID.
1] : Do not light world (better perf)
2] : Do not light models
4] : Add Displacement Alpha
8] : Subtract Displacement Alpha
- Set the light's render color (R G B).
- Set the light brightness.
- Set the maximum light distance.
- Set the inner (bright) angle.
- Set the outer (fading) angle.
- Set the radius of the spotlight at the end point.
- Change the lightstyle (see Appearance field for possible values).
- Turn the light off.
- Turn the light on.
- Toggle the light on/off.
- Removes this entity and any entities parented to it from the world.
- Functions the same as
Kill, although this entity and any entities parented to it are killed on the same frame, being marginally faster than
- Move with this entity. See Entity Hierarchy (parenting).
- Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
- As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
- Removes this entity from the the movement hierarchy, leaving it free to move independently.
- Evaluates a keyvalue/output on this entity.
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
- Fire the
OnUseroutputs; see User Inputs and Outputs.
- Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input.
This input is not included in Valve's FGDs.
- Dispatches a special effect from the entity's origin. Removed and replaced entirely by the particle system since .
- Dispatches a response to the entity. See Response and Concept.
- Adds to the entity's list of response contexts. Format is
- Remove a context from this entity's list. The name should match the key of an existing context.
- Removes all contexts from this entity's list.
- Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
- Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console. Bug: In , the code is executed in the script scope of the entity that fires the output, not the one receiving the input.Warning: Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
- Execute a VScript function in the scope of the receiving entity.
- Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
- Set this entity's angles.
- These outputs each fire in response to the firing of the like-numbered
FireUser4Input; see User Inputs and Outputs.
- This output fires when the entity is killed and removed from the game.
- Enables dynamic lights.
- Enables toggled lights.
- Sets the maximum amount of dynamic lights.