Electric lights: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Tels (talk | contribs)
add
 
 
Line 5: Line 5:
If you want AI to notice that an electric light has gone out, use one of the electric light entities in '''darkmod/Lights/Switchable/Electric/Flickering/'''. These entities use both lit and unlit model skins to match the light state, which makes them preferable to roll-your-own electric lights.
If you want AI to notice that an electric light has gone out, use one of the electric light entities in '''darkmod/Lights/Switchable/Electric/Flickering/'''. These entities use both lit and unlit model skins to match the light state, which makes them preferable to roll-your-own electric lights.


Alternatively, you can also use '''atdm:static_electric_light_nomodel_lit''' (and he unlit version), and attach a model or func_static. The AI will ignore the model but will relight the light.  
Alternatively, you can also use '''atdm:static_electric_light_nomodel_lit''' (and the unlit version), and attach a model or func_static. The AI will ignore the model but will relight the light.  


Note that if you don't attach the model to the light, the AI does not know to ignore the model when checking LOS (Line Of Sight) to the light, and thus might not know it has gone of or not.
Note that if you don't attach the model to the light, the AI does not know to ignore the model when checking LOS (Line Of Sight) to the light, and thus might not know it has gone off or not.


== See also ==
== See also ==

Latest revision as of 04:19, 21 July 2011

Overview

If you construct an electric light using the basic light entity (light) and an electric light model, the AI won't try to relight it if it goes out. This may or may not change in a future rev.

If you want AI to notice that an electric light has gone out, use one of the electric light entities in darkmod/Lights/Switchable/Electric/Flickering/. These entities use both lit and unlit model skins to match the light state, which makes them preferable to roll-your-own electric lights.

Alternatively, you can also use atdm:static_electric_light_nomodel_lit (and the unlit version), and attach a model or func_static. The AI will ignore the model but will relight the light.

Note that if you don't attach the model to the light, the AI does not know to ignore the model when checking LOS (Line Of Sight) to the light, and thus might not know it has gone off or not.

See also