Jump to content
Sign in to follow this  
eduardoalonzo

I need help with this sound script please

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

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites
16 hours ago, Fritigern Gothly said:

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)

A HUD is an attachment, but it reqiures the function  llTriggerSound.

 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...