Gw Temp

Menu

Tutorial - 'Cardboard Box System' by ATARI

An item about RPGMaker 2000 posted on

Blurb

Liked that Cardboard Box Solid Snake used? Why not put it in your game?

Body

Hello Folks! It’s ATARI again. This time I’m going to talk about how to create a cardboard box system in your RPG.

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

So what exactly do I mean when I say “cardboard box system?” Well, If you don’t know, you probably won’t know, until you’ve played any of the Metal Gear Solid games. Here is a visual example of the cardboard box system.




What it basically is, is that when you have a cardboard box equipped, you can hide under that box, and if an enemy spots you, they only think that it is a cardboard box, and they leave you alone, unless it moves. This also applies to security cameras. Sneaky huh? Well, let’s get started.

First of all, get yourself a character set resource that has a cardboard box, and make sure that it is animated. If you do not have this, spend the time on creating it. I’m sure you can find a character set of it using google pretty easily though.

Once that is done, make a new map. Make it’s size 20 x 15. At the top, create a wall that stretches through the whole map width wise, and is only 2 tiles high. Somewhere on the top of this wall, create a new event. Name the event, “Security Camera.” Make its graphics that of a security camera facing straight out. Now, make a second page to this event. Make it’s starting condition switch be that of a new switch called “SCLeft.” Have its graphics be of that of a camera facing the left.

Next, create a new event that is two below the wall, directly across the camera. Name this event “Security1.” Make it’s starting condition be “On Hero Touch.” Next, create a new page, and have it be a push key event, and have its starting condition switch be that of a switch recently created called “SCLeft.” Next, create another event that is right beside it. Name it “Security2” and have it be a push key. Next, create a new page in that event. Make this pages starting condition be “on hero touch” and have its starting condition switch be “SCLeft.”

Now in the event commands of the recently created new page of the event you just made, make it turn on a new switch called “alert.” You can work a simple alert system with this. (Please note that in the actual game when you use this, you will have to make a better way of alerting than what is used later, like a picture popping up, or something cool like that. Maybe, messing with an MGS style radar at the top!) Next, create another new page in this event, and have it be on hero touch as well. Have its starting condition switch be “SCLeft,” and “BoxEquip.” Have it do nothing in here. Go back to “Security1” and create a new page, with the starting condition switch of “BoxEquip.” Have nothing in there as well.

Next, create another push key event on the map. Have its graphics be that of the cardboard box. Have it set “1” to the variable “Boxcount.” Hit the okay button. Now create a new parallel process event off to the side somewhere. Name this event “BoxCommands.” In here, create a new password command that goes into the variable “BoxButton.” Choose the box that says “(5)” and do not check anything else. Hit the okay button. Below this event, make a new fork command. Have it say “IF variable ‘boxcount’ is equal to ‘1,’ then” directly below that fork (not in else or end case) put in another fork condition that says, “IF switch ‘BoxEquip’ is set to OFF, then,” then put another fork in that says, “IF variable ‘BoxButton’ is equal to ‘5’, then” turn the switch “boxequip on.” In the else case, have make a fork that says, “IF switch ‘BoxEquip’ is set to ON,” have it turn off the switch “Boxequip.” Leave the next else case blank. In the end case, put in a wait 0.1 seconds event. Hit the apply button.

Next, go into your database and create a new common event. Name this event, “Cardboard Box Graphics.” Have it be a parallel process. Make the starting condition switch be that of “Cbox GFX check.” Put in a fork condition that says, “IF switch ‘boxequip’ is set to ON then” below here, put in a “change hero graphics” event. (May not be the exact name. In RM2k3 it is “change hero sprite association.”) Change your main characters graphics from that of what he/she is normally, to that of the cardboard box. In the else case, put in an event that changes your hero’s graphics back to that of what they would look like normally. Don’t forget to have there be somewhere that turns off the “Cbox GFX check” switch when you want to change your hero’s graphics to something besides a cardboard box elsewhere in your game.

Now go back to your map and create a new auto start event. Have it turn on the switch “Cbox GFX check.” Next create a new page. Have its starting condition be push key, and have its starting condition switch be the switch you have just used.

Create another parallel process event on this map. Name it “Cardboard Box Movement.” Have its starting condition be that of “Cbox GFX check.” The first thing you want to put in is a password command. Choose the box for “(1,2,3,4)” and have it’s variable be “BoxMove.” Check nothing else and hit the okay button. Below that, put in a memorize hero position event. Use the variables “CardboardBoxX,” “CardboardBoxY” and “CardboardBoxID.” Put the ones that fit in the right spots. Hit the OK button to this event.

Now go to your map, and click on your “security1” event. Now go to the bottom of RM2k3 screen and record the X and Y coordinate of the event. Do the same with the “Security2” event. If you have no idea where to look, look at the example picture below. (Do not use the coordinates given in the picture. They may not be the same as yours!)



Next, go back to the Auto Start event you made earlier. In here, above where you turn on the switch “Cbox GFX check,” put in a new variable event. Name the variable “Sc1X.” Set its value to that of “Security1’s” X coordinate. Do the same for it’s Y coordinate with variable “Sc1Y.” Next, with “Sc2X” and “Sc2Y” do the same. It should be those four events, and below that, the switch event.

Now go back to “Cardboard Box Movement” and below the memorize hero position event, put in a wait command for 0.1 seconds. Put in a new fork condition. Have it say, “IF variable ‘Sc1X’ is equal to ‘CardboardboxX’, then” directly below that fork condition (not in else case or end case, as usual) put in another fork condition that says “IF variable ‘Sc1Y’ is equal to ‘CardboardBoxY’, then,” have nothing below that. In the else case, put in a new fork condition that has that has two identical fork conditions as above, and then put in a fork condition that says, “IF variable ‘BoxMove’ is Greater Than Or Equal to ‘1’, then” and directly below that “IF variable ‘BoxMove’ is Less Than Or Equal to ‘4,’, then” have it turn on the “alert” switch. Basically, if you move and the camera is on you, then you alert.

Now under the else case of this, make a fork that says, “IF variable ‘Sc2x’ is equal to ‘CardboardboxX’, then” directly below put “IF variable ‘Sc2Y’ is equal to “CardBoardBoxY’, then” have nothing under here. Under the else case, have two forks the same as the two you just made, and add the 2 forks that go with “BoxMove” like used before. Once more, have it set off the alert switch. Under the end case, have it wait 0.1 seconds. Hit the apply button and then the OK button.

Next, we have to make the camera move. Put in another pararlell process event. Name your new parallel process event, “Camera Move.” Put in a wait 15.0 seconds event, and then turn on the switch “SCLeft.” Then put in another wait 15.0 seconds event, and turn off the switch “SCLeft.” Your camera event should change direction, thus making it moveable.

Finally, create another parallel process event. Name this event “Alert.” Put in a new fork condition that says, “If switch ‘alert’ is on then,” below, have it do whatever you want for an alert. I just put in a picture event that shows and alert somewhere. You can use a system that sends guards after you, that you lose life, or whatever you want. Leave the else case blank, and put in a wait 0.1 seconds in the end case.

So there you go! Now you have a fully functioning cardboard box system! Remember that you can expand and add-on to this tutorial’s basic engine as much as you like, and are possibly able to with your knowledge of the program!

Remember,
“Even The Greatest Gamers were n00bs.”
- ATARI