Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Move to owners position on rez?

Tan Tantalus
Flirtatious Fae
Join date: 17 Feb 2007
Posts: 17
07-07-2008 11:39
Greetings,

Forgive me for asking what may be a very simple thing but I would like to have a prim object I rez to move to the location of the owner - this is not a follow the owner need. It needs to move to the location the owner was at when they rez the object only.

Hopefully this is a simple thing but I admit my scripting skills are still a bit basic.

Thanks in advance.

Tan
_____________________

Tan Tantalus
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
07-07-2008 13:12
CODE
default
{
on_rez( integer parm )
{
llSetPos( llList2Vector(llGetObjectDetails( llGetOwner(), OBJECT_POS)));
}
}

If the rez position and the av are not more than 10m apart at the time of rezzing, this should do the trick
_____________________
From Studio Dora
Tan Tantalus
Flirtatious Fae
Join date: 17 Feb 2007
Posts: 17
07-07-2008 13:44
Many thanks Dora,

I got a couple of script errors with your code but after some work I tweaked it as follows and it works just great - thanks

default
{
on_rez( integer parm )
{
llSetPos( llList2Vector(llGetObjectDetails( llGetOwner(), [OBJECT_POS]),0));
}
}
_____________________

Tan Tantalus