Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Passenger sitting?

Nyx Alsop
Registered User
Join date: 14 Dec 2008
Posts: 252
01-01-2010 03:37
Hi.

I'm making a bus and need to know if someone is sitting on an ind seat, but change keeps returning regardless of if their sat on that seat, or another one on the bus,

Whats the easiest way to find out if someones sat on the seat?
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
01-01-2010 03:55
Works by link order. There's a helpful explanation of how seating works in vehicles with multiple passengers at http://lslwiki.net/lslwiki/wakka.php?wakka=llSitTarget at the end of the article.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-01-2010 10:07
while it's true that link order will determine a sit command if the spot clicked is not a prim with a sit target, you can choose a prim that has one (if there are multiples) that would be out of prim order, leading to possibly guessing the wrong seat.

the only two methods that are certain to get the exact seat someone sat in (when there are multiple targets available) that I'm aware of are to use llAvatarOnSitTarget in each prim that contains a sit target, or to compare Av's to a list of relative positions of each sit target.

the first method will ignore av's (or possibly misidentify in the case of root sit targets) that are over the amount of available sit targets. the second method will fail to find said av's in the list of relative positions (which can be handled) if they are past the available limits)

ETA:
in the case of three AVs [A, B, C], that each target the seat of their choice [a, b, c] (assuming 3 prim object with 1 sit target each), if A sits in a, and then C sits in c, when B sits in b; the link order will be [a,b,c,A,C,B] IIRC... avs are added in the order sat, not in the prim order IIRC
ref http://wiki.secondlife.com/wiki/LlSitTarget
(couldn't find the page for link rules... there may be one, if not one really needs created including known avatar rules)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -