The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: Mariofan0 on April 12, 2006, 04:52:51 PM

Title: Step Counter
Post by: Mariofan0 on April 12, 2006, 04:52:51 PM
Ok this is a dumb idea but im looking for a way to count your steps in RPG maker 2003
And By steps i mean every square you walk in...

Plz Dont Say Cover The World Map With Event Tiles.
Title: Re: Step Counter
Post by: Tsunokiette on April 12, 2006, 05:44:46 PM
This is actualy pretty simple if you think about it for a while. You will need -

2 - common events

7 - Variables

1 - Switch

Common Events -

* Set Coordinates [0001]
* Count Steps [0002]

Variables -

* Map [0001]
* X coordinates [0002]
* Y coordinates [0003]
* Last Map [0004]
* Last X coordinates [0005]
* Last Y coordiantes [0006]
* Steps [0007]

Switches -

* Coordinates Set [0001]

Now on to the common events -

Set Coordinates needs to be an parallel proccess event.

[code]Branch if Switch[0001:Coordinates Set] is OFF
Title: Re: Step Counter
Post by: Mariofan0 on April 12, 2006, 06:07:25 PM
I Think There Is A Minor Flaw...



I CANT MOVE
Title: Re: Step Counter
Post by: Blizzard on April 12, 2006, 06:11:37 PM
Why not make a common event, that just increases a counter, when you press L/R/U/D (and move 1 tile)? And just put it out in a window and that
Title: Re: Step Counter
Post by: Mariofan0 on April 12, 2006, 06:34:15 PM
You Know That Worked Better Than...

NOT
Title: Re: Step Counter
Post by: Mariofan0 on April 12, 2006, 06:48:52 PM
Fixed It...

In The First Part No >End Event Prosecing
And It Has To Be Parallel Prosess With No Switch Activate.
Title: Re: Step Counter
Post by: Tsunokiette on April 12, 2006, 08:02:05 PM
Quote from: Mariofan05 on April 12, 2006, 06:48:52 PM
Fixed It...

In The First Part No >End Event Prosecing
And It Has To Be Parallel Prosess With No Switch Activate.

That wont work  :wink:

B/C -

The first 1 needs the end event proccessing if it's auto OR parallel, otherwise it will not work, b/c it will continuously store the same values each time, making it so the step counter never increases. And instead of making it auto or parallel, just call it in an event in the begining of the game, but you still need to set the switch and the 2nd one needs to be parallel with the switch activating it, or else there will be, problems...

(goes off to see what went wrong)
Title: Re: Step Counter
Post by: Tsunokiette on April 12, 2006, 08:07:55 PM
*bump*

*double-post*

Don't flame me but... It does work. Just change the first one to parrallel proccess, and replace End Event Proccessing with Erase Event. It works like a charm...

Just tested it :-P
Title: Re: Step Counter
Post by: Mariofan0 on April 13, 2006, 08:00:10 PM
Then why does it work without the end event procesing or erase event...
Title: Re: Step Counter
Post by: Tsunokiette on April 13, 2006, 11:53:41 PM
Quote from: Mariofan05 on April 13, 2006, 08:00:10 PM
Then why does it work without the end event procesing or erase event...

It runs, but it doesn't work, it will keep reseting both the new map,x,y values and the old map,x,y values to the exact same thing, making it so that the step counter will never increase.
Title: Re: Step Counter
Post by: beware on April 15, 2006, 01:27:50 AM
blizzard, that wont work because if you walk into a wall it will count as a step, but you never took a step.