Jump to content

Preload sound of Avatar attachment


Domitan Redenblack
 Share

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

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

Recommended Posts

I have this script to preload my friend's windup shoulder cow-pet... (don't ask LOL)

 

default
{
    state_entry ( ) {
            llSetText( "Moo & Tick: Script and sounds to\nadd to Mod-perms objects.", <1, 1, 0>, 1.0);
    }


    attach(key attached) {
        if (attached == NULL_KEY) return;

        llSetText( "", <1, 1, 0>, 1.0);
        llPreloadSound("Sound-Cow_Moo_01");  // When attaching...
        llPreloadSound("Sound-Clock_Tick_solid");  // When attaching...
    }

    touch_start(integer total_number) {
        llSetSoundQueueing(TRUE);
        llPlaySound("Sound-Cow_Moo_01", 1.0); // play Sound when touched.
        llPlaySound("Sound-Clock_Tick_solid", 1.0); // play Sound when touched.
    }
}

 but even after a minute from her logging in, you can click on the pet and still miss the first sound "Moo"

Why?

 

 

Link to comment
Share on other sites

This will preload sounds on the wearer's viewer when the wearer attach it, not necessarily on other viewers.
Other viewers have to be 'in sight' when the cow is attached to benefit.

(this is how it is expected to work:smileyhappy:)

From your description only the last sound is preloaded
do I understand that right?

Link to comment
Share on other sites

I've had bad luck with prefetch as well.  What I wound up doing, when needed, was to trigger the sound on a 20 second timer at 0.01 volume.  (^_^)

Two things are happening.  1: Prefetch probably doesn't work.  I'm not sure, but, maybe.  and 2: Cache gets frequently garbage collected.  Go without using a sound/texture/animation for long and it'll have to re-download it. (>_<)

So, play quietly and often has been my personal solution. (^_^)y

 

 

Link to comment
Share on other sites

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