Jump to content
You are about to reply to a thread that has been inactive for 1523 days.

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

Recommended Posts

Posted

I find that the walker scripts people are sharing around are too sensitive. You TP on someone's head and it starts playing, which isn't great for me because it already has a TP sound. I've tried adding llSleep() but that just causes the sound to come in late. I wanna prevent the following basic walker from playing unless I walk for 5 seconds.

string Snd = "Sleepwalk";
integer For = AGENT_WALKING;
default
{
    state_entry()
    {
        llPreloadSound(Snd);
        state entry;
    }
}
state entry
{
    state_entry()
    {
        llStopSound();
        @D;
        if (llGetAgentInfo(llGetOwner()) & For)
        {
            llSleep(2.0);
            state walking;
        }
        jump D;
    }
}
state walking
{
    state_entry()
    {
        llLoopSound(Snd,.0);
        float alpha = 0.0;
        @DD;
        llAdjustSoundVolume(alpha);
        alpha +=.1;
        if(alpha >= 1.0){jump D;}
        jump DD;
        @D;
        if (!(llGetAgentInfo(llGetOwner()) & For))
        {
            float alpha = 1.0;
            @DXD;
            llAdjustSoundVolume(alpha);
            alpha -=.1;
            if(alpha < 0.0){jump DX;}
            jump DXD;
            @DX;
            state entry;
        }
        jump D;
    }
}

 

You are about to reply to a thread that has been inactive for 1523 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
×
×
  • Create New...