Counting Steps Question?

Hi all.


I'm trying to create a damage over time effect that removes itself after walking x amount of steps. Basically, I want my character to be burning and take damage every few seconds, with the way to remove the effect being walking a few steps.


I know how to inflict damage with a parallel event until a variable hits a certain number but I'm not sure how to make a variable count steps.


Can anyone help?
This is very easy to do without a variable. 


Make a state for your damage over time effect. 


Around the the middle of the screen is a check box that says


"Remove by Walking"


if if you check this the greed out box next to it will allow you to input a number of steps needed to "run out" the damage over time effect. 


Is is there a specific reason you want to do it with a variable?
Thanks for that. I need the damage to activate over time so if you stand still, the damage would still occur. The idea is the walking will sort of blow the flames out. I want to encourage movement in this part of the game. 
When you say "this part of the game" is it just a screen or two? 


I've never based damage off of a variable, but if it's a small enough area I can figure out how to increment the variable. 


If if its two or three screens or something reasonable, you can make an event and copy it to every square in the area. All player touch. When you enter the square, it increases variable A by a set amount. Say 50. Then you wait a second, and increase by 10. Wait a second then increase by 10 again. Whatever numbers you choose, just examples. This way, variable A goes up 5x as fast by moving as it does by standing still. 


So, following that pattern could get you the variable to increment like you want, if it's a small enough area. 


Like I said, I have no experience basing damage off a variable. I hope this is helpful in spurring your thoughts. 
It's an obstacle course on a large map that already has lots of events already. I'm trying to keep the eventing down so any later edits to the map doesn't become a nightmare. 


The damage itself will be set. 10 hp every 3 second. 


Thanks for the help though. 
Well, if you want the number of steps to decrease the damage until it stops doing damage (due to the state wearing off), then you first want to set a variable to be equal to the script:


$gameParty.steps()


The capitalization is important. If you plan on reusing the event at any point you'll need to set the variable to 0 again after the state wears off.


As for actually setting up the DoT... all I can suggest is looking at how and evented time system increments the variables associated with the clock. Maybe that could help?
Sorry all. I probably made the post more complicated than it needs to be. 


What I need to know is how to increase a variable by 1 every time my character takes a step. 
Oh, well in that case go into the event you want to have counting the steps, and put in a Control Variables. Set it so that it adds to the chosen variable. In the options on how much to add to the variable, there should be an option that says Script with a greyed out box next to it. When you click Script, you'll be able to write in the box. in the box put "$gameParty.steps()" without quotations. The capitalization is very important. Click OK and BAM an event that counts steps.


I hope that was clear enough. ^^;
Awesome! Thank you. Inside the bracket do I put the database variable number that I want the step count recorded to?
You leave the bracket empty. By going through the Control Variables option when making an event, you should already be setting up which variable you'll be changing.
Thanks a lot. I appreciate you taking the time to help me!
by the way - there is absolutely no need for the script option to read steps here.


You can get the same number by using


control variable : game data : other : steps
Thanks Andar. That sounds good as well!

Original thread: https://forums.rpgmakerweb.com/threads/counting-steps-question.56541/