Second Life Copybot
Walk Sounds Footsteps and so on - Printable Version

+- Second Life Copybot (https://secondlifecopybot.com)
+-- Forum: SECOND LIFE PRODUCTS (https://secondlifecopybot.com/forum-1.html)
+--- Forum: SCRIPTS (https://secondlifecopybot.com/forum-1022.html)
+---- Forum: SCRIPTS (https://secondlifecopybot.com/forum-8.html)
+----- Forum: Avatar Augmentation Scripts (https://secondlifecopybot.com/forum-51.html)
+----- Thread: Walk Sounds Footsteps and so on (/thread-5520.html)



Walk Sounds Footsteps and so on - TrueFreak - 07-10-2013

on walk - play sound

Quote:/*

Rekson Walk Sound Script

If you need any help with this script or are unsure about anything send me a message on Scaler Rexen and I will gladly assist you.

--Setup

All you have to do is put the sound you want to play inside the same object you put this script into and it will play when you walk! it's as easy as that. You do not need to change anything below.

*/

key owner;
string sound;

default
{
on_rez(integer p)
{
llResetScript();
}
state_entry()
{
owner=llGetOwner();
sound=llGetInventoryName(INVENTORY_SOUND,0);
llSetMemoryLimit(llGetUsedMemory()+512);
if(sound!="")
{
llSetTimerEvent(.25);
}
else
{
llSetTimerEvent(0);
llOwnerSay("Please put a sound in and reset the script.");
}
}
timer()
{
if(llGetAgentInfo(owner)&AGENT_WALKING)
{
llLoopSound(sound,1);
}
else
{
llStopSound();
}
}
}