RPG Maker MV

RPG Maker MV

How to reset Steps to 0 ???
I have a Common Event which makes Variable "Steps Taken" = to Steps
I'm trying to run a Map Event like this:

When Variable "Steps Taken" >/= 30
Run Common Event
Set Variable "Steps Taken" to 0
Exit Event Processing

I think I need a way to reset Steps to 0, because when the Map Event ends, the Common Event sets Variable "Steps Taken" = to Steps again, and (I think) Steps doesn't automatically reset to 0 after an Event
< >
Showing 1-4 of 4 comments
I just tried this:
$gameParty.change_steps(0)

It said "error $gameParty.change_steps(0) is not a function" :'c

this also failed:
$gameParty.increaseSteps(-30)

no error... so it is a function, it just didn't reset steps
Last edited by Will'sWitheredWildebeestWill's; Aug 22, 2019 @ 12:58pm
Caethyril Aug 22, 2019 @ 1:39pm 
I think this'll reset the internal step counter:
$gameParty._steps = 0;
Not sure if that'll mess anything up, though; typically the step counter starts at zero and only ever increases. =O

The usual approach would be to have two variables, one for a "zero" marker (remembers steps when you started counting) and one for the actual counter, e.g.
◆Control Variables:#0042 stepCount = Steps ◆Control Variables:#0042 stepCount -= stepStart ◆If:stepCount ≥ 30 ◆Text:None, Window, Bottom : :30 steps taken! ◆Control Variables:#0041 stepStart = Steps ◆ :End
Thankyooouuu, all good now
io_ivan Aug 22, 2024 @ 6:23pm 
Originally posted by Caethyril:
I think this'll reset the internal step counter:
$gameParty._steps = 0;
Not sure if that'll mess anything up, though; typically the step counter starts at zero and only ever increases. =O

The usual approach would be to have two variables, one for a "zero" marker (remembers steps when you started counting) and one for the actual counter, e.g.
◆Control Variables:#0042 stepCount = Steps ◆Control Variables:#0042 stepCount -= stepStart ◆If:stepCount ≥ 30 ◆Text:None, Window, Bottom : :30 steps taken! ◆Control Variables:#0041 stepStart = Steps ◆ :End
Thank you very much you saved me :cure:
< >
Showing 1-4 of 4 comments
Per page: 1530 50