User Tools

Site Tools


dromed:rexturing_brushes_ingame

Retexturing Brushes In-Game

:T1: :T2:

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→S→Scripts and enter the script in Script 0. What script to enter depends on which version of Thief you are using:

There is no default script to do this in System Shock 2.

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:

Retexture Properties

NOTEME 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.

Bear in mind that this changed texture will remain in place until the mission is portalised or the texture trap is turned off ingame, even if you save and reload the mission.

dromed/rexturing_brushes_ingame.txt · Last modified: 2007/06/26 17:40 (external edit)