Footsteps sound effects

Hello, i am trying to bring footstep sound effects with this tutorial i found on youtube. However, there is a strange concern. Sometimes I listen to the sound effect of another type of terrain over the one I have chosen. Does anyone know how to fix this?

I assume you're using MV?

I've moved this thread to MV Support. Thank you.

yes
Hey there!

The said method seems a bit resource consuming and instead (as stated in the video's comments), scripting is way more easier.

You can have everything in 1 simple Common Event (+ 1 Variable if you'd like to have different pitches to the same sound).
*Early Notes:
- The below scripts exclude Dashing (i personally don't like the test results so i simply removed it)
- From an unknown reason, in the first minute after launching the title, the sounds seem to pause/wait randomly than stated in the script but, after ~2 minutes, everything works perfectly even when walking from certain surfaces to different ones

1st Method - using only 1 Common Event with a Parallel Trigger
///////////////////////////////////////////
Script: if ($gameMap.regionId($gamePlayer.x, $gamePlayer.y) === X) \\ Be sure to change X, it's the RegionID you want the footsteps to be heard on.
if ($gamePlayer.isMoving()){
AudioManager.playSe({ name: "fileName", volume: 100, pitch: 100, pan: 0 }) \\ Be sure to change fileName with the actual name found in \your project\audio\se; do not add the extension.
}
Wait: Y frames \\ Put this wait outside of the above script; You'll also have to undergo some tests to find which is the ideal timing between the footsteps SFX; somewhere between 10 - 30 frames work for me but of course, it all depends on your SE file length.

2nd Method - using 1 Common Event with a Parallel Trigger + 1 Variable
///////////////////////////////////////////
Control Variables: Z = random between 0...2 \\ Where Z = VariableID; the 0, 1 & 2 are simply 3 different pitches to the same sound.
Script: if ($gameMap.regionId($gamePlayer.x, $gamePlayer.y) === X)
if ($gamePlayer.isMoving())
if ($gameVariables.value(Z) === 0){
AudioManager.playSe({ name: "fileName", volume: 100, pitch: 100, pan: 0 })
}
else if ($gameVariables.value(Z) === 1){
AudioManager.playSe({ name: "fileName", volume: 100, pitch: 115, pan: 0 })
}
else if ($gameVariables.value(Z) === 2){
AudioManager.playSe({ name: "fileName", volume: 100, pitch: 125, pan: 0 })
}
Wait: Y frames


Hope it helps 😀

Take care & good luck!

Original thread: https://forums.rpgmakerweb.com/threads/footsteps-sound-effects.140187/