Record Move/Undo Move

I'm making a sokoban-like game and I want the player to undo a push when they make a mistake.


I'm thinking maybe an event (or common event) can record the moves the player and the boxes make then when a player triggers a button it will undo or reverse the last move.


But I don't exactly know how to do that so please help or suggest a better way to do it. Thanks in advance.
that is not easy and would require a plugin.


Most people go with a full reset - leaving and reentering a map usually places all events back to their original position (unless you tricked or use switches, in that case you would have to reset the switches/variables with an autorun on entering)
I see, do you know any plugins that can do this?

Original thread: https://forums.rpgmakerweb.com/threads/record-move-undo-move.67114/