Animated Flats and Textures

By Richard Clark

Animated Flat and Texture
Figure 1: Animated Flat and Texture

ZDoom has a very easy way to add custom animated flats and textures to a wad file. The level designer simply adds the animated sequence to a text file using any text editor and imports the file into a lump called ANIMDEFS using WinTex or some other wad manipulation tool. Figure 1 illustrates an animated flat and an (ugly :) texture in the demo wad, anidefs.wad.

flat alite1

pic 1 tics 4
pic 2 tics 4
Table 1: Flat Definition

Table 1 illustrates the definition for the animated flat in Figure 1. The definition starts with the keyword flat, followed by the name of the first flat. In the wad file there are two flats named alite1 and alite2. The definition following the flat name is the order in which to display the flat, and the time in tics of the frame. In other words, alite1 (pic 1) will display for 4 tics, then alite2 (pic 2) for 4 tics, and so on.

texture field1

pic 1 tics 4
pic 2 tics 4
pic 3 tics 4
pic 4 tics 4
pic 5 tics 4
pic 6 tics 4
Table 2: Texture Definition

The texture definition is exactly the same as the flat definition, except the keyword texture is used instead. Notice in Table 2 that the number of texture frames is arbitrary. The only requirement is that the texture frames be listed in the same order as they are in the wad. In this case, there are six textures in anidefs.wad, named field1-field6, and in that order.

An alternative way to display flats or textures is to use the format pic n rand min max. n is the the flat/texture number (1, 2, etc.). rand min max will display the texture for a random amount of tics between min and max.

ZDoom offers an easy and extremely flexible way to add cool animations to any map.


ZDoom reference by Randy Heit.