Reply
Recognized Resident
dacrusader
Posts: 2
0 Kudos

How to add walking sounds to objects?

[ Edited ]

Hi

I was just wondering if it's possible to add walking sounds to an object, like a footpath rather than avatar's shoes and if so how would you go about it? I've spent ages looking but best I could find was scripts that only work on items attached to the avatar :/

Point of this is to have different walking sounds depending on surface, e.g. stone, grass, wooden floor etc.

If someone could post here the code or otherwise point me in the right direction I'd be really grateful.

 

Thanks :smileyhappy:

Posts: 5,396
Registered: ‎05-21-2009
0 Kudos

Re: How to add walking sounds to objects?

Reply to dacrusader - view message

you need to replace the default collision sound with your preferred sound.  You probably will need to use a sound file with a single footstep sound.  To play a looped sound will not work b ecause people walk at different speeds and it would be strange to hear footsteps out of sync with the avatars walk.

Here is the basic information on how to do that.

Photobucket
Coby Foden
Posts: 2,803
Registered: ‎05-27-2009
0 Kudos

Re: How to add walking sounds to objects?

Reply to Amethyst Jetaime - view message


Amethyst Jetaime wrote:

To play a looped sound will not work b ecause people walk at different speeds and it would be strange to hear footsteps out of sync with the avatars walk.


Yes, people will walk at different speeds, but as far as I know all avatars in SL walk exactly at the same speed.  Whatever walk animation one uses the speed is always the same.  This is easily verified by walking two or more avatars side by side.  Everybody will advance at the same speed.  Even avatar size does not affect the speed.

It would be really nice if the viewers had a slider where one could adjust the walking speed.  For my personal taste the walking speed of avatars is somewhat too fast.  I would like to be able to walk slowly on a sandy beach, dreaming.  Then if I was in a hurry, I would like to be able to walk faster.

:matte-motes-big-grin:

Advisor
Kwakkelde Kwak
Posts: 2,374
0 Kudos

Re: How to add walking sounds to objects?

Reply to Coby Foden - view message


Coby Foden wrote:

Amethyst Jetaime wrote:

To play a looped sound will not work b ecause people walk at different speeds and it would be strange to hear footsteps out of sync with the avatars walk.


Whatever walk animation one uses the speed is always the same.



People will travel at the same speed, as in meters per second, they won't all take an equal amount of steps per second though. One could build animations with very short but fast steps, or very big ones while walking slower.

This also means it's impossible to synch any footpath sounds to avatars.

I'm not a scripter, but I think it's pretty much impossible to let the footpath script keep track of multiple avatars without tremendous amounts of scriptload, if it's possible in the first place. The object would have to determine who are stepping onto it, if the persons are moving or not and if they have left.

"The superior man understands what is right; the inferior man understands what will sell."
Confucius

Posts: 5,396
Registered: ‎05-21-2009
0 Kudos

Re: How to add walking sounds to objects?

Reply to Kwakkelde Kwak - view message

When I said they walk at different speeds I mean that some take more steps to cover the same distance, but he effect is the same as speed since a short person in RL has to walk faster than a tall person with a long stride to keep up with them.  Unless the sound is adjusted to the stride it will be out of sync and look strange.

The link I gave the OP was a link to replace the default sounds that you hear when your avatar walks, not the ones that people build into shoes, but the ones that SL itself produces.  Since it is a mere replacemnt of sound and the sound now appears to sync with an avatars steps it shouldn't be a problem.  However logically the sound used can't be a sound file with a number of foot steps recorded  and played at each collission.  It has to be a single foot step sound that plays when the avatars foot collides with the prim for each step. 

Photobucket
Coby Foden
Posts: 2,803
Registered: ‎05-27-2009
0 Kudos

Re: How to add walking sounds to objects?

[ Edited ]

Reply to Amethyst Jetaime - view message


Amethyst Jetaime wrote:

When I said they walk at different speeds I mean that some take more steps to cover the same distance...
...
However logically the sound used can't be a sound file with a number of foot steps recorded  and played at each collission.  It has to be a single foot step sound that plays when the avatars foot collides with the prim for each step. 


Ok, I see now what you mean.  Avatars advance at the same speed (meters per second, kilometres per hour, miles per hour).  Some walking animations use shorter steps, some animations use longer steps.  As the speed is the same, to cover a certain distance, more shorter steps are needed than longer steps to cover that distance in the same time.

As for the sound file: indeed to work in synch with the steps it must be single foot step sound like you explained.


PS.
To make it clear, an analog from RL: Person walking a leashed small dog.  The dog moves its legs very rapidly, the person moves their legs slowly.  However the dog does not move any faster than the person does.  The dog's and the person's speeds are exactly the same.
Unless the dog escapes from the leash... :matte-motes-agape: :matte-motes-big-grin:

Recognized Resident
dacrusader
Posts: 2
0 Kudos

Re: How to add walking sounds to objects?

[ Edited ]

Reply to Amethyst Jetaime - view message

Thanks for the reply, I tried it but for some reason the collision sound only activates when I jump down on the footpath from height, and it doesn't work when just walking on it :/

 

Nevermind, I figured it out... used the start collision, collision and end collision functions... Thanks a lot!