CREATING A STEP COUNTING SYSTEM

Create a step counting system!

  • Joey
  • 11/10/2007 12:00 AM
  • 3859 views
Okay, this is how to create your own step counting system in RM2k/3.

Step 1.
Create a new common event, call it Steps Taken, and set it to parallel process.

Then, insert Enter Key Pressing: Up Down Left and Right keys. Save it to the variable (create) "Keypressed-Steps"
Insert a Conditional Branch or FORK conditions: and make it
"Keypressed-Steps" Greater or Equal to One.
Then, insert a Variable Operation, add 1 to the variable (create) Steps Taken. Then, make something to show this variable, using the \V trick.

What this should look like:
Key Input Proc:
Branch if Var is 1 or more
Variable Oper: +, 1

Then, create an event that shows this, such as a Customized Menu System that Lys86 uses.

Notes
* One continous step is counted as a single step.

Posts

Pages: 1
This will count steps that you take into walls too. What you should do is record the player's X/Y before they push a button then after they do, get the player's new X/Y. If either of them has changed, the player moved so increase the StepCounter. Otherwise the player ran into a wall or something so don't increment the step counter.

Alternatively, you can have a loop that starts with recording the player's current X/Y, wait 0.1s, then take the player's new X/Y and if they're different, increment the step counter. If you want specific numbers you can actually do the math to see how many steps the player took in the 0.1s (although I can't imagine the player moving very far in 0.1s). This should deal with running into walls or long, continuous steps and I've used this method in a custom encounter system in RM2k3 without either of those problems.
This also works for RMXP. Tried it.
Or you could just set a variable to "steps taken"- at least in RMXP, it's a premade feature.
Pages: 1