llCollisionSound
function
Function syntax
llCollisionSound(string impact_sound,// UUID of a sound, the name of a sound in the prim's inventory, or an empty string to suppress sounds.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.
llCollisionSound("", 0.0);Caveats
Section titled “Caveats”- 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).
Examples
Section titled “Examples”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); }}History
Section titled “History”Added in SL 0.2.0
See also
Section titled “See also”Functions
Section titled “Functions”Events
Section titled “Events”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.