Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Script wanted - Loop sound on sit?

Loftvoker Vella
Registered User
Join date: 12 Feb 2007
Posts: 2
07-18-2008 05:59
Hi all,

I'm looking for a piece of code i can crowbar into an existing pose ball script, so that when an avatar sits it loops a sound, and when they unsit it stops. If a seperate script is needed then that would be ok too..

Anyone know where i can find something like this?

Thanks
Cheree Bury
ChereeMotion Owner
Join date: 6 Jun 2007
Posts: 666
07-18-2008 07:02
I'm at work right now so I can't get on SL to do this, but you only need two function calls:

llLoopSound

and

llStopSound

Look in the poseball script and find where the pose balls are being hidden and shown upon sit and stand and put the calls there. It should be easy.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
07-18-2008 10:11
You CAN use a separate script for this though. Simply use the 'changed' event and llAvatarOnSitTarget() to decide when to start and stop the sound.
Cheree Bury
ChereeMotion Owner
Join date: 6 Jun 2007
Posts: 666
07-18-2008 22:39
From: Hewee Zetkin
You CAN use a separate script for this though. Simply use the 'changed' event and llAvatarOnSitTarget() to decide when to start and stop the sound.


Good point, Hewee. It did not even occur to me to do it that way.

He came to me in world and I fixed his pose ball script for him. 4 lines of code and I was done. It will now play whatever sound he drops in that ball.

He just had no experience with scripting.
Loftvoker Vella
Registered User
Join date: 12 Feb 2007
Posts: 2
07-20-2008 00:08
Yeah i've got it now. Thanks guys =)