Event Help that's step sensitive

I'm looking to create an event that triggers per every 100 steps taken, then resets the number of steps take to zero.

Let me be more specific. I want to create a mechanic where the main character has a lantern with lamp oil.
When she runs out of lamp oil (per every 100 steps) the room turns dark, and won't light up again until she finds more lamp oil.

I've been able to set up the part where the light turns dim after after she takes 100 steps, but I don't know how to "reset" the number of steps she took after she gets more lamp oil.
Instead of constantly setting it to 0, use Steps as your comparison.

When you turn on the lantern, Variable = Steps

Then, in your parallel event, if Steps - Variable >= 100, turn off the lantern.
you create variables one for Steps for Game data Steps, 2nd variable for the Steps variable you made.. i think it cant be reset the actual steps.. not sure..

Step 1 = Game Data Steps
Step 2 = Step 1
Test it.. in messages \v[numeric variable id] you will reset or set the Steps2 variables to zero and display it on screen or anywhere you want.
you create variables one for Steps for Game data Steps, 2nd variable for the Steps variable you made.. i think it cant be reset the actual steps.. not sure..

Step 1 = Game Data Steps
Step 2 = Step 1
Test it.. in messages \v[numeric variable id] you will reset or set the Steps2 variables to zero
Can you show me what that would look like?
@exiledknight I'm not sure that's going to do what the OP wants. You're resetting to 0 like in the first post, and that's just going to create an ever-larger discrepancy between Steps and any other value.

You only care about increments of 100, like I described above.

@terra_nimbus Did you try recreating the steps I gave you?
Can you show me what that would look like?
oh never mind that like what @ATT_Turan said it might complicate things and sorry didnt read the last part right so basically you want to refresh the steps? then @ATT_RUN comment will do the job
@exiledknight How is that going to function? The only thing you ever do with Steps2 is set it equal to Steps2.

It will never equal 100, it will only be 0 because it's undefined.
s
@exiledknight How is that going to function? The only thing you ever do with Steps2 is set it equal to Steps2.

It will never equal 100, it will only be 0 because it's undefined.
its supposed to be Steps2 = Steps xd the first variable.
I miss click sorry, but like you said its not what the OP want. I misread the last part.
its supposed to be Steps2 = Steps xd the first variable.
The question still stands of why are there two variables?

If you're saying 182 is equal to Steps, and 183 is equal to 182, what's the purpose of 182?

And they would all equal 100 only one time in the entire game, when the actor has taken exactly and only 100 steps.

I suggest checking out the logic in Post #2 😉

1695082368205.png

1695082485974.png
The question still stands of why are there two variables?

If you're saying 182 is equal to Steps, and 183 is equal to 182, what's the purpose of 182?

And they would all equal 100 only one time in the entire game, when the actor has taken exactly and only 100 steps.

I suggest checking out the logic in Post #2 😉

View attachment 277001
View attachment 277002
yes i already did read the authors post thanks for pointing, Steps var1 is equals to game data steps i mentioned it above but yeah since i read it wrong its not what he wants rather a bit the other way around, cool you did it already


EDIT: it is for displaying how much steps is consumed and can be reset in text messages etc since you cant reset the actual steps taken?. Since i misread it a while ago the reset thing..
oh never mind that like what @ATT_Turan said it might complicate things and sorry didnt read the last part right so basically you want to refresh the steps? then @ATT_RUN comment will do the job
The question still stands of why are there two variables?

If you're saying 182 is equal to Steps, and 183 is equal to 182, what's the purpose of 182?

And they would all equal 100 only one time in the entire game, when the actor has taken exactly and only 100 steps.

I suggest checking out the logic in Post #2 😉

View attachment 277001
View attachment 277002
EDIT: NVM I GOT IT TO WORK, THANK YOU SO MUCH YOU'RE A LIFESAVER!!!!!!😠

The problem im coming across is that once the lamp turns back on from getting oil, the lamp doesn't turn off again after walking 100 steps. What I'm really trying to know is how i set up the "player got lamp oil event" so that it allows my previously stated mechanic to work repeatedly.

I'm not too concerned about actually resetting the amount of steps that taken (if that's not what I need to do), I just need something that works
I don't know if I understood correctly, but here we go. I'll take advantage of what ATT_Turan said, keep the common event he mentioned "Latern Starting" as he said. Now in the second common event that will work in parallel do the following:

Screenshot_45.png


Mine is in Portuguese, but I think you'll understand, "passos" are "steps". Whenever you add fuel to the player you must call the common event "Lantern Starting".

Original thread: https://forums.rpgmakerweb.com/threads/event-help-thats-step-sensitive.161290/