How to increment the step counter?

qwertyu63

Villager
Member
Joined
Nov 30, 2013
Messages
9
Reaction score
2
First Language
English
Primarily Uses
I know the game engine has a step counter, which I am using. However, I need to be able to have an event add 1 to the counter without moving the player.

The idea is that I'm using the step counter to create turn based on-map combat; whenever the step counter advances, every enemy gets a turn as well. Attacking is resolved as a common event that I need to make advance the step counter (so the enemies take a turn when the player attacks).
 

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
744
Reaction score
474
First Language
Polish
Primarily Uses
RMMV
You can use a variable for that, and everytime you want to check steps, then you assign ste counter to a variable, then check the variable. To add a step, just add 1 to the step variable.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,635
Reaction score
5,116
First Language
English
Primarily Uses
RMVXA
$gameParty.increaseSteps(); will increase the Steps counter by 1. Put this in a Script line in any event, inside a damage formula, or anywhere else that accepts JS code.

If you need to do something else to the Steps counter, do a mathematical operation with $gameParty._steps, for example to subtract 10 from the current Steps counter you would use $gameParty._steps -= 10
 

qwertyu63

Villager
Member
Joined
Nov 30, 2013
Messages
9
Reaction score
2
First Language
English
Primarily Uses
$gameParty.increaseSteps(); will increase the Steps counter by 1. Put this in a Script line in any event, inside a damage formula, or anywhere else that accepts JS code.

If you need to do something else to the Steps counter, do a mathematical operation with $gameParty._steps, for example to subtract 10 from the current Steps counter you would use $gameParty._steps -= 10
Perfect. That works just like I needed it to. Thank you.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,547
Members
137,835
Latest member
yetisteven
Top