Mutators

From C4 Engine Wiki

Jump to: navigation, search

A widget in an interface panel can have one or more mutators applied to it. Mutators dynamically change the appearance of a widget in some way to achieve animation effects. The following table describes the mutators that are built into the engine. Custom mutators can be defined by the game code and registered with the engine so they appear in the panel editor.

Each mutator can have an identifier string of up to 15 characters. As with widget identifiers, mutator identifiers do not have to be unique and are used to identify one or more specific mutators in a panel from a script.


Mutator

Description

Fade

Causes the color of a widget to smoothly change to a new value, and then stops.

Pulsate

Varies the color of a widget back and forth between its original value and another color specified by the mutator. The interpolation can be based on a square wave (for blinking), a triangle wave, or a sine wave.

Randomize

Continually assigns a random offset to the texture coordinates of an image widget. This can be useful for producing effects like television static with a noise texture.

Rotate

Rotates the texture coordinates of an image widget. A positive speed rotates counterclockwise, and a negative speed rotates clockwise.

Scale

Scales an image widget to a given multiple of its original size, and then stops. The texture coordinates can be fixed so that the image is magnified (or shrunk), or the texture coordinates can be scaled to achieve wipe effects.

Scroll

Continually scrolls the texture coordinates of an image widget.

Ticker

Scrolls text in a text widget like a stock ticker. The text must be displayed as a single line.

Animate

Plays a sequence of frames from a texture map in an image widget.


See Also

Personal tools