Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Seting prim flexible and not flexible via script is possible?

Madu Jinx
Registered User
Join date: 19 Sep 2009
Posts: 3
10-06-2009 17:56
I was trying to change a prim to flexible and after a time to not flexible using:
llSetPrimitiveParams ([PRIM_FLEXIBLE, FALSE, 0, 0, 0, 0, 0, <0,0,0>])
and
llSetPrimitiveParams ([PRIM_FLEXIBLE, TRUE, 0, 0, 0, 0, 0, <0,0,0>])
But the prim is allways flexible.
For instance, if in a colision event the prim is set to flexible, in features the flexible path is checked, but if in a colision event the prim is set to not flexible, in features the flexible path is still checked.
Is this a bug?
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
10-06-2009 18:28
i'm not sure i quite understand your problem. but, flexis are always phantom, so the only way to get a collision event from it is if you're using llVolumeDetect.
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Madu Jinx
Registered User
Join date: 19 Sep 2009
Posts: 3
10-07-2009 09:19
I was trying to colid to a prim, it turn into flexible and after a time it is back not flexible.
I can colid to the prim, it is flexible, but after a time it still flexible.

collision_start(integer detected)
{ llSetPrimitiveParams ([PRIM_FLEXIBLE, TRUE, 0, 0, 0, 0, 0, <0,0,0>]); }
timer()
{ llSetTimerEvent(0.0); }
{ llSetPrimitiveParams ([PRIM_FLEXIBLE, FALSE, 0, 0, 0, 0, 0, <0,0,0>]); }

I Tryed with "llSleep(open);" instead of "timer()" and it doesn't works too. The prim remains flexible.
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
10-07-2009 09:28
llSetTimerEvent(0.0)//set to zero, simply turns off the timer and the timer() event is never reached.

here's one i made with llVolumeDetect, no timer in it at all, it only relies on the built in delay from llSetPrimitiveParams. it doesn't actually turn off flexi, it just removes the force, but you can easily turn it off too
/54/68/339828/1.html
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Vance Adder
Registered User
Join date: 29 Jan 2009
Posts: 402
10-07-2009 09:47
Try changing your code to something like

CODE

collision_start(integer detected)
{
llSetPrimitiveParams ([PRIM_FLEXIBLE, TRUE, 2, 0.3, 2.0, 0.0, 1.0, <0, 0, 0>] );
llSetTimerEvent(3.0);
}

timer()
{
llSetTimerEvent(0.0);
llSetPrimitiveParams ([PRIM_FLEXIBLE, FALSE, 0, 0, 0, 0, 0, <0,0,0>]);
llSetStatus(STATUS_PHANTOM, FALSE);
}


I'm unsure if the prim will go back to be non-phantom after you make it non-flexy. Might be worth testing, but otherwise, you can always explicitly turn the phantom status back off.
Madu Jinx
Registered User
Join date: 19 Sep 2009
Posts: 3
10-07-2009 15:03
Thanks Vance!
The set phantom false did the trick.