Light dynamic: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(This is basically a copy from light_spot -- I understand a lot is not accurate but it works for now.)
 
(And it's still incomplete.)
Line 3: Line 3:
==Entity Description==
==Entity Description==


A cone-shaped, invisible light source. 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 go much slower but are much more flexible. This is a dynamic spotlight that can be pointed at another entity.
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.


'''''NOTE:''' When using this entity, it is often necessary to turn the brightness value up significantly for the effects of the light to be visible. Values of 3000-4000 are sometimes necessary for light sources like streetlights.''
'''''NOTE:''' This entity actually consists of two lights, a cone model light and a spot world light. Some values may affect one and not the other.''


==Keyvalues==
==Keyvalues==


* {{kv targetname}} The targetname value for a spotlight will point the light at the entity named. If no targetname is available, the entity will point with it's angles paramater.
* {{kv targetname}}


* {{kv angles}} This will control the direction the light points at, if no targetname is specified.
* {{kv angles}} This will control the direction the light points at, if no targetname is specified.
* '''target'''
: <target_destination> The name of an entity in the map that the dynamic light will point at.


* '''_inner_cone'''
* '''_inner_cone'''
: <integer> This is the inner focus of the light, or the edge of the brightest part of the light. It will fade from here out to the
: <integer> The inner (bright) angle.


* '''_cone'''
* '''_cone'''
: <integer>
: <integer> The outer (fading) angle.
 
* '''brightness'''
: <integer> This is the intensity of the spotlight.
 
* '''spotlight_radius'''
: <float> This is the radius of the spotlight, in inches, at the object that it is hitting.


* {{kv light}}
* {{kv light}}
Line 23: Line 32:
==Flags==
==Flags==


* 1 : Initially Off
* ? : No World Light
* ? : No Model Light
* ? : Add Displacement Alpha
* ? : Subtract Displacement Alpha


==Inputs==
==Inputs==
* {{I Targetname}}
* {{I Parentname}}
* '''Brightness'''
: <integer> Set the light brightness.
* '''Distance'''
: <float> Set the maximum light distance.
* '''_inner_cone'''
: <integer> Set the inner (bright) angle.
* '''_cone'''
: <integer> Set the outer (fading) angle.
* '''spotlight_radius'''
: <float> Set the radius of the spotlight at the end point.
* '''style'''
: <integer> Change the lightstyle (see Appearance field for possible values).


* '''TurnOn'''
* '''TurnOn'''
: Turns the light on.
: Turn the light off.


* '''TurnOff'''
* '''TurnOff'''
: Turns the light off.
: Turn the light on.


* '''Toggle'''
* '''Toggle'''
: Toggles the light on or off.
: Toggle the light on/off.
 
* '''SetPattern'''
: Sets the light's custom appearance to the input's parameters.
 
* '''FadeToPattern'''
: Fades from the light's old pattern to the new one.


==See Also==
==See Also==
Line 46: Line 74:
* [[light]]
* [[light]]
* [[light_spot]]
* [[light_spot]]
* [[point_spotlight]]
* [[List_of_entities#Light_Entities|Light entities]]
* [[List_of_entities#Light_Entities|Light entities]]


[[Category:Entities]]
[[Category:Entities]]

Revision as of 14:08, 17 September 2005

Template:Wrongtitle

Entity Description

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.

NOTE: This entity actually consists of two lights, a cone model light and a spot world light. Some values may affect one and not the other.

Keyvalues

  • Template:Kv angles This will control the direction the light points at, if no targetname is specified.
  • target
<target_destination> The name of an entity in the map that the dynamic light will point at.
  • _inner_cone
<integer> The inner (bright) angle.
  • _cone
<integer> The outer (fading) angle.
  • brightness
<integer> This is the intensity of the spotlight.
  • spotlight_radius
<float> This is the radius of the spotlight, in inches, at the object that it is hitting.

Flags

  • ? : No World Light
  • ? : No Model Light
  • ? : Add Displacement Alpha
  • ? : Subtract Displacement Alpha

Inputs

Parentname:
SetParent <stringRedirectInput/string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <stringRedirectInput/string>
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.
SetParentAttachmentMaintainOffset <stringRedirectInput/string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.
  • Brightness
<integer> Set the light brightness.
  • Distance
<float> Set the maximum light distance.
  • _inner_cone
<integer> Set the inner (bright) angle.
  • _cone
<integer> Set the outer (fading) angle.
  • spotlight_radius
<float> Set the radius of the spotlight at the end point.
  • style
<integer> Change the lightstyle (see Appearance field for possible values).
  • TurnOn
Turn the light off.
  • TurnOff
Turn the light on.
  • Toggle
Toggle the light on/off.

See Also