Gw Temp


Tutorial - 'Chaff Grenades' by ATARI

An item about RPGMaker 2000 posted on


Making Chaff Grenades in Your RPG? Well sure!


Hi folks! It’s ATARI again! This time I’m going to talk about how to make chaff grenades in your RPG! Please note that this tutorial was written using rm2k3, so some functions are not available in rm2k that are used in this tutorial.

Things you will need to know to use this tutorial.
1. Switches
2. Variables
3. Password Commands
4. Fork Options
5. Pictures

So what exactly do I mean, when I say “chaff grenade?” Well, most likely most of you who are reading this know what a chaff grenade is, but for those of you who don’t know, and are curious what it is, I will explain what is basically is.

A chaff grenade is sort of like a mini EMP shock that is temporary, and doesn’t cause permanent damage. When you pull the pin, and the grenade explodes, it sends out “chaff”, which causes any appliance in the area that is running in the area to be shut. Some examples of the uses for a chaff grenade would be to disrupt the functionality of security cameras, to jam radar’s, and the works. The picture below is an example of how a chaff grenade could be used.

First of all, create a new map. Make this map the smallest size that you can possibly make it. Next, fill the entire map with all walkable tile. (For example, you could fill it all with grass.) At the top, make a wall that horizontally fills up the whole map, and is 2 tiles high. Next, create a new event at the side of the map. Name this event “security camera,” and make its’ graphics whatever you want. (This tutorial is not going to in-depth about security cameras and such, beyond what is needed, just so you know. If you want to learn more about making security cameras, please visit this tutorial.)

The next thing you want to do, is create another new event on the map. Make the event position under the hero, and name the event “chaff grenade pickup x1.” Set its graphics to that of a box, or something that resembles a chaff grenade. Make its activation, “on hero touch.” Next, create a new variable, and name it “chaff grenades.” Now, the first thing you want to put in the event commands is a fork condition. Have the fork condition say “IF variable “chaff grenades” is less than 5, then.” Make it add 1 to the variable under the fork condition. Next, make it turn on switch “chaff grenade1.” Make a new page to this event, and have everything about it be blank. Now when your hero goes to this, they will have a chaff grenade in their inventory. (If they have already had chaff grenades in their inventory before, they now have one more.) Go back to the first page now. Under the else case, have there be nothing. Basically what has happened, is that you cannot pick up any more than 5 chaff grenades. I do this for simplicity in coding, and because chances are, you aren’t going to need more than 5 at a time, since one takes out all the cameras in the area for a long enough period for you to get away.

Save the game, and open up an image editing program. (MsPaint does fine.) In here, you will need to create some pictures. For the first image, make it look something like (make it better. PLEASE) what I have below.

Now, some of you who know about the picture/variable system, might notice that I put the number with the label. Since you only can up to 5 items, this is fine. However, if you were doing up to 99 or something, you would just make 10 pictures of all the numbers between 0-9, and variable them in. Fortunately, you don’t have to with this small of a number. :D!

Anyway, continue to make 5 more identical pictures. Four of them being from 2-5, and one that displays nothing where the number is shown. (Obviously displayed when you have NONE.) Save them all under your pictures folder for your rpg project so you can use them in your game. Leave the program, and return back to RPGMaker.

Now go back to your map and create a new parallel process event. Name this event, “Chaff Display.” First, put in a wait command that waits for 0.1 seconds at the top of the event. Below that, add a fork condition that says “IF variable “Chaff Grenades” is equal to 1, then,” put in a command to erase pictures 2-6. Then have it display the chaff grenade x 1 picture that you just created by using the show picture event. Make the picture number 1, and have its display spot be somewhere around the coordinates, (270, 205) (That is what worked for me anyway). Then Under the else case of the fork condition, make a new fork that says, “IF variable “Chaff Grenades” is equal to 2, then,” have it erase pictures, 1, and 3-6. Display the chaff grenade x 2 picture at the same coordinates using the picture number 2. Under that else case, put in the code for when “chaff grenades” equals 3 to 5. Remember to erase the other pictures numbers that don’t go with your picture (like 3, don’t erase 3, but 1-2 and 4-6. Etc.). Now, under the else case of the one that equals five, have a fork condition ask if it equals zero. Under that, have it erase pictures 1-5 and display the chaff grenade x 0 picture at the same coordinates. At the end case, have it wait 0.1 seconds. Now it will display the right picture for the corresponding number of chaff grenades that you have.

Next, create another event on the map. Name the event “chaff command.” Make it a parallel process as well. In here, put in a wait 0.1 seconds event. Below that, add a new enter password commands event. Have its input be to the variable “chaff grenade command.” Select only that for (5), and none of the other number boxes. Make sure the “wait until key is pressed” option is off. Below that now, create a new fork condition that says, “IF variable “chaff grenade command” is equal to ‘5’, then” have it wait 1.0 seconds, and then turn on the switch “ChaffLaunch.” Below that then, have it remove 1 from the variable “Chaff Grenades.” In the end case of the fork condition, have it wait 0.1 seconds.

Once more, create another event. Name this event, “ChaffLaunch.” Have its starting condition switch be “ChaffLaunch.” Make it a parallel process. In here now, make it add a new weather effect. Select that of “Sandstorm,” and strength being “weak.” (If this does not show up in the weather commands, please read the note at the beginning of the tutorial.) Then have it wait for 10.0 seconds. Following that, put in another weather effect, this time being that of “none.” (Basically turns off the weather effect.) Then have it turn off the switch “ChaffLaunch.” Now when you have one or more chaff grenades and hit the enter button, and wait a second, a chaff grenade is going to go off for 10 seconds, disabling any security cameras in the area. Next, we have to program the security camera so that it goes off.

Make an on hero touch event in front of the security camera event, on the walkable grass tile. Make it say “Spotted by camera!” or something like that. (See, this a really basic camera! This a tutorial on Security Cameras, if you want to read it.) Now make a new page to this event, with the starting condition switch being “ChaffLaunch.” Have it do nothing in here. Now go to the security camera event, and make a new page, and in the new page, have it’s starting condition switch be that also of “Chafflaunch.” In here, make its graphics that of a security camera being messed up. For example, you could put a light on the camera indicating that something is wrong. (Like on the picture at the beginning of the tutorial on the cameras.)

Now, ignoring my artwork on the camera which was just the rtp blimp being re-colored in 10 seconds, this is what the difference would be with chaff and without chaff.

So, that is basically all that there is to creating a simple chaff system in your rpg! You can expand on this easily, by making the chaff grenade show up when you throw it, make it so that it only affects certain ranges, make a programmable inventory, etc. This is only the basic engine, so feel free to expand. You should, really!

“Even The Greatest Gamers Were n00bs.”