Jump to content

Need help triggering multiple sounds each touch..


Karmaveat
 Share

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

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

Recommended Posts

Completely new to modifying anything. ATM my script is playing all 9 sounds in my object at once, I know theres a way to make each sound play each time its touched. I've looked all over, here I am.. 

default
{
    touch_start(integer total_num)
    {
        llTriggerSound("sound",1.0);
        llTriggerSound("sound",1.0);
        llTriggerSound("sound",1.0);
        llTriggerSound("sound",1.0);
        llTriggerSound("sound",1.0);
        llTriggerSound("sound",1.0);
        llTriggerSound("sound",1.0);
        llTriggerSound("sound",1.0);
        llTriggerSound("sound",1.0);
     }
 }

Link to comment
Share on other sites

integer i;
default
{   touch_start(integer n)
    {   llPlaySound(llGetInventoryName(INVENTORY_SOUND,i=((i+1)%llGetInventoryNumber(INVENTORY_SOUND))), 1.0);
    }
}

or perhaps the same but less obtuse :P

Edited by Quistess Alpha
  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 363 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...