Gw Temp

Menu

Tutorial - 'Mirrors' by Scooby Dood

An item about RPGMaker 2000 posted on

Blurb

A nice tutorial on how to make a mirror in Rm2k

Body

This is my first tutorial. I think you'll like it. This tutorial tells you how to create mirrors that actually show your hero's reflection. For this tutorial you'll need to know:





1. Switches


2. Variables


3. Enter Password


4. Common Events


5. Fork Conditions





The first thing we need to do is create seven switches and one variable. We'll name these as follows:





-Switches:


1. Mirror


2. Facing Down


3. Facing Left


4. Facing Right


5. Facing Up


6. Walking


7. Mirror Room


-Variables:


1. Facing





Next we need to make a Common Event called Mirror. Set it to Parallel Process. In order to cut down on lag, set the Appearance Conditions Switch to Mirror Room. You will turn it on when the hero enters a room with a mirror, and turn it off when the hero leaves that room. Now for our Common Event:





Enter Password: [0001:Facing]





(If you don't know what Enter Password is, you need to check out another tutorial, because it is an essential part of this one.)





FORK Optn: Varbl[0001:Facing] - 1


-Change Switch: [0002:Facing Down] OFF Set


-Change Switch: [0002:Facing Left] OFF Set


-Change Switch: [0002:Facing Right] OFF Set


-Change Switch: [0002:Facing Up] OFF Set


END Case





All four Fork Conditions do the same thing, you just change the number of the variable each time, like this:





FORK Optn: Varbl[0001:Facing] - 2


-Change Switch: [0002:Facing Down] OFF Set


-Change Switch: [0002:Facing Left] OFF Set


-Change Switch: [0002:Facing Right] OFF Set


-Change Switch: [0002:Facing Up] OFF Set


END Case





FORK Optn: Varbl[0001:Facing] - 3


-Change Switch: [0002:Facing Down] OFF Set


-Change Switch: [0002:Facing Left] OFF Set


-Change Switch: [0002:Facing Right] OFF Set


-Change Switch: [0002:Facing Up] OFF Set


END Case





FORK Optn: Varbl[0001:Facing] - 4


-Change Switch: [0002:Facing Down] OFF Set


-Change Switch: [0002:Facing Left] OFF Set


-Change Switch: [0002:Facing Right] OFF Set


-Change Switch: [0002:Facing Up] OFF Set


END Case





This may seem useless, but it's actually very important. You'll see why in a minute.





The next thing we need to do is create our room in which the mirror will be located. A mirror that is two chips high and one chip wide is best. That way you won't have to make a special charset for the mirror. (If you want a hanging mirror, just cut your hero's charset in half and save it as "mirror_char" or something like that. You want to keep the top half.)





After you've made your room, we need to create the mirror event. Place this event right on top of the lower chip of your mirror. The event should have four pages, and each one should have your hero's charset facing a different direction. The first page will have your hero facing down. The event conditions should be: (1) Switch: Mirror and (2) Switch: Facing Up. The Mirror switch will be the same on all four pages, but the second one will change with each page. Next, set the Event Start Condition to Parallel Process, the Position to Same Level as Hero, the Animation Type to Common/With Stepping, and the Movement Speed to 6. x4 Faster.





The Event Condition "Switch: Mirror" ensures that the reflection only appears when the hero is in front of the mirror, and the second conditions makes sure the reflection is facing the right way. Here is what the event should do:





Wait: 0.1s


Move Event...: this Event, Stop Anim.


FORK Optn. Switch [0006: Walking] - ON


-Move Event...: this Event, Resume Anim.


-Wait: 0.1s


-Change Switch: [0006: Walking] - OFF Set


END Case





This Fork Condition ensures that the reflection in the mirror is only walking when the hero is walking in front of the mirror. The other three pages of the event will be exactly the same, except you will change the graphic to a different direction and change the second Event Condition to match the direction. Now I will show you how to activate the mirror.





This is the easiest part of the tutorial. First, make a transparent event with a Position of Below Hero and a Start Condition of On Hero Touch. Place it right in front of your mirror. The event should say:





Change Switch: [0001: Mirror] - ON Set


Change Switch: [0006: Walking] - ON Set





Next, copy this event and paste it on every space from the mirror to the southern wall of the room. You should have a vertical line of events from the top to the bottom of the room. When the hero steps on this event, it tells the game that the hero is in front of the mirror, and the reflection should appear. The "Walking" switch is activated, making the reflection walk. The reflection then turns the switch off, so it stops walking. If the hero steps toward or away from the mirror, the process repeats. This way the reflection is only walking when the hero is. (Look back to the reflection event to see exactly how it works.)





We're almost done! All we need to do now is create a transparent event (On Hero Touch, Below Hero) that turns the switch "Mirror" off when the hero touches it. Copy this event and place it on both sides of the event we just made. You should now have three vertical lines of events. As you can see, this event makes the reflection disappear when the hero is not in front of the mirror. Well, that's it! I hope you liked my first tutorial.