Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Set & Get PrimitiveParams

Cindy Claveau
Gignowanasanafonicon
Join date: 16 May 2005
Posts: 2,008
05-30-2006 11:22
I'm at the office right now, so no SL to test this out for myself. I was working on a script that would animate flex prims to create some interesting, randomized movement.

I can use llSetPrimitiveParams() to change the PRIM_FLEXIBLE settings, I understand that. But in the LSL Wiki, the list of params returned by llGetPrimitiveParams() does not include the PRIM_FLEXIBLE list.

I'd love to assume that the Wiki just isn't updated (and maybe someone here can fix that), but is there a chance that llGetPrimitiveParams() doesn't give you the PRIM_FLEXIBLE list that you need to figure out softness, gravity, drag, force vector, etc?

Thanks in advance - I'm a scripting newbie, so please be gentle :)
_____________________
Adriana Caligari
Registered User
Join date: 21 Apr 2005
Posts: 458
05-30-2006 11:41
I would assume that as flex prims are a client side effect that there is no return on the values ( could be wrong )

Much like you cannot read particle settings.

(would be nice to be able to get back what you sent tho - considering it is ,err the client and not another sim you are talking to)
Cindy Claveau
Gignowanasanafonicon
Join date: 16 May 2005
Posts: 2,008
05-30-2006 12:28
From: Adriana Caligari
I would assume that as flex prims are a client side effect that there is no return on the values ( could be wrong )

Much like you cannot read particle settings.

(would be nice to be able to get back what you sent tho - considering it is ,err the client and not another sim you are talking to)

Thanks for the answer, Adriana, but that's a bit troubling to me. If my prims have a specific setting before my timer event begins, it'd be nice to have one function to grab the current settings as a starting point.

In my script (which is only partially tested over lunch today), I'm incrementing certain flex settings up to the max value (10 for most of them, 3 for softness), and if the total increment exceeds the max then I begin declinating.

For all this to work really well I either need to (a) set the prims to 0 all around before running the script, or (b) test for current value. Otherwise, incrementing/declinating are going to risk going past the maximum OR never going down to 0. I was hoping to make the script portable enough to work with whatever flex prims I might create in the future, or share with friends who won't have to set all the Features to 0 before activating the script.
_____________________
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
05-30-2006 18:44
llGetPrimitiveParams() does indeed work with the new PRIM_FLEXIBLE settings. I'm updating the LSL wiki now. :)

It returns a list containing: [ integer TRUE/FALSE, integer softness, float gravity, float friction, float wind, float tension, vector force ]
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"