Jump to content

I need help with this sound script please


eduardoalonzo
 Share

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

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

Recommended Posts

hello I not know much of scripts, and made a hud of sounds with scripts of the wiki and used the (llLoopSoundMaster) but I have the problem that is not heard in the world when I append the hud to the avatar, the sound only I hear it, e read that I have to use (llTriggerSound) so you can hear the sound in the world, how can I join the (llLoopSoundMaster) + (llTriggerSound) help me please here I leave the script that I used the wiki:   I need to add lltrigguersound to that script, someone who will help please

// This integer (actually a boolean) will be used to manage the toggle effect.
integer soundState = FALSE;
// Change MasterLoop to the sound clip you want to use.
string soundClip = "MasterLoop";
default {
    state_entry ()
    {
        // Displays network "OFF" as floating text above the prim
        llSetText ("OFF", <1,0,0>, 1.0);
    }
    touch_start (integer num_detected)
    {
        // When touched, soundState inverts its current boolean value. 1 becomes 0, 0 becomes 1.
        soundState =! soundState;
        if (soundState)
        {
            // Run this code when entering soundState 'on'
            // Displays green "ON" as floating text above the prim
            llSetText ("ON", <0.1,0>, 1.0);
            llLoopSoundMaster (soundClip, 1.0);
        } else
        {// Run this code when entering soundState 'off'
            // When touched, stop sound & display network "OFF" as floating text.
            llSetText ("OFF", <1,0,0>, 1.0);
            llStopSound ();
        }
    }
}

Link to comment
Share on other sites

4 hours ago, eduardoalonzo said:

hello I not know much of scripts, and made a hud of sounds with scripts of the wiki and used the (llLoopSoundMaster) but I have the problem that is not heard in the world when I append the hud to the avatar, the sound only I hear it

 

 

HUD sounds can only be heard by their wearer, they are never heard in-world. If you want it to be heard, wear the HUD as an attachment (to your neck, leg, hand, nose, whatever)

Link to comment
Share on other sites

20 hours ago, eduardoalonzo said:

hello I not know much of scripts, and made a hud of sounds with scripts of the wiki and used the (llLoopSoundMaster) but I have the problem that is not heard in the world when I append the hud to the avatar, the sound only I hear it, e read that I have to use (llTriggerSound) so you can hear the sound in the world, how can I join the (llLoopSoundMaster) + (llTriggerSound) help me please here I leave the script that I used the wiki:   I need to add lltrigguersound to that script, someone who will help please

 

You can not. You would have to code a loop which triggers the sound at each ending of the sound length.

Link to comment
Share on other sites

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