Problem is that since it is parrallel, it keeps adding gold and showing message because the step count still is 50. Adding +1 to the pedometer variable making it 51 to break the loop doesn't work because the common event overwrites it with real step count back to 50 as it is suppose to. So I figured I'd use a script to change the system's step count that the variable relies on, but nothing works. I've tried:
Group: +Gold Member
RM Skill: Advanced
Moving to eventing.
Asexual - Arizonan - Atheist I've got a gmail account and a yahoo mail account under this name, if you need to contact me. You can find me on facebook too. facebook.com/heroofhyla . If you send me a friend request, tell me who you are so I don't get confused.
PlagueRPG SITE IS WORKING! (if you see "test page," hit ctrl+f5) Latest update: New battle system demo, April 19, 2010
Well I took a look at this for you. I tried for awhile to do this all with events, however I had to give up and use a little scripting (just a little!). There's a demo at the bottom of this post but I'll post step by step instructions as well.
Here is what you need for my small example:
3 Switches 1 Item "Pedometer" 1 Variable 1 Common Event
Okay, on your games opening screen, turn ON 2 switches: 50StepReward and 100StepReward. Like I said, this is just an example.
Now have your event where your character gets the Pedometer item. This is what I have in the demo.
In the Script option, put
$game_party.steps = 0
this will reset the step count to zero after your character recieves the Pedometer. Now go to your list of scripts. Make a new script and call it something like Step_Reset. Make sure it is ABOVE "Main." Now put:
class Game_Party attr_accessor :steps end
Without this piece in your scripts, the step reset won't work.
Now make a common event. Make it a parallel process and only let it be activated if the switch "Pedometer" is on. Make sure the Variable you're using for the Pedometer is set to equal the number of steps the player has taken. This is where the switches and the conditional branches come in. Make a conditional branch that checks if the Pedometer variable is equal to 0, if it is, do nothing, but under the else put another branch that checks to see if the 50StepReward switch is on. If it is, make another conditional branch that checks to see if your Pedometer variable is equal to 50, if it is, add the coins (or items) to the player's inventory, throw in a nice little sound effect and give the player a message to let them know what they got for walking a certain amount. After that, turn OFF the 50StepReward Switch. This will make sure that the player doesn't keep getting the message and the reward for walking 50 steps. Continue to make your conditional branches all the way down until you have all the rewards for a certain amount of steps that you want. Make sure to put the new conditional branches in the correct spots so you don't stop them from being activated if you turn off a switch. (See picture below).
Everytime you add a new reward, you will have to add a switch and turn it on at the beginning of your game, and add it to the common event under the correct conditional branches, and then make sure to turn the switch off.
That's it! It's pretty simple once you get the right stuff in place. Hope this helps .
EDIT: Do you mind if I post this as a submission for other people to use?