- Joined
- Apr 30, 2020
- Messages
- 2
- Reaction score
- 0
- First Language
- English
- Primarily Uses
- RMMV
My project required modifying the YEP_FootstepSounds plugin, and along the way I encountered and repaired a possible bug. Specific tiles were playing the step sounds of adjacent tiles, rather than the tile the player was actually on. For example, playing grass sounds when walking on stone. It turns out the x,y used to determine the tile and corresponding tile-tag was being offset for some unknown purpose.
The fix was to remove these lines from Game_CharacterBase.prototype.playFootstepSound function:
These lines cause off-by-one errors when using region/tile footstep sounds. I might be missing something, but to me these lines seem wholly unnecessary. They seem almost intentionally erroneous, but perhaps that's just because I don't see their intent. Perhaps the creator forgot to remove an adjustment they made specific to their game?
The fix was to remove these lines from Game_CharacterBase.prototype.playFootstepSound function:
JavaScript:
if (this.x === 6) {
x += 1;
} else if (this.x === 4) {
x -= 1;
}
if (this.y === 2) {
y += 1;
} else if (this.y === 8) {
y -= 1;
}
Last edited:

