Step counter (deleting steps)

Ok, so I'm having a lot of trouble with this and I hope you will be able to elp.

I want to limit the number of steps a player can take, and once this number of steps are taken, I want the payer to be able to reset the steps to 0 and start again.

I can get the steps limited using the control variable an linking the to them steps taken, but I cannot seem to reset the steps so the player can continue moving after the reset. I have tried to reset the variable to 0, but it's not working.

I hope someone might be able to help.
I want to limit the number of steps a player can take, and once this number of steps are taken, I want the payer to be able to reset the steps to 0 and start again.
Here is a little something I played around with and I think you might be able to use it to accomplish what you want (see screenshot1).

What I did was used a Conditional Branch: Script: $game_player.moving? inside a parallel process event and added +1 to Test.variable1.  That way it increased each time the player moved.  I then returned the variable to 0 when it becomes greater or equal to a certain number.

Note though that It doesn't seem to be precise and adds more than 1 to the variable when the player moves.  It was increasing the variable in increments of 7 or 8, which I don't understand.  But still, it was a consistent increase (at least in my testing) so I was able to use it to keep track of how many steps the player has taken and then reset it.

There are probably more efficient ways of doing this.  But it might give you something to work with at least until a better answer comes along.

Screenshot1.png
no, it's impossible to reset the steps - that wouldn't make sense because the purpose of that access is to get the number of steps since game start, not since last reset.


What you have to do is copy the number of steps since game start into a storage variable, and then calculate the difference between the current count and the count as it was stored at the last reset-time.
thank you. I believe I have just about got it working how I want it.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/step-counter-deleting-steps.21155/