If I get the size of a prim using “list param = llGetPrimitiveParams([PARAM_SIZE]);”
How do I then assign variables to each of the XYZ vectors so that I can change them individually with “llSetPrimitiveParams([PRIM_SIZE, param]);” ?
Thanks, Mod
These forums are CLOSED. Please visit the new forums HERE
llSetPrimitiveParams |
|
Mod Faulkner
Registered User
Join date: 11 Oct 2005
Posts: 187
|
01-16-2006 05:05
If I get the size of a prim using “list param = llGetPrimitiveParams([PARAM_SIZE]);”
How do I then assign variables to each of the XYZ vectors so that I can change them individually with “llSetPrimitiveParams([PRIM_SIZE, param]);” ? Thanks, Mod |
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
01-16-2006 05:44
Something along the lines of:
list param = llGetPrimitiveParams([PARAM_SIZE]); vector size=llList2Vector(param, 0); size.x=10.0; size.y=5.0; size.z=1.0; You assign the value to a vector, then you can use .x, .y and .z to address the individual parts of it. |
Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
|
01-16-2006 06:05
Also remember that if while llGetPrimitiveParams and llSetPrimitiveParams are great for setting multiple paramaters simultaneously - if you just want get and set size then llGetScale and llGetScale are easier to use - and quite a bit more efficient.
|
Mod Faulkner
Registered User
Join date: 11 Oct 2005
Posts: 187
|
Thanks
01-16-2006 06:33
Thanks Eloise and Ben. Now maybe I can get the automated drapes made that my wife wants. Of course, then she will come up with something new, lol. I know I could make a simialar looking affect with textures, but I know even less about texture manipulations and like this idea better.
|
Keknehv Psaltery
Hacker
![]() Join date: 11 Apr 2005
Posts: 1,185
|
01-16-2006 07:15
A minor recommendation:
Position the blinds in their "closed" position, and then use a script to get all the parameters that will change (position, scale, rotation, etc.). Next put them in the "open" position and get these attributes again. Then, you can set up the llSetPrimitiveParams much easier. Like this... CODE
_____________________
|