• Announcements

    • Xiola Linden

      The New Community Platform   03/21/2017

      We are still working on making adjustments and changes to the new platform. Thanks  to everyone who has been sending in feedback and filing any bugs you've encountered! 
Sign in to follow this  
Followers 0
Kangen

Stop a sound looping script

4 posts in this topic

HI everyone I have a script that starts looping a sound using "touch_start(integer num)" but what do I use to stop the sound from looping on the second touch?

Share this post


Link to post
Share on other sites

Try something like

integer toggle;default{	state_entry()	{		//llSay(0, "Hello, Avatar!");	}	touch_start(integer total_number)	{		toggle=!toggle;		if(toggle){			llLoopSound("my sound", 1.0);		}		else {			llStopSound();		}	}}

 

1 person likes this

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0