Changing Textures In Game

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 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 ‘WindowShade’. Use the script ‘TrapTexture’ if you’re using DromEd 2. Add S->Scripts and enter ‘WindowShade’ in script 0. Now we have to add both Script->TerrReplaceOff and Script->TerrReplaceOn. Now, 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 lever or similar object and give it a ControlDevice link to the newly created TexChangePoint.

About this entry