terra_nimbus

Warper
Member
Joined
Aug 27, 2023
Messages
4
Reaction score
1
First Language
English
Primarily Uses
RMMV
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.
 

Attachments

  • Screenshot from 2023-09-18 15-31-51.png
    Screenshot from 2023-09-18 15-31-51.png
    73.3 KB · Views: 8

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,087
Reaction score
9,015
First Language
English
Primarily Uses
RMMV
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.
 

exiledknight

Regular
Regular
Joined
Feb 25, 2023
Messages
57
Reaction score
33
First Language
English
Primarily Uses
RMMV
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.
 

Attachments

  • Screenshot_20230919-071303.jpg
    Screenshot_20230919-071303.jpg
    553.8 KB · Views: 7
Last edited:

terra_nimbus

Warper
Member
Joined
Aug 27, 2023
Messages
4
Reaction score
1
First Language
English
Primarily Uses
RMMV
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?
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,087
Reaction score
9,015
First Language
English
Primarily Uses
RMMV
@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?
 

exiledknight

Regular
Regular
Joined
Feb 25, 2023
Messages
57
Reaction score
33
First Language
English
Primarily Uses
RMMV
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
 

Attachments

  • test.png
    test.png
    445.3 KB · Views: 5
Last edited:

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,087
Reaction score
9,015
First Language
English
Primarily Uses
RMMV
@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.
 

exiledknight

Regular
Regular
Joined
Feb 25, 2023
Messages
57
Reaction score
33
First Language
English
Primarily Uses
RMMV
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.
 

Attachments

  • test.png
    test.png
    436.8 KB · Views: 3
Last edited:

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,087
Reaction score
9,015
First Language
English
Primarily Uses
RMMV
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 :wink:

1695082368205.png
1695082485974.png
 
Last edited:

exiledknight

Regular
Regular
Joined
Feb 25, 2023
Messages
57
Reaction score
33
First Language
English
Primarily Uses
RMMV
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 :wink:

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..
 
Last edited:

terra_nimbus

Warper
Member
Joined
Aug 27, 2023
Messages
4
Reaction score
1
First Language
English
Primarily Uses
RMMV
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 :wink:

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

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
 
Last edited:

darklugia1997

Regular
Regular
Joined
Dec 3, 2018
Messages
82
Reaction score
19
First Language
Portuguese
Primarily Uses
RMMZ
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".
 

Latest Threads

Latest Posts

Latest Profile Posts

I keep thinkin' that someday I'll be a real girl. I dunno, maybe today is the day.:kaopride:

alice_curved_citadel.png
Counting down to Wind Ryder release
milhouse-time.gif


Hello everyone, I inform you that you can now freely try my new Plugin: Dynamic Switch for RPG MAKER MZ.

You can see the official post in the forum: https://forums.rpgmakerweb.com/index.php?threads/rpg-maker-mz-plugin-dynamic-switches.161525/

I hope you like it and I'm looking forward to your comments and suggestions! :)
Right, finally responded to everyone who had an open commission query with me. If I've missed anyone, please let me know.
Okay, so it looks like I've bamboozled by that dastardly placebo effect again. Still taking the meds, which seemed to help at first, but yesterday evening my chest got this odd numbness, which didn't last long, but still. AND its still difficult to breathe. Guess I'll go spend the money I was saving for homebuying costs on another doctor visit :\

Forum statistics

Threads
134,851
Messages
1,251,190
Members
177,643
Latest member
Aviraa
Top