You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.
This shows you the differences between two versions of the page.
functions:llpreloadsound [2015-06-27 18:45 SLT] sei created |
functions:llpreloadsound [2015-06-28 11:12 SLT] (current) sei remove plural |
||
---|---|---|---|
Line 6: | Line 6: | ||
</code> | </code> | ||
- | Preloads a $lart[sound]. The idea of preloading a sound is to transmit the sound in advance, so that when the time to play it comes, it is already cached by the surrounding avatars' viewers, and plays without delay. | + | Preload a $lart[sound]. The idea of preloading a sound is to transmit the sound in advance, so that when the time to play it comes, it is already cached by the surrounding avatars' viewers, and plays without delay. |
$delay[1.0] | $delay[1.0] | ||
Line 13: | Line 13: | ||
=== sound === | === sound === | ||
- | Name or UUID of the sound clip to preload. | + | Sound name or $lart[UUID] of the sound clip to preload. |
===== Notes ===== | ===== Notes ===== | ||
- | * If used in a HUD, the preload is only effective for the owner. | + | * If used in a $lart[HUD], the preload is only effective for the owner. |
* Sounds are usually deleted from the cache when relogging. | * Sounds are usually deleted from the cache when relogging. | ||
- | * If $prm[sound] is a UUID, and an item with that name does not exist in the prim's inventory, the sound with that UUID will be preloaded. | + | * If the sound is a $lart[UUID], it doesn't need to be present in the prim. |
- | * If $prm[sound] is a UUID and it matches a sound item that exists in the prim's inventory, the sound item takes precedence. | + | * If the name of a sound present in the prim's inventory matches the $art[UUID] of a different sound, the sound that will be preloaded is the one in the item, not the $art[UUID]. |
- | * If $prm[sound] is a UUID and it matches an item other than a sound in the prim's inventory, an error will be privately said (20m range) to the owner in $lct[DEBUG_CHANNEL]. | + | * If the name is not a $art[UUID], and it is not present in the prim's inventory, or if an item with that name which is not a sound exists in the prim's inventory, an error will be privately said (20m range) to the owner in $lct[DEBUG_CHANNEL]. |
- | * If $prm[sound] is not a UUID, and an item with that name does not exist, or is not a sound, an error will be privately said (20m range) to the owner in $ct[DEBUG_CHANNEL]. | + | |
===== Short examples ===== | ===== Short examples ===== |