Jump to content

Make your own Megaprims


Rolig Loon
 Share

You are about to reply to a thread that has been inactive for 3993 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

This little script will have a short shelf life, because it's a matter of time before all viewers have built-in capability to rez prims with dimensions up to 64m.  Until then, though, don't worry if you viewer doesn't offer the feature.  The servers know how to make 64m prims.  You just need a script to do it.

Drop this script in a single prim.  You may update any of the prim's X, Y, Z dimensions by typing them in chat on channel 34 in the format X = 12.3 or Y = 55.63 or Z = 42.1 . Touch the prim to apply the new dimensions.  The script deletes itself in 5 minutes if there has been no further activity.

vector gSize;
default
{
    state_entry()
    {
        gSize = llGetScale();
        llListen(34,"",llGetOwner(),"");
    }
    
    on_rez(integer startup)
    {
        llResetScript();
    }

    listen(integer channel, string name, key id, string msg)
    {
        integer idx = llSubStringIndex(msg,"=");
        if (~idx)
        {
            string Axis = llToLower(llStringTrim(llGetSubString(msg,0,idx-1),STRING_TRIM));
            float Dim = (float)llStringTrim(llGetSubString(msg,idx+1,-1),STRING_TRIM);
            if (Dim <= 64.0)
            {
                if(~channel = llListFindList(["x","y","z"],[Axis]))
                {
                    gSize = (vector)llList2String(["<"+(string)Dim+","+(string)gSize.y+","
                    +(string)gSize.z+">","<"+(string)gSize.x+","+(string)Dim+","+(string)gSize.z+">"
                    ,"<"+(string)gSize.x+","+(string)gSize.y+","+(string)Dim+">"],channel);
                }
                else
                {
                    llOwnerSay("Error: Axis not recognized. Your message must be in the format \"X = 50.0\".");
                }
            }
            else
            {
                llOwnerSay("Prim dimensions can not exceed 64.0m in any direction.");
            }
        }
        else
        {
            llOwnerSay("Error: There must be a \"=\" sign between the axis label and the dimension.");
        }
    }
    
    touch_start(integer total_number)
    {
        llSetScale(gSize);
        llOwnerSay("The prim's size has been reset to " + (string) gSize);
        llSetTimerEvent(300.0);
    }
    
    timer()
    {
        llOwnerSay("Resizing is complete. Cleaning up now.");
        llRemoveInventory(llGetScriptName());
    }
    
    changed (integer change)
    {
        if(change & CHANGED_OWNER)
        {
            llResetScript();
        }
    }
}

 

 

  • Like 3
Link to comment
Share on other sites

Hi Rolig! Thank you so much for creating this! It works like a dream. Quick question for you - if using it to replace regular megaprims, is there any difference in lag created? for instance, I was redoing a roof that was 4 megaprims (32x16.025) with one of these "created" megas...will it change lag for better or worse at all?

Again, thank you!

Link to comment
Share on other sites

Megaprims do not create lag.  I have no idea where that myth started, but it's incredibly hard to kill.  They have never created lag, and there's no reason why they should.  Megaprims do have other disadvantages (not visible to people with short draw distances, hard to sit on sometimes, not useful for physical objects .... ), but lag isn't one of their drawbacks.

Link to comment
Share on other sites

Oh, megas can be fun as physical objects.  Rez one, sit on it, change the altitude to 1000 meters, wait for everything to redraw you in the sky, then make it physical, and close the edit box, while quickly getting your mouse over to the chat window to see if you can type "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA!!!!!!!" before crashing into the ground :womanvery-happy:

 

I'd recommend only doing this on one's own land.

 

And yes, I have an odd sense of humor.

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...
  • 3 weeks later...
  • 1 year later...

lol 64 meters and under isnt what i consider mega prims, now 64 and above i would, to me the script is useless. I can scale and prim to 64 meter inworls without a script. Fact still remain if an object has a script in it its will cause some lag somewhat giving the time span it is in the object.

Link to comment
Share on other sites

That's OK.  He's a newbie.  He wasn't around during the time when it was possible to make prims larger than the old 10m limit, but the viewers didn't know how yet, and he just hasn't figured out how to read dates.  :smileywink:

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3993 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...