Skip to content
lsl.devlsl.devLSL Dev

llCollisionSound

function
Function syntax
llCollisionSound(
  1. string impact_sound,// UUID of a sound, the name of a sound in the prim's inventory, or an empty string to suppress sounds.
  2. float impact_volume// Volume level to set, between 0.0 (silent) and 1.0 (loud).
);
Energy
10

Suppress default collision sounds, replace default impact sounds with impact_sound at the volume impact_volume

If impact_sound is an empty string then the collision sound is suppressed.

If impact_volume is set to zero the collision particles are suppressed.

How to use
llCollisionSound("", 0.0);
  • If this function is used to suppress collision sounds, NO sound will be generated even if the suppressed object collides with an unsuppressed object (there will be no sound from the unsuppressed object either).
Example 1
//Play Sound When Collision Occurs With Other Object Or An AGENT
//Creator: TonyH Wrangler
string sound = "ed124764-705d-d497-167a-182cd9fa2e6c"; //uuid or name of item in inventory
default
{
state_entry()
{
llCollisionSound(sound, 1.0);
}
}

Added in SL 0.2.0

Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.