Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Need To Have An Object Follow An Avatar

Gaynor Gritzi
Registered User
Join date: 16 Aug 2006
Posts: 48
04-16-2008 05:46
Been banging my head on the wiki all morning over this.

I've got an object that'll rez another object when an avatar approaches.

How do I get the x,y,z coords of the av so the rezzed object can follow them? I'm sure this must be easy, but I'll be damned if I can work it out.
Imnotgoing Sideways
Can't outlaw cute! =^-^=
Join date: 17 Nov 2007
Posts: 4,694
04-16-2008 06:57
RingRingRingRingRingRing... Banana Phone!

Ask around at NCI or anywhere else there are builders... There's a freebie script that does it... I just played with it yesterday. (^_^)y
_____________________
Somewhere in this world; there is someone having some good clean fun doing the one thing you hate the most. (^_^)y


http://slurl.com/secondlife/Ferguson/54/237/94
Gaynor Gritzi
Registered User
Join date: 16 Aug 2006
Posts: 48
04-16-2008 07:02
Ahhhhh........... I've got it......
llGetObjectDetails( key id, list params );

I was working from an older version of the wiki that doesn't seem to have this command in it. Doh!
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
04-16-2008 07:11
1) obtain the avatars UUID
2) rez object
3) pass that UUID to the rezzed object
4) rezzed object does llSensorRepeat() to obtain the avatars position
5) object moves towards avatar
6)repeat from step 4 on until avatar leaves sim.
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
04-16-2008 07:28
From: Gaynor Gritzi
Been banging my head on the wiki all morning over this.

I've got an object that'll rez another object when an avatar approaches.

How do I get the x,y,z coords of the av so the rezzed object can follow them? I'm sure this must be easy, but I'll be damned if I can work it out.

you tried vector pos = llDetectedPos(0); in your sensor or collision event?
_____________________
From Studio Dora
Gaynor Gritzi
Registered User
Join date: 16 Aug 2006
Posts: 48
04-16-2008 08:13
It was getting the vector from llSensorRepeat() that I couldn't get.

Got it now. Thanks everybody.