Search the Community
Showing results for tags 'walker'.
-
Below is a basic walker script that's been shared around. Whenever I teleport to a person or location, it starts playing. I want make sure that it can't play until (let's say) 5 seconds after every teleport. It's because I already have a teleport sound player, so I don't want them both playing at the same time. I've tried adding llSleep(), but that just causes it to play 5 seconds later, even though I'm not even walking by then. I just want it to act as if I didn't walk at all no matter what my avatar does during the 5 seconds after every teleport. 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; } }
-
// Play a sound whenever the owner is walking integer gWasWalking; // TRUE when wearer is already walking string gSound = "Sleepwalk"; // name of soundfile in inventory default { state_entry() { // Start a timer to continuously check if the owner is walking llSetTimerEvent(0.25); } timer() { integer NowWalking = llGetAgentInfo(llGetOwner()) & AGENT_WALKING; if (NowWalking != gWasWalking) // walking has stopped or started { llStopSound(); if (NowWalking) llLoopSound(gSound, 1.0); } gWasWalking = NowWalking; } }