Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetPrimitiveParams not workiing?

Lazink Maeterlinck
Registered User
Join date: 8 Nov 2005
Posts: 332
12-18-2006 20:26
Is llSetPrimitiveParams not working properly? I got asked about a script I did a while ago that worked perfectly fine before a few updates ago, now it doesn't seem to work with the same functionality? Anyone else run into problem with setting scale and position in the function?

Update: Ok, did a little more testing, it has to do with the object being flexible as well, so if your object you are resizing and moving is flexi, it doesn't handle llSetPrimitiveParams very well.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
01-13-2007 23:07
Do you have any more info on this? I've had customers return a few broken objects - they've spontaneously unlinked themselves. These are wings, and they flap the usual way - central prim runs a timer, sends out a linked message, all the feather prims use that to move to a new position. Today I was finally able to sort-of reproduce the problem:

* Turn up the flapping speed, so the child prims are getting linked messages fast.
* Go to a laggy sim
* While the timer's running (and the wings are flapping), issue more wing commands that make them change flexiness/size/position

... That's the part I'm not sure about. I've got 2 wings to break, but I don't have a fixed set of commands that always causes it. Anyway, my "hide" command makes the prims shrink down to a tiny size, and move to ZERO_VECTOR (local coordinates, obviously). Sometimes, what I see is that the prims have gone down in size, but they haven't moved to the root prim's location. Once this happens, if I detach the wings and then rez them on the ground, they'll be separate unlinked objects. And the prim sizes/positions do exceed the link limits. But if a child prim tries to move to an invalid position, the function call is supposed to fail, it's not supposed to get to the new position and then fail the link distance check and come unlinked. At least, that's how I read the Wiki.

Here's the call I'm making:

CODE

else if (cmd == "in")
{
llSetPrimitiveParams([PRIM_POSITION, ZERO_VECTOR,
PRIM_SIZE, <0.02, 0.02, 0.02>]);
}


So... if that's causing what I'm seeing, then it looks like the prim params list is applied backwards. Which doesn't make much sense.

The workaround I can think of is to make that 2 function calls. Won't look as nice, but it might be safes where scripts will randomly not execute some functions, and execute others in the same logic block. I can't think of any way to protect against that.

So anyway... if you have any more details about your testing, and if you've found a pattern for what does not work, please post that here. And if anyone else has any ideas, they're most welcome :)

Thanks,
Ziggy
Lazink Maeterlinck
Registered User
Join date: 8 Nov 2005
Posts: 332
01-14-2007 14:09
What I've noticed is that it only works if the prim is not flexi. If it is, you get some very weird effects. Prim shrinking but not moving, prim moving but not changing size, And the funniest is when the prim is suppose to be done moving, and it looks like it has a gap (this is a simple curtain script) you go and edit it, and the gap closes. When I looked at this with turning flexi off, it worked perfectly, same prims, same code, only difference is flexi vs non-flexi.
Rhiannon Arkin
Registered User
Join date: 7 Jan 2007
Posts: 9
03-09-2007 09:46
Unfortunately i have to confirm this problem. I am using llSetPrimitiveParams to offset and scale my curtains to open and close them.
It works fine on the object itself
but if the curtain becomes part of a linked set the scaling starts to randomly not work anymore.

It's a really bad bug in my opinion.
and i don't have a solution for it. since SetPose and SetScale each have their own issues (like being slow and delayed)


greetings