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

LSL Wiki : llSetScale

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are
llSetScale(vector scale)

Sets the prim's scale (size). Prim size restrictions apply: maximum 64m, minimum 0.01m in any direction (Havok limit). Scaling a prim larger than 64m will cause it to scale up to 64m. Scaling a prim to less than 1cm will cause it to silently fail. Scaling a prim in a linkset causes a silent failure if the scale change will cause the object to exceed the link distance.

Physical prims cannot change their scale, as that would change their mass as well.

A prim's scale can be retrieved using llGetScale.

llSetScale has been supplemented, though not replaced, by llSetPrimitiveParams.

Q: Does this function work on attached objects?
A: Yes, llSetScale does work on attached objects. As does llSetPrimitiveParams. You can chain multiple commands together to execute all at once with llSetPrimitiveParams

Resizing Linked Sets:
In a linked object, this function only changes the size of the prim the script is in. There is no simple way to scale a whole linked object. Scale each individual child prim and adjust its position in relation to the parent prim.


Put this script into each prim of the object:
default {
    link_message(integer sender_num, integer num, string str, key id) {
        float scale; // size factor
        list    primparams;
        scale = (float)str;
        primparams = [];
        primparams += [PRIM_SIZE, llGetScale() * scale]; // resize
        if (llGetLinkNumber() > 1) { // only move if we're not the root object
            primparams += [PRIM_POSITION, llGetLocalPos() * scale]; // reposition

And this script into the parent prim of the linked set:
// rescales the linked set by the specified factor. factor > 1 makes it larger, < 1 smaller
// example: "/9 2.5"
Resize(float scale) {
    integer num_prims = llGetNumberOfPrims();
    integer i;

    for (i = 1; i <= num_prims; i++) { // first prim in a linked set is 1
        llMessageLinked(i, 0, (string)scale, NULL_KEY);

default {
    state_entry() {
        llListen(9, "", llGetOwner(), "");
    listen(integer channel, string name, key id, string message) {
        float scale;
        scale = (float)message;
        if ( scale == 0.0 ) return; // we don't resize by factor 0.0

        llSay(0, "Resizing by factor " + (string)scale);


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

Functions | Dynamics | Scale Jasa SEO Jasa SEO Murah Sepatu Online Toko Sepatu Online Sepatu Sepatu Murah Sepatu Safety Sepatu Futsal Cheapes Hostgator Coupon Link Booking Televisori offerte Notebook Offerte Berita Terkini Internet Marketer Muda Internet Marketer Indonesia Portatile Apple RDAnet Lorks Karikatur Bisnis Modal Kecil Bisnis UKM Berita Terbaru Iklan Baris Jasa SEO Jasa SEO Murah SEO Indonesia Konsultan SEO SEO Belajar SEO Kursus SEO Kursus SEO Murah Jam Tangan Casio Jam Tangan Casio Jam Tangan Murah Jam Tangan Grosir Baju Terbaru Grosir Baju Baju Terbaru Grosir Baju Murah Bisnis Online Belajar SEO Kerupuk Kerupuk kulit Social Bookmark Dofollow Social Bookmark Kumpulan Puisi Kirim Puisi bola hantu Penumbuh Rambut Penumbuh Rambut timbangan WBC Wonogiri Jasa SEO Murah Jasa SEO Jam Tangan Murah
There are 14 comments on this page. [Display comments/form]