Classnames: | light, light_gem, light_torch_castle/rome/egypt/meso light_flame_large_yellow/small_yellow, light_torch_small_walltorch |
PoP: | light_burner, light_candle, light_lanten light_newfire, light_palace_torch |
Purpose: | y°hî ?ôr! |
H2 Code: | lights.hc, torch.hc |
Lots of different types & styles, but their behaviour seems to be pretty much
the same. In particular, they can be shot out, or switched on and off,
and lamps and torches (lights with models) can be linked to simple
lights (with no model) by giving them the same style-value;
when a light goes on or off, all those with the same style-value do
likewise (however, I find the behavior of switchable lights to be
fairly confusing, and seem to spend a lot of time trying to get this
section of the Eye right ... it probably still isn't, quite). Lights can also be used as spotlights, and the light_gem can be usefully used with 3D angles (to put it on the ceiling, or a sloping wall, for example; y-axis points West). In the MP, but not in original H2, some of the lights can take a HURT spawnflag and then damage things that touch them, amount determined by the dmg key. |
light | Value is a number, the light-level, default = 300 (pretty dim), max = 800. |
style | One of these numbers: Other useful values not known to me. |
health | Value is a number; specify it and the light can be destroyed. style must be between 32 and 63, and there must also be a targetname value, which needn't connect to anything (if it does, the light will probably be able to be switched on and off, as well as destroyed). |
targetname | If this is targetted by a button, etc, it will toggle the light between on and off. Light starts on unless spawnflags is set as 1, in which case it starts off. |
style | Value is a number, used for controlling changing in light-level:
|
fadespeed | Value is a number, controls speed of change in light-level. Seems a bit flakey in its operation, especially on first toggle. In fact, I still haven't figured out how to make it function in a reliable and reproducible manner. |
target | Value is a name, targeting an info_null entity that the light is aimed at as a spotlight. Incompatible with angle. |
dmg | Value is a number, damage done to player when touching. Only
works in MP for some kinds of lights, which are, I believe:
|
spawnflags |
|
light: |
| button: |
|
Then you push the button to turn the light on, but then you can smash it out or push the button again to turn it off (of course the button would probably need additional fields such as angle in order to fit into the level right). To link further light entities to the torch (since H2 lights fade rapidly with distance), add a style-field to the torch, with a value between 32 and 63, and share it with the lights.