Walker Sound
Revision as of 12:04, 25 January 2011 by Jessikiti Nikitin (talk | contribs) (Created page with "I've seen a lot of these around the grid, I've made this one as efficient as I can. To use it you can just put the script in a prim along with a sound, there is no need to modify…")
I've seen a lot of these around the grid, I've made this one as efficient as I can. To use it you can just put the script in a prim along with a sound, there is no need to modify the script. But if you wanna do it, who's gonna stop ya?
<lsl> integer walking; string sound;
default {
on_rez(integer omitted) { llResetScript(); } state_entry() { sound = llGetInventoryName(INVENTORY_SOUND, 0); llSetTimerEvent(0.5); } timer() { integer info = llGetAgentInfo(llGetOwner()); if(info & AGENT_WALKING) { if(walking == FALSE) { walking = TRUE; llLoopSound(sound, 1.0); } } else { walking = FALSE; llStopSound(); } }
} </lsl>