Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetLinkPrimitiveParams question(s)

Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
04-16-2007 07:03
I am thinking that the new llSetLinkPrimitiveParams function can fill a need that I have. But, is there a way to *read* those same parameters from a linked prim without first having a script in it? That is, say I want to reset the position of a linked prim based on its current position. Is there an easy way to detect its position from the root prim?

Thanks,
Baron H.
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
04-16-2007 07:32
If you want to use LinkPrimitiveParams, then the easiest way would be to put the following script in your child prim:

CODE
default
{
touch_start(integer tot)
{
llOwnerSay((string)llGetLocalPos());
}
}


And move it to the possible positions you want it to occupy, touching it to get those local coords, and you can then use the #'s it gives you from the local pos to set the position in a call from LinkPrimitiveParams from the parent.

Obviously you can remove this script once you have all of the positions.

Child prim positioning is usually worked off the local position compared to the root.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
04-16-2007 08:35
Basically No There is no llGetLinkPrimitiveparams so you cant get the linked prim parameters without a script in the prim.

Just keep track of where the prim will be in the main script.
Unless its being updated from more than one script you should always know where it should be because your script put it there.
Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
04-16-2007 20:41
Well, that's what I figured, but it rarely hurts to ask. I'm trying to decide whether I want to llRemoteLoadScriptPin on 20-some prims and then kill them when done or simply fudge a little with llSetLinkPrimitiveParams without being able to actually *detect* the current parameters.

Baron