Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Child prim move from RootPosition

JeffCoyote Bates
Registered User
Join date: 21 Mar 2007
Posts: 8
12-06-2008 19:37
hi ,

( 1st : sorry for my bad english , i m french , and not currently speaking )
( so please answer me in " simple language " to let me understand and translate , thanks )


i want to do a script that allow owner to change sculpt shape of a child prim , so i have created a script with blue pop up simple menu , with functions [ " shape 1 , "shape 2"] but sculpties have not always the same center position , so i have to move the child prim from his parent ,

who can help me with llGetRootPosition , i just want the child sculpt prim move with x, y, z parameters , but just keep a certain distance from the root ( to have the good position with each sculpt shape ) ??

( i hope i am enough clear to be understood )

here is my script : ( with problem that the child prim move each time i select "shape 1" or "shape 2";)

can you indicate me the lines i have to add or modify ??
( thanks for all who can and want to help me )

------------
CODE

llSetPos(llGetPos() + <0,-0.5,0>);



-----------
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
12-07-2008 03:56
Your script looks fine to me, but I will suggest you write this:
llSetPos(llGetLocalPos() + <0,-0.5,0>;);
and this
llSetPos(llGetLocalPos() + <0,0.5,0>;);
In other words; use llGetLocalPos() instead of llGetPos()
Happy scripting:)
_____________________
From Studio Dora
JeffCoyote Bates
Registered User
Join date: 21 Mar 2007
Posts: 8
12-07-2008 06:59
maybe my explains are not good or enough clear , ( sorry i m french )


Thanks to Dora Gustafson
but That does not work as I would want

I would want that the shape 1 of the sculpt is placed at a certain distance of the root prim , and keep this position, and that the shape 2 of the sculpt is placed at another certain distance of the root prim so that my 2 differentes forms will have the good position and keep it
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
12-07-2008 07:26
It is ok being French, I am Danish so my English is no better than yours:)
Otherwise, llSetPos() will set position relative to the root prim when called in a child prim.
See: http://www.lslwiki.net/lslwiki/wakka.php?wakka=llSetPos
so what you need is: llSetPos( <0.0, -0.5, 0.0 > );?
and llSetPos( <0.0, 0.5, 0.0 > );?
_____________________
From Studio Dora
JeffCoyote Bates
Registered User
Join date: 21 Mar 2007
Posts: 8
12-07-2008 08:26
Just "llSetPos" ! and nothing more !
Thanks a lot ! ;)


Why i was searching RootPos or vector root ....
Life is so simple when you don t search for complications !