Second Life Copybot
Play sound When Walking - 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: Play sound When Walking (/thread-8051.html)



Play sound When Walking - machinecode - 09-15-2014

sound script

Put in prim and wear.

PHP Code:
key owner_key;
integer owner_walking;

default
{
state_entry()
{
llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS);
llSetTimerEvent(0.25);
owner_key llGetOwner();
}

changed(integer change)
{
if(
change CHANGED_OWNER)
{
owner_key llGetOwner();
}
}

on_rez(integer param)
{
llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS);
}

run_time_permissions(integer perm)
{
llTakeControls(CONTROL_UPFALSETRUE);
}

timer()
{
integer walking = (llGetAgentInfo(owner_key) & AGENT_WALKING) != 0;
if(
walking)
{
if(!
owner_walking)
{
llLoopSound(llGetInventoryName(INVENTORY_SOUND0), 1.0);
}
}
else
{
if(
owner_walking)
{
llStopSound();
}
}
owner_walking walking;
}




RE: Play sound When Walking - oldschoolniggra - 08-21-2018

thanks for this could i ask how do i add my music 2 it and can i upload music


RE: Play sound When Walking - kriptonic - 02-07-2019

(08-21-2018, 05:46 AM)oldschoolniggra Wrote:

[To see links please register here]

thanks for this could i ask how do i add my music 2 it and can i upload music
u add it into ya prim add script then wear it should play