Jump to content

noob needs help with sounds script


walterwhiteSr
 Share

You are about to reply to a thread that has been inactive for 3466 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi, before I ask question, I just really appreciate the help offered by this forum.  

I'm putting together a halloween house for halloween party that is a few days from now, not a lot of time to search.

Sounds add so much atmospher, and can't imagine doing a fun project without them.  Opening creaky doors, screams, howling, wind, thunder, etc.

The problem is I don't know how to limit the range of sound , the house takes up half the property with multiple rooms each with a little different scary theme,  I would like 1 to 2 specific sounds for individual room themes, but DO not want them heard in the adjacent room or all over the property.  The last party we had a month ago, had over 30 people so 30 people going through doors that trigger sound or as one goest past an object that trigger sounds..   it can be so overwhelming and ruin the experinece

1.Is there a way to limit the sound to a specific space

2. Is there a way to have the sound only play to the person triggering it

OH also is there such a thing as a pre-cache so that when guests land at Landing point it loads their cache with the sounds and a large portion of the textures so they have sounds and textures already in  their cache before going through the spaces?

Link to comment
Share on other sites

One easy way to pre-cache sounds can be to load them into objects near your landing point and then play them in a continuous loop at zero volume, or at last in a loop that is triggered when someone lands.

EDIT: And to preload textures, all you need to do is have them on a face of some object within the person's draw distance.  That face can be any size, and it doesn't have to be in line of sight.  It can even be 100% alpha or on a face that's tinted black.  The downside to preloading a lot of textures, of course, is that you trade later rendering lag for increased rendering lag while the pre-caching is going on. You can make your landing area pretty laggy if you aren't careful.

If it's practical for your environment, one really good way to assure that sounds are played exactly where you want people to hear them but are only heard by one person is to use a HUD.  Sounds played by a script in a HUD are only heard by the person wearing it.  Put all the sounds in the HUD, and then preload each one before you need it.  Then trigger the sounds by placing collision prims around your exhibit that whisper to the HUD when you are standing in the right place.

You can build a HUD rezzer  into the script that's in the collision pad at your landing site.  Then tell the HUD on rez to ask PERMISSION_ATTACH and then llAttachToAvatarTemp to the new arrival. See the LSL wiki for an example.

  • Like 2
Link to comment
Share on other sites

There is also an LSL command that does limit the sound to a certaion range,: llTriggerSoundLimited

http://wiki.secondlife.com/wiki/LlTriggerSoundLimited

With the following code snippet you can limit the sound to a range of +/- 10 meters (credit to LSL wiki):

 

llTriggerSoundLimited("soundname", 1.0, llGetPos() + <10,10,10>, llGetPos() - <10,10,10>);

 However this is still problematic in houses with several floors, as is the method to create several parcels and ristrict the sound to each parcel: The sound is limited towards the sides, but not upwards and downwards. You will hear on all floors what happens at another floor.  That's also why I think that a HUD is the best way to limit sounds. But if a HUD is too complicated to script, then the code snippet above might still be better than playing all the sounds without any boundaries...

Link to comment
Share on other sites

Thank you for the suggestions..

Both the hud and the box scripting is too complicated for me, I have so much to do with so little time left.  I would be happy to contract a proficient scripter that can do BOTH the box limiter and the HUD, as I think both are necessary.   I have looked on MP for something ready made and doing a general Sl search for any environment huds that are modifiable with the necessary components.  Only one in MP that only plays random sounds though.    I know is short notice  party is Sunday.

Regarding any payment, I know I can't pay the real value, I am paying DJ, Hostess, Photographer, and the pay would be scaled to relative terms, but all is negotiable.   Will also post a add in the help wanted.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3466 days.

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
 Share

×
×
  • Create New...