MV Reverse Steps Counter without actually moving the character?

Hi. this is very fundemental for a current prototype im working on. im very inspired by an indie game that recently dropped, it uses the "steps" mechanic where each room you go into, it takes one step. you have 25 steps, and if you go over that, you lose. But you also have to use up all 25 steps each level to complete everything you need to do in there. The thing is: this game is a point and click game. and each "step" is used when you click into and out of different rooms. Im trying to recreate this in rpgmaker mv.

right now, ive got the point and click feature working. Im about to work on "moving" to different places in the house. but i have no idea how to script up this specific step mechanic. Any ideas? Thanks!!
The best I can think of is use variables to track the steps. You can use one to track how many steps you've already taken in the game, and another to track how many you are taking as well. One is setting the variable while the later one is parallel to run and check consistently. Take these and subtract the steps taken from the steps already taken to get the number of steps the player has taken from the start of the room. Now use this on another parallel event that checks if the variable saved from subtracting the two is zero, you lose.

You can also add a Hud to show the player how many steps they've taken, by using the last variable to track the steps and control in common events the Hud to display the step count.
The best I can think of is use variables to track the steps. You can use one to track how many steps you've already taken in the game, and another to track how many you are taking as well. One is setting the variable while the later one is parallel to run and check consistently. Take these and subtract the steps taken from the steps already taken to get the number of steps the player has taken from the start of the room. Now use this on another parallel event that checks if the variable saved from subtracting the two is zero, you lose.

You can also add a Hud to show the player how many steps they've taken, by using the last variable to track the steps and control in common events the Hud to display the step count.
this sounds interesting, but i've never used variables before unfortunately.. probably have without realizing tho. i guess i gotta learn
this sounds interesting, but i've never used variables before unfortunately.. probably have without realizing tho. i guess i gotta learn
Variables are just a way to save numerical data. You can control what the number is in the events, and use the numbers to control when things happen, or what happens as well. It's like a switch control to tell any switch connected to it when to act. They are good to look into how they work and what you can do with them as well.

You can also use them for inventory control as well. Like my game uses it this way. It takes to amount of inventory the player has, and is able to remove it and replace it that way. So when I switch to another storyline, I don't bring the items with it. Then when I switch back, the variables I used has the information to replace it all.
Variables are just a way to save numerical data. You can control what the number is in the events, and use the numbers to control when things happen, or what happens as well. It's like a switch control to tell any switch connected to it when to act. They are good to look into how they work and what you can do with them as well.

You can also use them for inventory control as well. Like my game uses it this way. It takes to amount of inventory the player has, and is able to remove it and replace it that way. So when I switch to another storyline, I don't bring the items with it. Then when I switch back, the variables I used has the information to replace it all.
I see. well, i wonder if you could help me out with this
i am using this tutorial to help me w the basic set up of the step counter, but its not working to count the number of transfers of the player to a new map (what i want for the mechanic to work)

I know this tutorial is made for normal steps, like regular WASD movements (and for MZ). but i thought it was possible to take this function and convert it to count player transfers instead (plus this is the only recent tutorial for a step counter ever). How can i convert this into having it count the transfers instead of actual steps?

