Gw Temp


Tutorial - 'Camera System' by Spikey_2002

An item about RPGMaker 2000 posted on


Learn how to create a camera system in RM2K!


This is my first tutorial, have any of you guys every wanted to have your own camera?

well let me put it this way, this is a useful little piece of code.

This code lets you purchase a camera in the local shop, also film (opptional)

In my game i have used this code to save the exact spot you are standing in and add it to a photo album.
So when you are in a different town for example you can view the photo album and be instantly teleported there.

Creating the camera,
Go into the Database and go to items. Create a new item(let's say Camera), set it's desrciption to whatever you want, and set a price. Make it's use Unlimited and Set the type to "Switch" and create a new Switch called "CAMERA", and select it.

Now, hit Apply, and go under Common Events. Create a new one, call it Camera, and select Paralell Process, and choose the switch CAMERA. Now, into the coding:

Message: Would you like to take a picture?
Show Choice: Yes/ No
Choice: Yes
Which Picture slot?
Input number(1 digit): Photo Slot
Fork Conditions: Photo Slot= 1
Play sound effect:(any sound that sounds like a camera)
Change Variable: Slot1 X= Hero X
Change Variable: Slot1 Y= Hero Y
Change Variable: Slot1 ID= Hero MapID
Flash Screen(white, wait 0.5 sec)
Message: Took picture!
Choice: No
END Case:
Message: Put away camera.
Change Switch: CAMERA off
(Copy and Paste above for every other slot, except variables to new variables for each slot)
(Also, this isn't what you'll actually be seeing when you look at the real code. I just did it this way so it's easier for me to type: )
What this does is when you take a picture, is save the coordinates of your hero into the three variables. When you view the pictures(which you'll learn how to do next), it'll show the exact position in which you were in.
NOTE: If you take a picture in a slot which already had a picture, it will overwrite it.
Now, hit Apply to save your work.

Viewing the pictures,
Create a new item called Photo Album. Set the price and description to whatever you want, make it Umlimited uses, and set the type to Switch, with the switch PHOTO ALBUM.

Now go back to the Common Events, Apply if you want, and create a new Common Event. Call it Photo Album, set it to Parrellel Process, and set the switch to PHOTO ALBUM. Now, for the coding:

Message: View Photo Album?
Show Choice: Yes/No
Yes Case:
Memorize Place: Hero X, Hero Y, Hero ID
Message: What photo slot?
Input number(1 digit): Photo Slot
Fork Conditions: Photo Slot=1
Fork Conditions: Slot1 X=0
Fork Conditions: Slot1 Y=0
Fork Conditions: Slot1ID=0
Message: No picture!
ELSE Case(the last one):
Goto Memorized Place: X= Slot1 X, Y=Slot1 Y, Map ID= Slot1 ID
Enter Password(Variable: Viewing Pictures): 5:Choose
Fork Conditions: Viewing Pictures=5
Goto Memorixed Place: Hero X, Hero Y, Hero ID
Fork Conditions:(the rest of the photo slots, just Copy and Paste and change the variables)
No Case:
END Case:
Message: Put away Camera
Change switch:PHOTO ALBUM off

Film: You can make it so you have to buy film to use the camera just add this after the Yes case in choosing to take picture:

Fork Cinditions:(hero) Film have
Change Item: Film 1 Decrease
(enter all code up to END case here)
ELSE case:
Play sound effect: Failure2
Message: No film

(Although i can do this, this code is copyright of Jawa Podracer)

But i thought you guys might appriciate it ;)