Sound When Trying To Pass Impassable Tiles?

So this is what I'm trying to do:

I'd like a small sound to be played whenever a player tries to pass an impassable tile, like in Pokemon. (Well it happens in Diamond and Pearl, I haven't played the other games!)

Is there a way to do this?

Thanks,

Yo Ewan
Well there's an easy way, through Events.
Create an event, the 'Trigger' must be set to 'Player Touch' and then in the contents section give it a 'Play SE' and you should be good.
Another simple way, that helps to save some space without using events, is to make a little add-on on the Game_Map.prototype.isPassable method or in the Game Player canPass or Move straight methods: during the checking of the character movement, if the tile is not passable (or the characters, too, depending where do you want to place the method for the audio) a sound will be played.

Original thread: https://forums.rpgmakerweb.com/threads/sound-when-trying-to-pass-impassable-tiles.78856/