Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Prim Shape reminder

Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
07-24-2006 08:30
This is a little tool for builders. If you make a neat or useful shape from a prim by chance, you should like to remind the numeric value. This tool is what for a person like you.

You have to create two scripts in your inventory and copy and paste on each one.

#PutGetPrimParams
CODE
default
{
state_entry()
{
llOwnerSay("PRIM_SIZE :" + llList2CSV(llGetPrimitiveParams([PRIM_SIZE])));
llOwnerSay("PRIM_TYPE :" + llList2CSV(llGetPrimitiveParams([PRIM_TYPE])));
llRemoveInventory(llGetScriptName());
}
}
#ParamFormat
CODE
list SIZE = [
];

list TYPE = [
];

default
{
state_entry()
{
llSetPrimitiveParams([PRIM_SIZE] + SIZE + [PRIM_TYPE] + TYPE);
}
touch_start(integer total_number)
{
llOwnerSay("Removed this script.");
llRemoveInventory(llGetScriptName());
}
}
Then, If you make a prim shape, put #PutGetPrimParams script into the inventory. It should say like,
CODE
"Object: PRIM_SIZE :<2.000000, 2.000000, 0.100000>"
"Object: PRIM_TYPE :0, 0, <0.375000, 0.875000, 0.000000>, 0.000000, <0.000000, 0.000000, 0.000000>, <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>"

Copy each value to relevant place on #ParamFormat script, such as...
CODE
list SIZE = [<2.000000, 2.000000, 0.100000>
];

list TYPE = [0, 0, <0.375000, 0.875000, 0.000000>, 0.000000, <0.000000, 0.000000, 0.000000>, <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>
];

And you'd better change its name that you were easy to learn. Whenever you want to make the prim, just put the script into a prim.

Example:
1. Door
CODE
list SIZE = [<2.000000, 2.000000, 0.100000>
];

list TYPE = [0, 0, <0.375000, 0.875000, 0.000000>, 0.000000, <0.000000, 0.000000, 0.000000>, <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>
];

default
{
state_entry()
{
llSetPrimitiveParams([PRIM_SIZE] + SIZE + [PRIM_TYPE] + TYPE);
}
touch_start(integer total_number)
{
llOwnerSay("Removed this script.");
llRemoveInventory(llGetScriptName());
}
}
2. Pencil
CODE
list SIZE = [<2.000000, 0.100000, 0.100000>
];

list TYPE = [5, 0, <0.000000, 1.000000, 0.000000>, 0.000000, <0.000000, 0.000000, 0.000000>, <1.000000, 0.500000, 0.000000>, <0.000000, 0.000000, 0.000000>, <0.610000, 0.880000, 0.000000>, <0.000000, 0.000000, 0.000000>, 1.000000, 0.000000, 0.000000
];

default
{
state_entry()
{
llSetPrimitiveParams([PRIM_SIZE] + SIZE + [PRIM_TYPE] + TYPE);
}
touch_start(integer total_number)
{
llOwnerSay("Removed this script.");
llRemoveInventory(llGetScriptName());
}
}
3. Stool
CODE
list SIZE = [<1.000000, 0.500000, 0.500000>
];

list TYPE = [5, 0, <0.000000, 1.000000, 0.000000>, 0.799000, <0.000000, 0.000000, 0.000000>, <0.750000, 0.500000, 0.000000>, <0.000000, 0.000000, 0.000000>, <0.199000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 1.000000, 0.000000, 0.000000
];

default
{
state_entry()
{
llSetPrimitiveParams([PRIM_SIZE] + SIZE + [PRIM_TYPE] + TYPE);
}
touch_start(integer total_number)
{
llOwnerSay("Removed this script.");
llRemoveInventory(llGetScriptName());
}
}
4. Table
CODE
list SIZE = [<0.750000, 0.800000, 0.800000>
];

list TYPE = [5, 0, <0.000000, 1.000000, 0.000000>, 0.899000, <0.000000, 0.000000, 0.000000>, <1.000000, 0.500000, 0.000000>, <0.000000, 0.000000, 0.000000>, <0.250000, 0.850000, 0.000000>, <0.000000, 0.000000, 0.000000>, 1.000000, 0.000000, 0.000000
];

default
{
state_entry()
{
llSetPrimitiveParams([PRIM_SIZE] + SIZE + [PRIM_TYPE] + TYPE);
}
touch_start(integer total_number)
{
llOwnerSay("Removed this script.");
llRemoveInventory(llGetScriptName());
}
}
_____________________
:) Seagel Neville :)
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Discussion Thread
07-25-2006 14:15
/54/e0/124169/1.html
_____________________
i've got nothing. ;)