integer llGetNumberOfSides()
Returns the number of
sides of the
prim containing this
script.
Each
face of a
primitive can be referenced to, from
0 to
n - 1, where
n is the
value returned from this
function. Each face can have a different
texture,
color, and
opacity (
alpha).
Examples:
// this rotates the texture of each side to match its sidenumber in degrees
// after running this script, you can select each texture (using "Select Texture")
// in the edit dialog and read it's side number in the "Rotation (degrees)" field.
default {
state_entry() {
integer i;
integer sides;
sides = llGetNumberOfSides();
for (i = 0; i < sides; i++) {
llRotateTexture(i * DEG_TO_RAD, i); // rotate by side number degrees
}
}
}
This article wasn't helpful for you? Maybe the
related article at the LSL Portal is able to bring enlightenment.
Functions |
Texture |
Side