|
FlipFlappy Gjellerup
Registered User
Join date: 4 Nov 2005
Posts: 11
|
10-01-2006 09:28
i have a very limited knowledge of scripting, and while reading the sls wiki trying to figure out how to play sounds from an object attached to the HUD, i read that the llplaysound function will play only for the avatar if it is played from an attachment from the HUD. is there any way to work around this at all, like possibly with a slave prim attached to the avatar or something like that??
|
|
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
|
10-01-2006 10:22
Got it in one =) Just have a sound emitter prim with a script something like: integer channel = -1321319; // Some number, large negative ones are best default { state_entry() { llListen(channel, "", NULL_KEY, ""); } listen(integer x, string name, key id, string msg) { if (llGetOwnerKey(id) == llGetOwner()) // Check the message isn't some interference if (llGetInventoryType(msg) == INVENTORY_SOUND) llPlaySound(msg, 1.0); // play the sound received in msg } } Then in your HUD attachment simply call the command: llWhisper(-1321319, "<sound_name>"); With the number swapped for your chosen channel, and <sound_name> replaced by the name of the sound you want the emitter to play in. Just place the sounds into the emitter and wear it somewhere and it should all work nicely.
_____________________
Computer (Mac Pro): 2 x Quad Core 3.2ghz Xeon 10gb DDR2 800mhz FB-DIMMS 4 x 750gb, 32mb cache hard-drives (RAID-0/striped) NVidia GeForce 8800GT (512mb)
|
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
10-01-2006 14:41
From: FlipFlappy Gjellerup i have a very limited knowledge of scripting, and while reading the sls wiki trying to figure out how to play sounds from an object attached to the HUD, i read that the llplaysound function will play only for the avatar if it is played from an attachment from the HUD. is there any way to work around this at all, like possibly with a slave prim attached to the avatar or something like that?? llTriggerSound() will play where everyone can hear it from a HUD prim. But, it's not "attached" to your avatar; it just plays where your av was when it was triggered.
|
|
FlipFlappy Gjellerup
Registered User
Join date: 4 Nov 2005
Posts: 11
|
10-02-2006 16:21
oooo ok.... i will look into the triggersound function and decipher the first response so i can work this out - i would like to see all options. Thanks for the help!
|