Gw Temp


Tutorial - 'Whack-A-Mole' by ATARI

An item about RPGMaker 2000 posted on


ATARI teaches us how to have a whack-a-mole mini-game in our RPGs!


Hi folks, it’s ATARI again. This time I’m going to show you how to make a Whack-a-mole game for your rpg.

What you need to know to use this tutorial:
1. Password Functions
2. Forks (EXTREMELY important)
3. Variables
4. Labels

I’ll explain how it works. You have four holes, and things come out of them. You get a different amount of points depending what you hit. If you hit a mole, you get 1 point, hit a golden mole, you get 3 points, and hit a black mole, you lose 1 point. You get prizes for how many points you get. You can only get one prize each time though. Simple right? Okay.

The first thing you need to do, is setup a place for your Whack-a-moling. A stand where you first get it, and another map where it actually happens. So you walk up to the counter, pay 25 coins to play by using a show choice option, then use a fork to see if you have 25 or more coins. If you don’t have 25, you can’t play, and if you can, you pay. You turn into a hammer and get teleported to another map, where all the
ACTION happens. The whack-a-mole map.

The whack a mole map should be setup like this. One hole at the top, two holes below it, a little distance apart from each other, and below those, one whole at the bottom. Now make a parrell process event, and in it, put a new enter password event. Check the 1,2,3,4 option and the 5 option. Use variable “Whack-a-mole-buttons.” Do not check wait until key hit. Next, make a new timer event. Set it to one minute. Now on top of each of the holes, there should be an event. On the first page of the hole on the
bottom, it should be blank, on the second page, it should be a regular mole. Make it’s starting condition if variable “Hole One” Is Above 1. On the next page, make it a black mole, with the starting condition should be “Hole One” above 4. The next there should be a final page, with a gold mole. It’s starting condition should be if “Hole One” Is above 6. Copy this event onto all the holes, on the left hole, change the variable to “Hole Two” on the right “Hole Three” and on the top, “Hole Four” This so it goes with the same number as it would with the password events. Because in the arrow keys password events,
1 = Down
2 = Left
3 = Right
4 = Up.
Now go back the parrell process event. Make another page on it, make it’s starting condition switch be, “Timer.” Make it AUTOSTART. Make it display a message that says, “Time is up.” Then teleport the hero back to the stand and change graphics back to normal. Now go back to the first page on that parrell process event. Below the timer event, make a new variable event. Make it a random variable thing, using variable “Holes” make it go between 1 and 4. Now below that, make a new fork option, that says
“If variable “Holes” is 1, then” make it choose a random number between 1 and 6, using variable “Hole One,” wait 3.0 seconds, and turn change variable “Hole One” to 0. Then wait 7.0 sec Under the else case, make a fork that says “IF holes is equal to 2, then” have it do the same thing as it did under if it was hole one, except change the variable to “Hole Two.” Do the same if it’s three and four. This is the
first mole event. Now under the END case of this fork, make it do the same again, and under that end case, make it do the same again. Now it’s time for the moles to come out in FORCE! Now under that END case, make a new variable event, that randomly choose 1-6 for hole one, hole two, hole three, and hole four. Make it wait 3.5 seconds, then turn all of them to 0. Then wait 5.0seconds, and do it again. Do this again four more times in the event. At the end, wait 0.1 and make it go to label number one. Label number one? We have to label something before we can go to it, right? Go back to right after the Timer event. Aahh, see, it’s become a vicious cycle. Now we have to make it so it gives us points, and when you press the arrow keys, the hammer goes on the corresponding hole. And we also have to make it so when you hit enter, you abort the game.

Make a new parrell process event. Call it “Holes.” In here, make a new fork that says, “If variable ‘Whack-a-mole-buttons’ is equal to 1, then” by using a set event option, set the hero to the first hole. Then below that fork, make a for that says, “IF variable ‘hole one’ is equal to 1, then” make it add one to
variable “score.” Then make it set variable “hole one” to 0, and “Whack-a-mole-buttons” to zero, and wait 0.1. Do the same for 2, and 3. For 4 and 5, do the same, except take away 1 point. For 6 do the same, except add 3 points. In the else case, make it if “whack-a-mole-buttons” is 2, then it goes to the
second hole, and does the score thing, which is the same as you did for hole one, except using variable “Hole Two.” do this for 3 and 4 as well. Then make a new fork that says, “If variable ‘whack-a-mole-buttons’ is equal to 5, then” make it teleport out of the map, turns the hero back to normal, and the variable “score” is set to 0. Under the final else case. Make it “IF variable ‘whack-a-mole-buttons’ is equal to 0, then” have it set the hero back to where they were before they would have moved it. Another words, where they were teleported to when they first entered the game. At the very bottom, wait 0.1. Now you have it set up so when they hit a mole, they get points, and you’ve made it so they can hit a mole in the first place. If it seems to be laggy, add a few wait 0.1 in the parrell process events.

Now it’s time to make prizes. Now go to the second page of the parrell process that makes the moles come out. The make a message displaying the selection of prizes that you win. Then display your points, by making a message after prizes saying, “You scored \\v[x] points. X should be replaced by the number of the variable that variable “score” used. Here is how you would go about giving the prizes.

Let’s say you have 10 points. Prizes, are 5 coins gets you 10 coins, and 20 points gets you 40 coins. Since you have 10 points, and can only get a prize once each time, you would have a fork that says, “IF variable “score” is above 5, then” below it have, “IF variable “score” is below 20,” make your hero receive 10 coins. Simple huh? Yeah.

So that’s all there is to making a whack-a-mole game for your RPG.

Good Luck!
“Even the greatest gamers were n00bs.”