Don't click here unless you want to be banned.

LSL Wiki : llScaleTexture

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl836.us.archive.org
llScaleTexture(float horizontal, float vertical, integer side);

Sets the horizontal and vertical repeats per face on side. If side == ALL_SIDES, all sides are set in one call. Negative values for horizontal and vertical will flip the texture.

Note that these parameters correspond to the "Repeats per Face Horizontal (U)" and the "Vertical (V)" boxes on the Texture tab of the in-world editing tool. There is another box on that panel, "Repeats per Meter". That per meter box calculates values for the other two boxes according to the size of the prim. To take an example, if you had an image that you wanted to tile equally onto four cube faces, you would set the horizontal and vertical parameters of llScaleTexture() to 0.5 regardless of the size of the faces.

Note: This function delays the script for 0.2 seconds.

Compare to llGetTextureScale.

See also llSetPrimitiveParams.

Q: How do I determine which side of an object this applies to?
A: See side.

Q: How do I set more than 1 side but only calling this parameter once?
A: You can only specify a single side or ALL_SIDES. To avoid multiple delays, use multiple instances of PRIM_TEXTURE in llSetPrimitiveParams.


This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Texture | Scale
Comments [Hide comments/form]
If you use negative values for your horizontal and vertical values, then this will flip the texture accordingly. For example, to flip horizontally, use the following code:
default
{
    state_entry()
    {
        llScaleTexture(-1.0, 1.0, ALL_SIDES);
    }
}
-- DedricMauriac (2006-02-05 00:29:55)
If you attempt to scale a texture accurate to the thousandth, it will be rounded to the nearest hundredth (same with llSetPrimitiveParams). Using the object edit dialog, you CAN scale a texture accurate to the thousandth. Annoyingly, if you change nearly any other prim parameter, the repeats per face will be rounded to the nearest hundredth.
-- JamalMfume (2006-10-03 18:06:15)
Attach a comment to this page: