Thursday, March 7, 2013

That Horrible Stumping Sound

That Horrible Stumping Sound

Written 7 March, 2013

I just hate that stumping sound avatars make when they cross obstacles higher than about .5 meters. Don't you?

Here's a short little script that will squelch that collision sound. Just put it in a script and drop it in the root prim of any linked set-- and no more sounds.


// Simple Stop Collision Sound by Cheyenne Palisades

default
{
    state_entry()
    {
        llCollisionSound("", 0.1);
    }
}

In a comment, Handy Low suggested limiting the script so collision will be re-enabled. I suppose there would be instances when one would want the lack of sound to be temporary, but I don't ever want to hear STUMP STUMP STUMP when walking up steps. Here's a slightly revised version.



// Simple Stop and Start Collision Sound by Cheyenne Palisades

default
{
    state_entry()
    {
        llCollisionSound("be582e5d-b123-41a2-a150-454c39e961c8", 0.0);
    }
}


Interestingly, setting the sound level to 0.0 (as opposed to 0.1 in the first example) suppresses collision particles as well as sound. So yay!

If you ever want to turn collisions back on, set 0.0 in the above script to 1.0. If you don't want to turn collsions off later, you can safely delete the script.


3 comments:

Handy Low said...

Unfortunately, you can't delete the script when it's done, otherwise the collision sounds return.

So it might be a good idea to limit the memory on the script, especially if you have a lot of them. Something like this:

default {
state_entry() {
llSetMemoryLimit(2000);
llCollisionSound("", 0.1);
}
}

Cheyenne Palisades said...

Thanks for the notice.

Usually when I stop a collision sound I don't ever want it to come back.

I played around with turning collision back on. The number 0.1 should be changed to 1.0 and the uuid of a collision sound has to go between the quotation marks. Interestingly, changing the volume to 0.0 also suppresses collision particles.

Handy Low said...

A bit of a misunderstanding, I think - sorry, I didn't explain it very well.

The llSetMemoryLimit(2000) call is simply to reduce the amount of memory the script uses, and hence its impact on sim performance. That might be a consideration if there are lot of objects with the script in.