Rexturing Brushes Ingame

This tutorial demonstrates how to retexture a brush ingame. Only the specified texture will be changed.

To begin, we need to create a marker, or any other object with no scripts - such as a table - nearby the area you want to retexture.
Let's rename it 'TexChangePoint'.
Add the EngineFeatures->Retexture Radius property, and enter the maximum distance from this object that textures will be changed. Note that the whole surface is always retextured.
If you want only half a wall retextured, you have to make the wall out of of two brushes.
Next, we have to give it the script. Add S->Scripts and enter the script in Script 0.
What script to enter depends on which version of Thief you are using:

Thief 1: WindowShade
Thief 2: TrapTexture

We also have to add both Script->TerrReplaceOff and Script->TerrReplaceOn. Leave them both blank for now and load both the textures you wish to use (the texture to be changed and the texture to replace it with) by using either the 'load_a_texture' or 'add_family' commands.
Change Script->TerrReplaceOff to the name of the texture you wish to replace, for example 'fam/core/blustn'. To find out a textures name, open the texture palette and click on the appropriate texture. The texture's name will be displayed on the status bar.
Finally, change Script->TerrReplaceOn to the name of the texture you want the first texture to be replaced with.

The only other thing that remain to do is to create a BigFloorLever (-446) or similar object and give it a ControlDevice link to the newly created TexChangePoint.

Your newly created object's properties should look like this:

Note: If you go into game mode and pull the lever, any surfaces using the texture specified in the Script->TerrReplaceOff property will be replaced with the texture specified in the Script->TerrReplaceOn property.
However, if you return to DromEd after changing the brush's texture, the texture will remain changed in DromEd's 3D view.
If you reportalize the level, the correct texture should be replaced.