HOME PRODUCTS HELP FREEBIES SCRIPTS TUTORIALS NEWS CONTACT
  Teleport to Store in-world!    |     Links  
Main Menu
Alicia's Raffle
Who's Online
6 user(s) are online (2 user(s) are browsing Free Scripts)

Members: 0
Guests: 6

more...
Admin Login
Username:

Password:


Lost Password?

Register now!
SL Books


Sites of Interest
Published Date: 2010/5/12 0:12:24
Views : 128
Sound

Will play a sound that is inside prim with script when avatar walks onto object.


// Sound must be in the object's inventory or it will not work. 
// First sound in inventory will be used if more than 1

integer delay = 5; //how many seconds to wait after playing sound before it can be triggered again


default
{
    on_rez( integer sparam )
    {
        llResetScript();
    }
    
    state_entry()
    {
        llOwnerSay("This object must not be set to phantom or it will not work.");
    }

    collision_start(integer total_number)
    {
        llPlaySound(llGetInventoryName(INVENTORY_SOUND,0), 1);
        llSleep(delay); //keeps it from playing sound over and over
    }
}

0
|  Links 
Printer Friendly Page Send this Script to a Friend
Visit ASD Studios Hollywood
Product Spotlight
Alicia's Universe
Recent Scripts
Suggested Reading
Top Free Scripts

© 2006-2010 Alicia Stella | ASD Affiliate Programs | Policies | News | Help
Second Life®, Xstreet & the inSL logo are registered trademarks of Linden Research, Inc.
Alicia Stella Design is not affiliated with Second Life. No infringement is intended.