Homeworld Effects Manual: setLength()
setLength(float value)
setLength() has no effect if there is a setScale(1) active at the same time.
value can be an integer constant, a floating-point constant, or a floating-point variable. Using an integer variable will be interpreted as a zero, but will not cause a crash.
setLength() acts on differently on different types of objects:
Effects: Other effects usually call setDefaults() and/or setLength() before creating anything, so setLength() in the calling file will have no effect. It is possible to have a file that does not call setDefaults() at the beginning and thus depends on the calling file for some attributes, but such files are risky. If the calling file does not provide what the file is expecting, it may produce garbage.
Meshes: setLength() multiplies the length of the mesh by value. So setLength(0.5) will make a 50m long mesh appear 25m long, and so on. Many of the meshes used by Homeworld are 1m across, so setLength() can set their length directly. If value is negative, the mesh is turned inside-out and backwards.
Sprites: Sprites are 2-dimensional and have no length, so setLength() has no effect.
Circles: Circles are 2-dimensional and have no length, so setLength() has no effect.
Lines: value is the length of the line, in meters.
Points: Points do not have length, so setLength() has no effect.