Sign in to follow this  
Kangen

Stop a sound looping script

Recommended Posts

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();		}	}}

 

  • Like 1

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