Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llAvatarOnSitTarget() question

Canen Madsen
Registered User
Join date: 2 Oct 2006
Posts: 6
11-06-2006 09:40
if 2 people are sitting on the same prim what persons key does this return? Only the first one that sat down??
Thanto Usitnov
Lord Byron wannabe
Join date: 4 Aug 2006
Posts: 68
11-06-2006 10:25
according to:
http://lslwiki.com/lslwiki/wakka.php?wakka=sit
llAvatarOnSitTarget ... Returns the key of the avatar sitting at the current sit target.

I think that's it. I don't have any way to test this, though, so I don't know what it would return if an avatar sat on the object, after which the sit target was changed without a new avatar sitting on it (according to the above, it sounds like it would return NULL_KEY). This also leads me to wonder what would happen if the sit target were changed at one point back to where one of the avatars sitting on it is--would it return that avatar's key (sounds like it would, but I wonder how it would get that)?
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
11-06-2006 12:34
My best guess would be the last avitar to sit on it.

...but what does it return after the designated avitar unsits, and there are still avitars sitting on the prim?
_____________________
  1. ninjafoo Ng Says:
    November 4th, 2006 at 7:27 am
    We all love secondlife so much and were afraid that the magic will end, nothing this good can ever last…. can it?

Thanto Usitnov
Lord Byron wannabe
Join date: 4 Aug 2006
Posts: 68
11-06-2006 19:17
Yeah, that's exactly what I was wondering. According to the Wiki, it seems that it should return NULL_KEY, because there's no avatar at the current sit target. But again, I don't have any way to test this. Perhaps whoever has created the multiple sit target script could shed some light on this.
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
11-07-2006 09:17
Perhaps whoever has created the multiple sit target script could shed some light on this.Do you mean cua Curie, the author of the Multi-location sit script in post #6?
_____________________
  1. ninjafoo Ng Says:
    November 4th, 2006 at 7:27 am
    We all love secondlife so much and were afraid that the magic will end, nothing this good can ever last…. can it?

Zi Ree
Mrrrew!
Join date: 25 Feb 2006
Posts: 723
11-07-2006 09:27
I have createrd an object with 5 sit targets (child prims) myself. Every child prim with a sit target gets their own avatar as a result of llAvatarOnSitTarget(). If there's only one sit target, the first avatar to sit on will be returned. If two people sit on an object with only one sit target, the second avatar sits on an arbitrary spot and will not be accounted for.
_____________________
Zi!

(SuSE Linux 10.2, Kernel 2.6.13-15, AMD64 3200+, 2GB RAM, NVidia GeForce 7800GS 512MB (AGP), KDE 3.5.5, Second Life 1.13.1 (6) alpha soon beta thingie)

Blog: http://ziree.wordpress.com/ - QAvimator: http://qavimator.org

Second Life Linux Users Group IRC Channel: irc.freenode.org #secondlifelug
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
11-07-2006 09:58
Zi, what about the case with the script I linked to in my previous post?
_____________________
  1. ninjafoo Ng Says:
    November 4th, 2006 at 7:27 am
    We all love secondlife so much and were afraid that the magic will end, nothing this good can ever last…. can it?

Zi Ree
Mrrrew!
Join date: 25 Feb 2006
Posts: 723
11-07-2006 13:12
I guess the last person who sat on the prim will be returned in llAvatarOnSitTarget(), since the new sit target deletes the old one. When they unsit, the sit target is unoccupied.
_____________________
Zi!

(SuSE Linux 10.2, Kernel 2.6.13-15, AMD64 3200+, 2GB RAM, NVidia GeForce 7800GS 512MB (AGP), KDE 3.5.5, Second Life 1.13.1 (6) alpha soon beta thingie)

Blog: http://ziree.wordpress.com/ - QAvimator: http://qavimator.org

Second Life Linux Users Group IRC Channel: irc.freenode.org #secondlifelug
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
11-07-2006 13:35
Ok, thanks!
_____________________
  1. ninjafoo Ng Says:
    November 4th, 2006 at 7:27 am
    We all love secondlife so much and were afraid that the magic will end, nothing this good can ever last…. can it?

BamBam Sachertorte
floral engineer
Join date: 12 Jul 2005
Posts: 228
11-07-2006 19:26
From: Canen Madsen
if 2 people are sitting on the same prim what persons key does this return? Only the first one that sat down??
Why not just try it and find out for certain?