Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Boat with pose balls, driver

2fast4u Nabob
SL-ice.net
Join date: 28 Dec 2005
Posts: 542
01-24-2010 15:20
Hi,

I am working on a boat that has 4 pose balls...one for the driver and three passengers.

The boat script is in the object's root prim and the root prim is not a pose ball.

The problem is that whenever someone sits on one of the pose balls, when that person is the first person sitting, the boat script attempts to get permission to take controls from that person. The problem is that the sit location is not the same as the prim that contains the boat script, so I get an error.

How can I know which prim a user sits on?

To clarify...here is the setup..

* root prim - just a prim..no scripts
* pose ball 1 - contains the boat script that includes a sit target
* pose ball 2 - just a pose ball .. has an animation and a sit target
* pose ball 3...n - - just a pose ball .. has an animation and a sit target

The scenario:

There is nobody on the boat, someone sits on pose ball 2. The boat script in pose ball 1 gets the changed event and tries go get permission to take controls but fails since the user is not sitting on pose ball 1.

If the user gets up and sits on pose ball 1, the script gets permission to take controls and the boat operates correctly.

How can I figure out where the user is sitting so that the boat script does not request permissions?

Thanks -(a very frustrated) 2fast
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-24-2010 15:28
simple, make sure that only the changed event from the poseball one triggers a request for permissions....

instead of detecting just CHANGED_LINK, also test llAvatarOnSitTarget
https://wiki.secondlife.com/wiki/LlAvatarOnSitTarget
_____________________
|
| . "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...
| -
2fast4u Nabob
SL-ice.net
Join date: 28 Dec 2005
Posts: 542
01-24-2010 19:26
From: Void Singer
instead of detecting just CHANGED_LINK, also test llAvatarOnSitTarget



Of course! Wow...was looking at that way too long!

Thanks Void!

-2fast