Restless Swords Posted March 21, 2017 Share Posted March 21, 2017 Say I want to ring a bell, or whatever sound, in the viewer of the owner of the object -- but NOT annoy everyone around me - llPlaySound etc is heard by everyone. - best I can tell, there is no way to play a sound only to myself ?? Link to comment Share on other sites More sharing options...
AlduousMcBurlington Posted March 21, 2017 Share Posted March 21, 2017 (edited) If it's in a HUD, only the wearer can hear it. EDIT: Another hack / workaround would be to play the sound at a very low volume and position the sounding object as close to the agent's camera as possible, although that requires you know where their camera is, which you'll need permissions for. Edited March 21, 2017 by AlduousMcBurlington Link to comment Share on other sites More sharing options...
Rolig Loon Posted March 21, 2017 Share Posted March 21, 2017 Certainly, play it in a HUD. llPlaySound will only be heard by the person wearing the HUD. llTriggerSound in a HUD will be heard by everyone. Your HUD script doesn't need anything more complicated than a listen event that responds to a trigger from whatever is managing your system. So, you have a script in some object on the ground that says: default { collision_start(integer num) { llRegionSayTo(llDetectedKey(0),-12345,"DING"); } } And you have a HUD that listens: default { state_entry() { llListen(-12345,"","",""); } listen (integer channel, string name, key id, string message) { if (message == "DING") { llPlaySound("Ding",0.5); //"Ding" is a sound in the HUD's inventory } } } You bump into the object and you hear the sound. Anyone not wearing the HUD hears nothing. 1 1 Link to comment Share on other sites More sharing options...
Restless Swords Posted March 21, 2017 Author Share Posted March 21, 2017 Ah yes! I had not planned on requiring a HUD but this would provide the owner-only sounds. THANKS for this suggestion. Link to comment Share on other sites More sharing options...
Ruthven Ravenhurst Posted March 23, 2017 Share Posted March 23, 2017 (edited) and as a side note. if you don't want to give the sound to the user. you can use UUIDs. You can hard code them into the hud script, or as in rolig's example, pass the uuid via chat instead of the sound name (that's assuming you have full perms of the sound. I get annoyed with creators that sell things "full perm" but then actually make them no mod so you can't change the name, like an animation or sound) Edited March 23, 2017 by Ruthven Willenov Link to comment Share on other sites More sharing options...
Tristann Firehawk Posted June 18, 2018 Share Posted June 18, 2018 I tried to do as the example script above for a ranged weapon, so.....the arrow sends the llRegionSayTo to the weapon and then the weapon plays the sound. Problem is....the weapon is not a HUD so the sound goes to everyone not only the OWNER. My question is if there's another way in order to work without a HUD. I ask because there are weapons that have this feature and also don't have a HUD. Thank you for your attention....i am anxiously waiting for yout answer...... Link to comment Share on other sites More sharing options...
Rolig Loon Posted June 18, 2018 Share Posted June 18, 2018 No, although you can always restrict the range of a sound by setting it to lower volume. Intensity drops off as the square root of distance, so a soft sound will only be heard if you are very close to the emitter. Link to comment Share on other sites More sharing options...
Tristann Firehawk Posted June 18, 2018 Share Posted June 18, 2018 (edited) thank you Rolig. I see yur post everywhere....you help a LOT!!! I guess i'llhave to put it on a HUD then..... = ). Edited June 18, 2018 by Nimus Firehawk Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted June 19, 2018 Share Posted June 19, 2018 1. http://wiki.secondlife.com/wiki/LlSetSoundRadius 2. If the weapon is rigged, you can wear it as a HUD and it will still be visible on the avatar while keeping sounds local. Link to comment Share on other sites More sharing options...
Tristann Firehawk Posted June 19, 2018 Share Posted June 19, 2018 (edited) i'll check that...i assume you mean using the llPlaySound......and weapon as a HUD but rigged to your hand for example, right? Respect to llSetSoundRadius there¡s a bug reported many times in SL it doesn't work at all...... Edited June 19, 2018 by Nimus Firehawk Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted June 19, 2018 Share Posted June 19, 2018 28 minutes ago, Nimus Firehawk said: i'll check that...i assume you mean using the llPlaySound......and weapon as a HUD but rigged to your hand for example, right? Respect to llSetSoundRadius there¡s a bug reported many times in SL it doesn't work at all...... Sorry, I linked the wrong one. http://wiki.secondlife.com/wiki/LlTriggerSoundLimited And yes, sounds played by a HUD attachment via Play/TriggerSound are only heard by the wearer. The fact that some links are rigged to other bones does not change that behavior as far as I know. Link to comment Share on other sites More sharing options...
Tristann Firehawk Posted June 19, 2018 Share Posted June 19, 2018 how can I set llTriggerSoundLimited to the owner only? the coordinates i never really understood....could you help me on that? I'm affraid doing a rig for the weapon will not result in the sthetics i look for...the weapon will always be in an unmobile position an woun't accept user adjustmens...and so would behave with different animations (it would result strange positions).... Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted June 19, 2018 Share Posted June 19, 2018 (edited) 4 hours ago, Nimus Firehawk said: how can I set llTriggerSoundLimited to the owner only? the coordinates i never really understood....could you help me on that? I'm affraid doing a rig for the weapon will not result in the sthetics i look for...the weapon will always be in an unmobile position an woun't accept user adjustmens...and so would behave with different animations (it would result strange positions).... The sound created by that function is only heard by avatars that are inside of the box defined by the two positions at the time the sound starts. If you use "llTriggerSoundLimited(sound, volume, llGetPos(), llGetPos());" only the wearer can possibly be within that area. Anyone else -- even if they're bumping right against the wearer -- can't get close enough to be inside of the same position aside from a few very specific cases (like if both avatars are sitting on objects and are placed in the exact same position that way). The only downside there is that it's TriggerSound, not PlaySound, so the sound will "fall behind" a moving avatar instead of staying attached to them no matter where they go. Edited June 19, 2018 by Wulfie Reanimator Link to comment Share on other sites More sharing options...
Tristann Firehawk Posted June 20, 2018 Share Posted June 20, 2018 Yes, already discovered this right before this reply of yours.... amazing help from you.Thank you veru much, really. ?? 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now