Gw Temp

Menu

Tutorial - 'Elevators and limited visibilty' by Guest

An item about RPGMaker 2000 posted on

Blurb

A Double Tutorial on Elevator creation, and limited visiblity!

Body

Well, this is my first tutorial but I'll try to explain it as best I can. So here we go:

Elevator Tutorial:

(I've set this up assuming that each floor is also accessible by staircase)
So to begin with, lets say we have 3 floors and we want to be able to travel between them with an elevator. (Lets call them First floor, second floor, and third floor)

Create the maps for each floor with a place to board the elevator on each map. Then create the elevator.

Place a new event somewhere inside the elevator where your character can reach it and give it the graphic of a control panel.

You'll need to create 3 switches.
(for the sake of argument, lets just call them Floor 1, Floor 2, and Floor 3)

So here's the coding:

<>Message: Which floor would you like to go to?
<>Show Choices: First Floor/Second Floor/Third Floor
: [First Floor] Handler
<>Play sound: elevator1
<>Wait: 3.0 Sec
<>Move Event: Hero, Switch OFF [xx:Floor 2], Switch OFF [xx:Floor 3], Switch ON [xx:Floor 1]
<>
: [Second Floor] Handler
<>Play sound: elevator1
<>Wait: 3.0 Sec
<>Move Event: Hero, Switch OFF [xx:Floor 1], Switch OFF [xx:Floor 3], Switch ON [xx:Floor 2]
<>
: [Third Floor] Handler
<>Play sound: elevator1
<>Wait: 3.0 Sec
<>Move Event: Hero, Switch OFF [Floor 1], Switch OFF [Floor 2], Switch ON [Floor 3]
<>
:End
<>

Now, for the teleport event (upon exiting the elevator to ensure that you're brought to the correct floor) Create an event with 3 pages.

On the first page:
Precondition must be set to Switch: [Floor 1] is ON
<>Teleport: XXXX: First Floor (xxx,xxx), Retain Facing

Second page:
Precondition must be set to Switch: [Floor 2] is ON
<>Teleport: XXXX: Second Floor (xxx,xxx), Retain Facing

Third page:
Precondition must be set to Switch: [Floor 3] is ON
<>Teleport: XXXX: Third Floor (xxx,xxx), Retain Facing


Thus, with each respective switch activated you'll be teleported to the correct floor upon leaving the elevator.
(The sound effects and wait period only add to the illusion that you're actually on an elevator)

For each floor, when you board the elevator, you'll need to create these codes:

For the first floor:
Make a teleport event to send your character to the elevator and then add this coding

<>Move Event: Hero, Switch OFF [Floor 2], Switch OFF [Floor 3], Switch ON [Floor 1]

Create a teleport to the elevator on the second floor:
<>Move Event: Hero, Switch OFF [Floor 1], Switch OFF [Floor 3], Switch ON [Floor 2]

And the third:
<>Move Event: Hero, Switch OFF [Floor 1], Switch OFF [Floor 2], Switch ON [Floor 3]


And that's it for the elevator~
Feel free to customize it anyway you want by adding more floors, changing the sounds, messages, etc.



Part 2: THE LIMITED VISIBILITY

Have you ever played a game where your character is in a very dark room and they are only able to see a few squares in front of their face?

Here I will teach you how to add this effect to your RPG.

What you need, very basic concepts of switches and a basic knowledge of photoshop.

To begin, you must create 3 images in photoshop...

Be sure to make the canvas 480 x 256.

Fill in the background with all black. Set up guides to find the perfect center of the circle. Then erase a reasonable amount. (For this example I used an eraser of size 90, 100, and 110)

Create 3 images, each with a hole at the center bigger than the one before it.
When you complete each image, go to File, Save for Web.

Save them each as a PNG-8, with transparency (Noise Transparency).

Now that you've got your graphics out of the way, lets take care of the animation. (Name them something like, Hole 1, Hole 2, Hole 3 )

Open up RPGmaker and create a new event on the page.
Make it a parallel process below the hero.

Now to begin the actual coding.
<>Label: 1
<>Show Picture: 1, Hole 1, (160,120)
<>Wait 0.5 Sec
<>Erase Picture: 1
<>Show Picture: 2, Hole 2, (160,120)
<>Wait 0.5 Sec
<>Erase Picture: 2
<>Show Picture: 3, Hole 3, (160,120)
<>Wait 0.5 Sec
<>Erase Picture: 3
<>Show Picture: 4, Hole 2, (160,120)
<>Wait 0.5 Sec
<>Erase Picture: 4
<>Show Picture: 5, Hole 2, (160, 120)
<>Erase Picture: 5
<>Jump to Label: 1
<>


Now let me explain this code...
You are, effectually creating an animation by showing pictures at a timed rate (like a flip book, duh).
By having the pictures show up in the order 1, 2, 3, 2... it looks like the light is fluctuating.
IMPORTANT: At the end you might notice I have the event show picture 2, twice in a row.
This is not an error, It is done as a safety percaussion. I noticed that without that it is left with a lag sometimes and the animation glitches and reveals your entire map. So just copy the code in its entirity and you'll be fine.


Anyway, I made this tutorial as specific as humanly possible and if you still don't understand. Sorry.


--Miller