Homeworld Effects Manual: setStartFrame()

setStartFrame(int frame)

Legal values: non-negative integers

Default value: 0

Determines the starting frame of a texture animation.

This command should be used in conjunction with a setAnimation() command. This command lets you start somewhere in the middle of a animation. Since Homeworld is a computer program, it starts counting at zero, so setStartFrame(0) starts with the first frame. For my counter utility, I created an 'animation' that would loop through the digits 1 through 9, but at 0.0001 frames per second. That way, I could find the value of the digit and use

setStartframe(valueOfDigit)

instead of ten if() statements like this:

if(valueOfDigit == 3)
{
	setTexture(textures\numbers-flipped, 8,16,16,24)
}