Application of a Texture with the Animate Command

Important Note:

This page describes the usage of the animate command for application of a single texture. It is highly recommended that you use the texture command for this purpose rather than the animate command, because the animate command is much less efficient for application of a single texture than the texture command and will tend to reduce performance unnecessarily. This applies equally to both ordinary textures and filmstrip textures.

The information, which is provided on this page, is mainly intended to help people more easily understand the otherwise complex animate command.

Syntax for application of a single texture with the animate command

    animate [tag=tag] [mask OR nomask] object-name animation-name 1 1 0
    animate [tag=tag] [mask OR nomask] object-name texture-name. 1 1 0
    animate [tag=tag] [mask OR nomask] object-name animation-name index 1 0 [index]

Note: [ ] denotes optional arguments.

Description

Application of a single texture is probably the simplest usage of the animate command, and was at one time by far the most common function that the animate command was used for.

Separate help pages are available about the optional parameters:

Note: By default, textures are treated as not masked. If you wish to use the animate command with masked textures you must explicitly specify the mask option or the textures will be applied as unmasked.

The object-name argument specifies the name of the object to apply the animation to. This argument must be specified. If the animation is to be applied to this object, specify the keyword me as the object name. Object names are assigned via the name command.

The animation-name argument specifies the base name of the textures to be used in the animation. Optionally, you can instead specify a single texture-name with a terminating period character, but again it is recommended that you instead simply use the texture command.

In this usage of the animate command, note that the imagecount is 1, the framecount is 1, and the framedelay is basically arbitrary except for how it may effect performance. For better performance, the texture command should be used when only a single texture is being applied.

Alternatively, a texture index can be used as the imagecount and a framecount of 1 be specified. The index must then also be specified after the framedelay as a single entry framelist argument, unless an index value of 1 is specified for the imagecount argument. If used, this index argument specifies which texture in a numbered set is to be applied. It should be noted that this usage, although supported, is VERY inefficient!

For more information on arguments mentioned here but not described in detail, see the animate command's help page.

Historically the animate command has been used most often for the purpose of placing a single static texture on an object. Please consider using the more efficient texture command for this purpose.

Note: the animate and texture commands will not display textures predictably on objects that do not have UV texture values specified for the vertices of the object.

Examples

    create animate me water 1 1 0

This action applies the water1 texture with no texture mask. You should instead use: create texture water1

    create animate mask me flame 1 1 0

This action applies the flame1 texture using the flame1m texture mask. You should instead use: create texture flame1 mask=flame1m

    create animate me as. 1 1 0

This action applies the as texture with no texture mask. You should instead use: create texture as

    create animate mask me chilli. 1 1 0

This action applies the chilli texture using the chillim texture mask. You should instead use: create texture chilli mask=chillim

    create animate me wood 5 1 0 5

This action applies the wood5 texture with no texture mask. Note that this also downloads an entire set of 5 wood textures, wood1 through wood5 and that it is possible to force the downloading of textures in the set beyond the one actually used, such as for example downloading wood1 through wood8 and displaying wood5 would be done like this: create animate me wood 8 1 0 5 In either case, you generally should instead use: create texture wood5

These examples are included to help you more easily understand the animate command, but are in no way meant to encourage the use of the animate command for application of a single texture. See the following help pages for additional information on the animate command: