Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Triggering a sound entering water..

Blaccard Burks
Registered User
Join date: 6 Apr 2007
Posts: 157
05-21-2007 08:34
Hello,

Lets say you want to trigger or play a sound when someone enters prim water. This seems opretty simple. The problem i'm having is that because the water is a phantom object, I cannot use a collision event.

Any ideas?

Thanks,

Paul
Milambus Oh
Registered User
Join date: 6 Apr 2007
Posts: 224
05-21-2007 08:38
If you don't get any other responses I think I have an object that can do this, and I can send it to you tonight. I'm not sure if the scripts in it are modifiable however.
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
05-21-2007 08:45
How about using llVolumeDetect?
Anti Antonelli
Deranged Toymaker
Join date: 25 Apr 2006
Posts: 1,091
05-21-2007 17:19
Yep, RJ has it right. Be careful though, as I understand it llVolumeDetect does *not* work on prims which have been made phantom in the usual way through the edit widget - so make it un-phantom, then drop in a sound and a script like this:
CODE
default
{
state_entry()
{
llVolumeDetect(TRUE);
}

collision_start(integer num_detected)
{
llPlaySound("splashsound", 1.0);
}
}
Blaccard Burks
Registered User
Join date: 6 Apr 2007
Posts: 157
05-21-2007 21:18
Thanks a bunch. I never really understood what that function did, but it works fine. Just add the collision_end event to that and you have sounds now coming in and out of the swimming pool. I recorded some cool sounds for pools, so if anyone wants any copies of the sounds, look me up and give me an IM.

Thanks again,

Blaccard Burks