How can I make Tracer's recall ability in RMMV?

I'm making some sort of a class like a time fighter and I thought that this skill could be very cool for the class, but I really don't know how to make it. Here is the description:

"Tracer bounds backward in time, returning her health, ammo and position on the map to precisely where they were a few seconds before."
Spoiler: Tracer's recall video

So, the only thing usable in rpg maker is the ability to recover health, because there's no position on map nor ammo. This is how the ability description in my game is:

"The user goes back to the previous turn and regains the life that had at the beginning of that turn."


How can I achieve this?
Have a common event run every turn that stores character's HP and MP in variables, then, when the skill is activated, register HP and MP in new variables and subtract the difference from last turn's values to set the value needed for change actor's HP and MP commands.
troop event, not common event...
Have a common event run every turn that stores character's HP and MP in variables, then, when the skill is activated, register HP and MP in new variables and subtract the difference from last turn's values to set the value needed for change actor's HP and MP commands.
Thats a good idea, but the thing is, how can I make that the skill knows which character is using the skill?

EDIT: oops I forgot to add one thing. If I made that, in Turn 1 will be saved, but in the begining of Turn 2 will be saved too, so the user will recover the HP of Turn 2 not 1
troop event, not common event...
A common event through a troop event. Thought that'd make sense since we're talking combat, but I guess not.

Thats a good idea, but the thing is, how can I make that the skill knows which character is using the skill?

EDIT: oops I forgot to add one thing. If I made that, in Turn 1 will be saved, but in the begining of Turn 2 will be saved too, so the user will recover the HP of Turn 2 not 1
Have the skill cast an invisible condition on its user that lasts for 1 turn, then the event checks which user is affected by the condition through conditional branches, and acts upon that.

Oh, yeah, well you could make yet another set of variables that when the HP/MP check runs, it copies last turn's variables to the second set and then sets current HP/MP values for this turn (use set equal to for the variables it gets copied to). Then, have the skill read the values from the second set of variables that has the previous turn's values stored.
A common event through a troop event. Thought that'd make sense since we're talking combat, but I guess not.


Have the skill cast an invisible condition on its user that lasts for 1 turn, then the event checks which user is affected by the condition through conditional branches, and acts upon that.

Oh, yeah, well you could make yet another set of variables that when the HP/MP check runs, it copies last turn's variables to the second set and then sets current HP/MP values for this turn (use set equal to for the variables it gets copied to). Then, have the skill read the values from the second set of variables that has the previous turn's values stored.

I don't understand first paragraph, can you explain it to me please?
invisible state, not condition. just a state that does nothing, has no text and no icon but can be checked by conditional branch.
Yanfly has a tutorial for Bravely Defaults Undo ability. It might get you close to what you want.

Yanfly has a tutorial for Bravely Defaults Undo ability. It might get you close to what you want.


Thats EXACTLY what I need. Thank you @JGreene. I will delete the undo deux and undo trois, because I don't need it. Also, thank you @Milennin for helping me trying to get this effect!

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-make-tracers-recall-ability-in-rmmv.98772/