Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Discussion: 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
Original Thread
07-25-2006 14:15
/15/ff/123820/1.html
_____________________
i've got nothing. ;)
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
07-26-2006 06:53
I'd say this would be something that a lot would find useful (personally if I make an interesting shape I may want to reuse, I just take a copy to inventory.)

You could probably set the second script to listen for the first and have it store the values in variables for reuse instead of doing the manual copying....but I'm not usually comfortable with this method as it would be a simple thing for those values to be lost.
Robo Eros
Registered User
Join date: 19 Feb 2007
Posts: 13
mhh
03-09-2007 04:32
hi,

can anybody help me....what makes the prims shape reminder...maybe i would build a table. In what way helps this?