It’s common to use a HackLight object (e.g. an OmniLightPoint) to illuminate a window texture. If the player can get inside the building and turn the lights off, it’s a nice touch if the window lights respond accordingly. It also adds to realism if the window texture changes. Even if the player cannot get inside, it can be a nice effect if some lights change during the game.
These lights can also be controlled by the difficulty setting, so an narrow street can be made easier to sneak through on lower difficulty levels.
This tutorial is only relevant if your window texture has an ‘on’ and and ‘off’ version. Most of the window textures in the city family meet this requirement.
Place a window texture on a wall. Recessing it by 0.5 or 1 foot will allow the surrounding wall to cast a useful shadow.
For this tutorial, city\win324l will be used. It’s ‘off’ counterpart (city\win324) must also be loaded.
Create an AnimLightPoint. The default Anim Light property is suitable for this tutorial. Note that the minimum brightness is not 0. The AnimLight script will turn it off properly however.
To the AnimLightPoint object, add the S→Scripts property. Replace AnimLight with TrapTexture and leave Don’t Inherit unchecked.
These properties are also needed (follow the links for more info):
Electric lights will be controlled by a switch. Edit the Tweq→JointState property to use the following values:
Give the lever a ControlDevice link to the AnimLightPoint (plus the interior lights of course).
If the inside is lit by a torch, give the torch a ControlDevice link to the AnimLightPoint. No further setup is needed. Torches already send TurnOn/TurnOff when appropriate.
Edit the properties of the AnimLightPoint and add the property Difficulty→Turn On (Off). Select the levels for which the window should illuminated.
If the lights are controlled by a lever, edit the Tweq→JointState property. AnimS should be On,Reverse, and if necessary, remove the ‘On’ selection from Joint1AnimS. This setting allows the AnimLightPoint to use the Random but coherent mode.
In Dromed, it doesn’t matter if your window is using the ‘off’ or the ‘on’ texture.
If the torch uses the default Anim Light mode of maximum brightness, simply change it to minimum brightness (or zero brightness). It’ll send TurnOff to the AnimLightPoint when the game starts.
If the mode is random but coherent, add the property Difficulty→Turn On (Off), but don’t select any numbers. The torch will only turn off when you activate difficulty settings, or test through Thief2.exe.
NOTEME If you test the difficulty using Dromed, be very careful if you’ve also used the Difficulty → Destroy property. See the link for more info.
Alternatively, if you don’t mind using an extra object, set up a switch as described above, but give it a ControlDevice link to the torch rather than the AnimLightPoint.
Assuming the lights are on when the game starts, go into game mode, turn them off, then return to the editor. The 3D view will now show the ‘off’ texture, but if you select the face, Dromed will show that it is still using the ‘on’ texture. The latter is correct.
You can go back in game, turn the lights off and then on, and when you return to editor mode, the 3D view will show the correct texture again. Or you can Portalize/Optimize, or reload the mission.