limiting a players steps

I hope someone might be able to help.

I am trying to limit the steps of my party. Now I've been able to do this easily enough by setting a variable to count the number of steps the character can move.

Now the problem I have is is the fact that I have multiple parties, I wanted the player to be able to switch between these parties easily, and each party will have a certain number of steps they can take. I have even managed to set this up and it works well. Tthe real problem comes when I move to another party and the step counter continues to tick for the parties that are not in play.

Is there a way to pause a variable counter when the parties are switched and then restart when the player reselects the party again.

eg. player takes 10 steps as party one, then switches to party 2 for 20 steps and then goes back to party 1 for the remaining 10-20 steps (or whatever the steps value is)
The easiest way to do this would be to have your variable counters for each party in a different common event that runs parallel. Then, every time that you turn on the switch for one party (switch to them) you turn off the switches that control the other parties so that only one of the events runs at once.
I had hoped to avoid using so many events but if thats the only way then ill just have to try.

thanks
You could also use a single event with multiple pages if you want and have a variable that does nothing but determine which event page plays, if you really have that many common events. But then you'll of course have to keep making it for every map that requires this. So Event Page 1 has condition of variable[partyvariable] >= 1 and runs a parallel process only tracking party 1's steps, on page 2 it's identical except the variable >= 2 and it counts party 2's steps and so on, just remember that the pages have to be in sequential order with the variable values for it to work correctly.
another option would be to store current count in different variables and still use the automatic step count.


When leaving party one, current step count gets saved into a variable partyonesteps, then the party switch, and then you load compare the old step count for party two with the current step count and reinitialise for party two. It's a bit more complex to get it right, but that way one event counts for all parties without multiple counts.
Thank you all. Managed to get it working.

Original thread: https://forums.rpgmakerweb.com/threads/limiting-a-players-steps.23131/