Neverworld Grid

You are not logged in. Would you like to login or register?



6/10/2019 6:08 pm  #1


Prep a rez box

/*
        Prep Box UDF
        Copylefted May/31/2019 - Logan "Smexypants" Stargazer

        This converts a standard box prim into what I think a Rezbox should look like.
        It places the name of the object onto the sides using the Opensim Texture-creating
        functions so make sure you name your box before dropping this script onto it.
        If you smeg-up just rename the box and drop the script on again.

        After it finished it deletes itself.

        Sharing is caring 
*/

PrepBox()
{
    llSetClickAction(CLICK_ACTION_TOUCH);
    llSetRot(ZERO_ROTATION);
    llSetScale(<0.5,0.5,0.5>);
    llSetColor(<1,1,0>, ALL_SIDES);
    llSetColor(<1,1,1>, 0);
    llSetTexture(TEXTURE_BLANK,ALL_SIDES);
    string CommandList = ""; // Storage for our drawing commands
    CommandList = osMovePen( CommandList, 10, 10 );           // Upper left corner at <10,10>
    CommandList = osDrawText( CommandList, llGetObjectName()); // Place some text
    osSetDynamicTextureData( "", "vector", CommandList, "width:256,height:256", 0 );
    llSetTexture("21f88ff4-8277-4f9d-a5ec-bee61fd08ea8",0);
    llRotateTexture(180 * DEG_TO_RAD,0);
    return; 
}

default
 {
     state_entry()
     {
             PrepBox();
            llRemoveInventory(llGetScriptName());
     }
 } 

 

Board footera

 

Powered by Boardhost. Create a Free Forum