LlSetScale

From Second Life Wiki

Jump to: navigation, search

Template:Needs Translation/LSL/de Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

Contents

Summary

Function: llSetScale( vector scale );
47 Function ID
0.0 Delay
10.0 Energy

Sets the scale of the prim according to scale

• vector scale

x, y & z components of scale need to be in the range [0.01, 10.0], if they are out of the range they are rounded to the nearest endpoint.

Caveats

  • This function only changes the scale of the prim that the script is in. Not the entire object.
  • Does not work in a physical prim.

Search JIRA for related Bugs

Examples

 
//A basic door that opens and closes when an avatar collides with it.
//Not very effective, as it would be better to use llSetStatus(STATUS_PHANTOM, 1)...
//But, it works.
vector startingSize;
default {
     state_entry() {
          startingSize = llGetScale();
     }
     collision_start(integer i) {
          llSetScale(<0.1, 0.1, 0.1>); //Shrink
          llSetPos(llGetPos() + <0.0,0.0,10.0>); //Hide us
          llSetTimerEvent(3.0);
     }
     timer() {
          llSetTimerEvent(0.0);
          llSetScale(startingSize); //Go back to normal size
          llSetPos(llGetPos() - <0.0,0.0,10.0>); //And where we started
     }
} //Code by Xaviar Czervik.
 

See Also

Functions

•  llGetScale Gets the prims size
•  llSetPrimitiveParams Sets prims attributes
•  llGetPrimitiveParams Gets prims attributes

Deep Notes

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