OsCollisionSound
From OpenSimulator
(Difference between revisions)
(Add exemple) |
|||
Line 5: | Line 5: | ||
|function_syntax= osCollisionSound(string impact_sound, float impact_volume) | |function_syntax= osCollisionSound(string impact_sound, float impact_volume) | ||
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> | ||
+ | // | ||
+ | // osCollisionSound | ||
+ | // | ||
+ | |||
+ | // Can be sound's name in object's inventory or the sound uuid | ||
+ | string impact_sound = "ed124764-705d-d497-167a-182cd9fa2e6c"; | ||
+ | float impact_volume = 1.0; | ||
+ | |||
+ | default | ||
+ | { | ||
+ | state_entry() | ||
+ | { | ||
+ | llSay(PUBLIC_CHANNEL, "Collide this object to hear osCollisionSound running."); | ||
+ | osCollisionSound(impact_sound, impact_volume); | ||
+ | } | ||
+ | } | ||
</source> | </source> | ||
|description=Sets collision sound to impact_sound with specified volume. | |description=Sets collision sound to impact_sound with specified volume. | ||
|additional_info=This function was added in 0.9.0.1}} | |additional_info=This function was added in 0.9.0.1}} |
Revision as of 09:48, 27 November 2020
osCollisionSound(string impact_sound, float impact_volume)
| |
Sets collision sound to impact_sound with specified volume. | |
Threat Level | This function does not do a threat level check |
Permissions | Use of this function is always allowed by default |
Extra Delay | 0 seconds |
Example(s) | |
// // osCollisionSound // // Can be sound's name in object's inventory or the sound uuid string impact_sound = "ed124764-705d-d497-167a-182cd9fa2e6c"; float impact_volume = 1.0; default { state_entry() { llSay(PUBLIC_CHANNEL, "Collide this object to hear osCollisionSound running."); osCollisionSound(impact_sound, impact_volume); } } | |
Notes | |
This function was added in 0.9.0.1 |