Check when player has taken a step?

Can't figure this one out, anyone got a good way of doing it? I wanted to set player X and Y to variables based on mapX/Y and then to check if the current mapX/Y matches that variable but I can't seem to find a way to directly do that.
Code:
◆Control Variables:#0006 = Map X of Player
◆Loop
  ◆Control Variables:#0007 = Map X of Player
  ◆If:#0007 ≠ #0006
    ◆Comment:took a step
    ◆Break Loop
    ◆
  :End
  ◆
:Repeat Above
Something like that, but add in Y as well.
Code:
◆Control Variables:#0006 = Map X of Player
◆Loop
  ◆Control Variables:#0007 = Map X of Player
  ◆If:#0007 ≠ #0006
    ◆Comment:took a step
    ◆Break Loop
    ◆
  :End
  ◆
:Repeat Above
Something like that, but add in Y as well.
Thanks for the tip, didn't think to use loops like that.

The problem with this approach though is that it doesn't seem to catch every step - I can sometimes take two steps before it registers that I've moved.

EDIT - Wait, forget that, it was because I was using a show text to tell if it was registering each step and that was causing the problem. When I removed this and just looked at the step-count variable it looks like this works!

Thank you very much! I'll give your newer method a shot too and see which is most efficient. Thanks again.
Code:
◆Control Variables:#0006 = Steps
◆Loop
  ◆Control Variables:#0007 = Steps
  ◆If:#0007 > #0006
    ◆Break Loop
    ◆
  :End
  ◆
:Repeat Above
This one is probably faster. I forgot that control variables had a step counter.

Original thread: https://forums.rpgmakerweb.com/threads/check-when-player-has-taken-a-step.85450/