|
Seven Shikami
Registered User
Join date: 22 Sep 2006
Posts: 82
|
03-21-2008 06:20
This is bizarre.
I have a system that moves a bunch of small (ranging from 0.3m cubes to 0.9m cubes) prims around a root prim, randomly within an area that's bound by 10mx10mx10m centered on the 0.01m cube root prim. Every timer tick in the root it instructs the children to move using llSetPos (yes, I know about local vs. global getpos) to a new randomized location within that space. (FYI, it's basically an oceanic aquarium; the fish move in a user defined xyz space.)
This worked fine when I sold the thing, but I have user reports that SOME of them are spontaneously delinking all their child prims and then the root moves a random distance away from where it was placed. Which is insane because there is no breaklink code in there, there's no code in the root to reposition it, and this is completely inconsistent in that some aquariums seem to work fine and others don't. My only guess is the randomization factor means some combination of child prim positions makes it go haywire and not all aquariums hit that combo.
What's going on? Nothing in the wikis I've read says that llSetPos can cause a child to shatter the entire linkset. Sure, it might not move the entire distance if it's more than 10m, but breaking the thing down? And how is the root relocating when there's no code in there that can move it?
Also worth note -- the root prim bumped itself to a 0.5m cube, even though the script is only capable of resizing it from 0.01 to whatever the user defined size was (in this case, 10x10x2).
Heeeeelp.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
03-21-2008 15:40
the set pos calls may be breaking the max link distance (which is related to size also) why it would work when you owned it, and not later I don't know, but if you used set Link calls to move the children that might explain how the root is moving (depending on the math used, total - number would cause this)
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
|
04-02-2008 16:03
I've had this happen to me. I had the root move as well, but now I don't remember what I'd figured out for that. Basically, according to the Wiki if a child-prim setPos call would result in breaking the linking rules, the call is supposed to fail silently and the prim isn't supposed to move (based on what I remember from the Wiki, been a while since I looked at this). But if you broadcast a message and a bunch of child prims move together, I guess the sim can't keep track of that or something. Anyway, it breaks, all the prims come unlinked. Sometimes it unlinks before all the child prims have had a chance to move to the new position. So now the same setPos call is being executed in global coordinates instead of local, and so what you see is some random subset of the prims move ~10m towards the sim origin.
I never really found a good solution for it. My workaround (which works for the specific case I was trying to address, but won't necessarily work always) was to have a really large transparent prim as the root, and that seemed to satisfy the link rules for what I was trying to do *shrug*
Didn't bother reporting it, since it was fairly random and not consistently reproducible.
|