Banner by Troy Vogel

Go Back   Second Citizen MK II > The Mainland: Second Life® > Second Life® Depot

Reply
 
Thread Tools Display Modes

Script: Loop Sound
Old 08-08-2009, 12:53 AM   #1
rykerbeck
Nommable. Nom nom. Hee!

rykerbeck's Avatar
 
Join Date: Aug 2009
Location: Zion
Posts: 42
Send a message via Skype™ to rykerbeck
Default Script: Loop Sound

Code:
//drop this script and your sound file into the object you wish to script. touch the object to start the sound. touch it again to stop it.

integer on = FALSE;
string soundname = "soundfilename"; //put sound file name here

default
{
state_entry()
{
on = FALSE;
soundname = llGetInventoryName(INVENTORY_SOUND, 0);
}

touch_start(integer total_number)
{
if(llDetectedKey(0) != llGetOwner())
return;
if(soundname != "")
{
if(on)
llStopSound();
else
llLoopSound(soundname, 1);
on = !on;
}
}
}
rykerbeck is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -4. The time now is 01:48 PM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Second Life® and Linden Lab® are trademarks of Linden Research, Inc.
Second Citizen MK II Forums are not affiliated with or sponsored by Linden Research.
© 2009 - 2011 Second Citizen MKII [SC MKII]
| Home | Register | FAQ | Members List | Calendar | Today's Posts | Search | New Posts |