Jump to content

About music I think basicly easy but its late for me and my mind wont do it right now


xXCorellXx
 Share

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

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

Recommended Posts

ok i like to make a item that amplifys for me a sound that turns out to be rather low so i think ok lets take a few prims distribute them in a circle and a second circle around myself with five meters between each so the sound is distributed the same all over  in the area  the script i would work with is the basic soundscript with 9,5 seconds delay between sounds

 

looks like this

 

 

list invlist;
integer tottrack;
integer i;

integer play = FALSE;

sound()
{
        llSetTimerEvent(9.5);
        tottrack = llGetInventoryNumber(INVENTORY_SOUND);
        float length = tottrack*9.5;
        llSay(0, (string)length);
        llPreloadSound(llGetInventoryName(INVENTORY_SOUND, 0));
        i=0;
}

default
{
    touch_start(integer total_number)
    {
        if (play) { 
            sound();
        } else {
            llSetTimerEvent(0.0);
        }
       
        play = !play;
    }
   
    timer()
    {
        llTriggerSound(llGetInventoryName(INVENTORY_SOUND, i), .6);
        i++;
        if(i+1 < tottrack )
        {
            llPreloadSound(llGetInventoryName(INVENTORY_SOUND, i+1));
           
        }
        if(i == tottrack )
        {
            llResetScript();
        }
    }
}

 

so my thought is ok this will work with one prim but not with all of them, whitty me i know lol, ok so somethign with llmessagelinked with target link_set should give all the linked oprims the right timing to know when to start , but it would be a lot of loading i think is there a way for all the linked prims to get the comand to play what the root prim plays at that instance and turn the volume up?

Link to comment
Share on other sites

  • 3 weeks later...
list invlist;integer tottrack;integer i;integer play = FALSE;sound(){        llSetTimerEvent(9.5);        tottrack = llGetInventoryNumber(INVENTORY_SOUND);        float length = tottrack*9.5;        llSay(0, (string)length);        llPreloadSound(llGetInventoryName(INVENTORY_SOUND, 0));        i=0;}default{    touch_start(integer total_number)    {        if (play) {             sound();        } else {            llSetTimerEvent(0.0);        }               play = !play;    }       timer()    {        llTriggerSound(llGetInventoryName(INVENTORY_SOUND, i), 1);        i++;        if(i+1 < tottrack )        {            llPreloadSound(llGetInventoryName(INVENTORY_SOUND, i+1));                   }        if(i == tottrack )        {            llResetScript();        }    }}

 

Link to comment
Share on other sites

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