(also i am using SRD's hud plugin to show the "steps: # / # " and id also appreciate some help on getting this to displaying how many ""steps"" you take, if you or anyone else knew how!!)
I see. well, i wonder if you could help me out with this
i am using this tutorial to help me w the basic set up of the step counter, but its not working to count the number of transfers of the player to a new map (what i want for the mechanic to work)

I know this tutorial is made for normal steps, like regular WASD movements (and for MZ). but i thought it was possible to take this function and convert it to count player transfers instead (plus this is the only recent tutorial for a step counter ever). How can i convert this into having it count the transfers instead of actual steps?

(also i am using SRD's hud plugin to show the "steps: # / # " and id also appreciate some help on getting this to displaying how many ""steps"" you take, if you or anyone else knew how!!)
ok ive actually figured this out through trial and error. the hud counts as it should and its counting up. but the issue is everytime i go to map002, it ups the count by like a bajillion. if i go back to the main map (map001) it counts up 1 like normal. here's my script stuff...


1758442194184.png
I see. well, i wonder if you could help me out with this
i am using this tutorial to help me w the basic set up of the step counter, but its not working to count the number of transfers of the player to a new map (what i want for the mechanic to work)

I know this tutorial is made for normal steps, like regular WASD movements (and for MZ). but i thought it was possible to take this function and convert it to count player transfers instead (plus this is the only recent tutorial for a step counter ever). How can i convert this into having it count the transfers instead of actual steps?

(also i am using SRD's hud plugin to show the "steps: # / # " and id also appreciate some help on getting this to displaying how many ""steps"" you take, if you or anyone else knew how!!)
So if you want to count transfers to another map, all you have to do is add 1 to a variable that counts this. So each time you setup a transfer map, right before that, have the variable add 1 to it. Then have a common event that once the variable gets to a certain number, your move count, it ends the puzzle with failure. If you need it to add the moves and the transfers together, you just track both, add both, and set that in another third variable that runs the common event that tracks it all. And using the mouse to click, that is going to count each step, not the click itself. I am not sure how to do that one. The variables that would count steps, it's only going to count each tile it moves, not each mouse click.
ok ive actually figured this out through trial and error. the hud counts as it should and its counting up. but the issue is everytime i go to map002, it ups the count by like a bajillion. if i go back to the main map (map001) it counts up 1 like normal. here's my script stuff...


View attachment 349886

Well, just looking at that script -

1. First, it adds the current map ID to the variable "Transfer".
2. Then it turns the switch "Step" on.
3. Then it checks if the switch "Step" is on. This is unnecessary, as it will always be on - we just turned it on last line.
4. Now it sets variable "Transfer" to be the same as variable "Steps". This will overwrite what we did in line 1, so it makes line 1 unnecessary.
5. Now it checks to see if "Transfer" isn't negative. We just set "Transfer" to be the same as "Steps", so if "Steps" can't go negative, this will also never go negative - so this line is probably unnecessary.
6. Then it turns the switch "Step" on again. We already turned it on in line 2, so this is unnecessary.
7. Then it adds 1 to the variable "Steps".

Feels like all you really want to do is the adding 1 to Steps line, so you could probably delete the rest of the code.

By "Steps", are we talking a Blue Prince-like system where you're actually just counting new rooms entered, not steps taken by the character? If all you want to do is add 1 to a variable every time you enter a new room in your game, then running a "Control Variables: Steps += 1" in the transfer event would work. So add that line in the door or edge of map script you have that takes the player to map 2.

It looks like you're trying to run Autorun in each map that does "Control Variables: Steps += 1" , which can work, but you need to make sure it only runs once each map and then turns itself off. This is why it's counting up so far in map 2 - the Autorun keeps looping, so the step counter keeps going up. To do it this way, you need to add in an erase event after the counter - so, your event should just be:

Control Variables: Steps += 1
Erase Event
By "Steps", are we talking a Blue Prince-like system where you're actually just counting new rooms entered, not steps taken by the character? If all you want to do is add 1 to a variable every time you enter a new room in your game, then running a "Control Variables: Steps += 1" in the transfer event would work. So add that line in the door or edge of map script you have that takes the player to map 2.

It looks like you're trying to run Autorun in each map that does "Control Variables: Steps += 1" , which can work, but you need to make sure it only runs once each map and then turns itself off. This is why it's counting up so far in map 2 - the Autorun keeps looping, so the step counter keeps going up. To do it this way, you need to add in an erase event after the counter - so, your event should just be:

Control Variables: Steps += 1
Erase Event
ye!! never heard of blue Prince but i assume it has a similar functionality like the mechanic "Lily's Little Video Shop" also has where it also counts rooms entered, the actual character doesn't move as shes just a still image. I could've sworn my script was wromng, im sorry ive never handwritten scripts like this before but i am learning how they work through this ^^; lemme try this out and ill post an update w a video
dude adding Control Variables: Steps += 1 after the transfer event on both maps makes it up the counter normally and without problems what the hell thank you.

now i gotta figure out a system where it limits how many steps and going over gets you a game over.

(cant upload a video showing it off working it keeps saying its too big)

1758485963536.png
alright working on triggering a game over when you get over a certain number of steps and its not working. nothing really happens when i go over 10

1758488609770.png
alright working on triggering a game over when you get over a certain number of steps and its not working. nothing really happens when i go over 10

View attachment 349922

nvm fixed it. what needed to be done is have this run as Parallel, bec if its in autorun, it pretty much breaks the game to where im stuck on the first map and can only interact w anything else on the map that doesn't deal w transferring to another map.

THEN i gotta go into my step counter event i made and turn on the game over switch.

1758489040590.png


now it works perfectly. everything i wanted for my project is working. thanks so much for everyone's help. i guess this thread is now solved.
nvm fixed it. what needed to be done is have this run as Parallel, bec if its in autorun, it pretty much breaks the game to where im stuck on the first map and can only interact w anything else on the map that doesn't deal w transferring to another map.

THEN i gotta go into my step counter event i made and turn on the game over switch.

View attachment 349923

now it works perfectly. everything i wanted for my project is working. thanks so much for everyone's help. i guess this thread is now solved.
One thing to keep in mind is that autorun events prevent player input (which is why it "broke the game"); if you have an autorun for setup, you'll need to do something like turn on its self switch A, and create a second "action button" page with that self switch as the condition so that it doesn't autorun any more.

Original thread: https://forums.rpgmakerweb.com/threads/reverse-steps-counter-without-actually-moving-the-character.180188/