Play sound When Walking

Thread Started By machinecode

2747
2
  • 63 Vote(s) - 2.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rate Thread
#1
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;
}

Reply


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


#3
Wink 
(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
Reply




Forum Jump:

1 Guest(s)
Share this:

About Second Life Copybot

Second Life CopyBot Forum is a place where you can get items for Second Life and other vitual worlds for free. With our CopyBot viewers you can export and import any content from these virtual worlds and modify them in 3D software such as Blender, 3D studio Macx etc...