Jump to content

have an attachment receive a message when I sit on an object.


Nikkesa
 Share

You are about to reply to a thread that has been inactive for 4275 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Greetings! I was wondering if there is a way to know, from a script in an attachment, whether or not my avatar is sitting down, and possibly the key or name of the object that I am sitting on.

I need this because I am making a vehicle that has an attachment for looks, and a base for movement...

 

Thanks ^_^

Link to comment
Share on other sites

The easy way in this case is to take advantage of the fact that the thing you're sitting on is scripted by you, so you can have that script tell the script in the attachment when somebody sits and stands.  What makes this especially easy is that the vehicle-sitting script can llRegionSayTo() to the key of the avatar who is sitting, and all that avatar's attachments will get the message.

One complexity is that the avatar might sit first, then put on the attachment, so the attachment won't hear the message from the vehicle.  What I think I'd do to remedy that is for the attachment to send back an acknowledgement message (it will have the vehicle's UUID in the listen() event, so the vehicle can just keep sending messages to the avatar's key until it hears back that acknowledgement.

Make sense?

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4275 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...