Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSit Positions and when they set

Dz Questi
Registered User
Join date: 15 Jul 2008
Posts: 13
03-05-2009 14:23
I am scripting an object (dance pole) which needs to identify when users with certain items attached sit and stand up from using them. I would like them auto-log into a tip jar when they are on the pole, and log out when they stand up and stop dancing.

I thought it would be easiest to use a phantom prim with volume detect to identify who and when people started and stopped dancing, and some initial tests worked fine. However..

When a dancer "sat" on the pole from some distance (outside the volume detect space), the volume detect refuses to trigger until after the dancer stands... It seems the dancer only appears to move into the volume detect space while the animations are running. When they stand the volume detect triggers and they are logged into the tip jar just like I thought they would be when they "sat" on the pole to start the dance animations...

I added a bit of code to use llGetObjectDetails in the "changed" event (which is where I trigger the dance animations) to return the dancer position...and it always returns a position local to the pole and well inside the volume detect area of the prim...

Where's the dancer????? if the avatar position is where GetObjectDetails says it is, then why isn't Volume detect triggered until after the animation sequences are ended?
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
03-05-2009 14:32
Put the detection in the dance pole, using the changed() event and the llAvatarOnSitTarget() call. When you sit on a prim you're not a separate object any more, you're part of the object you're sitting on.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
03-05-2009 15:32
I am working on a product that could easily be taylerd to do that, but as it is a product I intend to sell, I can't really post the code. I may be interested in a collaboration though, you get to use it for free, I get to sell it, and we develop that sub function to your spec. IM in world or PM me if you are interested.
edit: We could call it DanceMaster Polo :)