Homeworld Effects Manual: label

label(string name)

Assigns a name to a point in a program.

No two labels in the same file should have the same name. Labels are used for three things: as targets of goto() statements, for naming texture animations, and for naming mesh animations.

goto() statements are simple: to go to label(name), use goto(name). I haven't found goto() statements necessary very often, but to implement for loops or while loops, you'll need to use them.

A texture animation consists of a label(), a series of subTextureDWORD() commands, and int 4294967295. The name of the label is the name of the animation by setAnimation(). See those commands for more details.

A mesh animation consists of a label(), a series of morphAnimDWORD commands, and int 4294967295. setMeshAnimation() refers to the mesh animation by the name of the label. For more details, see those commands.