"Player is moving" versus "player is receiving move input"

Hi! Thanks for all your support here!

So in my project I have scrolling background layers triggered by a conditional branch. If a direction button (right or left) is pressed, the background layers scroll. But when the character is forced to stop because his movement is blocked (by a region or a tile) if I'm still pushing the direction button the background layers continue to scroll even though the player is stopped.

Is there are script that can distinguish between pressing the direction button and actual player movement?

Thank you for all your help!


Below is a pic of the event.


1613587426435.png






EDIT: This worked:

1613668436726.png

Original thread: https://forums.rpgmakerweb.com/threads/player-is-moving-versus-player-is-receiving-move-input.133520/