In this tutorial you will learn...|
How to make realistic lookings doors
How to fade an event graphic (kind of a built-in thing)
How to make a complete two-door system
Hi, and welcome to my third advanced eventing tutorial, where I am going to teach you how to make realistic-looking doors using
Move Routes, variables and other things. So, without further ado, let's get going!
Generally, doors are pretty boring - unless you can make them look really realistic. That's hopefully what I'm going to teach
you to do. Firstly, get yourself a blank map, with a wall suitable to sport a door. On the bottom of the wall, double click
and add in an event, with the graphic 170-Door01, like so...
Firstly, let's make the door open when you interact with it. So, double click on your door event, and insert a Set Move Route
command, making sure that your door event is selected in the drop-down menu. Insert the following commands...
Now, add in a Wait For Move's Completation command, and test your door in game. Looking pretty good already, isn't it? If you put
in the first command on the move route, you will notice that this gives the sound effect. Without it, the door seems abnormally
silent. Also, have a play around with the duration of the wait commands and see which value you think looks best. I find that
the door animation looks a bit too quick without any.
So, now we need to make the player move into the door. Go back into your door event, and add another Move Route in, this time
with the player selected from the drop down. In here, we're going to turn the Through option ON, then we're going to Change Speed: 3,
and Move Up once (in case you're wondering as to why we move UP, of all things, it's because when we use this to go inside, the player will be
facing upwards when he's gone indoors and will move one step into the building. You'll see later when I do the other half of the
door system). You should know all these commands from the huge tutorial I did earlier on! Anyway, when that's done, you'll
have something looking like this...
Right. There are just a few more things to add before we're done: the first of which is the player fade. This will make the player
graphic fade out rather than just disappearing. It adds a nice touch of realism - however, there is one catch: it takes quite
a long time to put in! If you're impatient, like me, you can skip down a couple of steps.
Edit the last Move Route event that we've just added, and add a Change Opacity command, with the value set to 225. Then, add a
wait for 1 frame, and then add another opacity change, with the value set to 200. Sensing the pattern? That's right, 25 decrements.
Keep adding in the opacity change and then the wait, and your complete list of door commands should look like this...
Notice that the last wait is 4 frames instead - this is optional, but I think that this works best. Now, try out this in-game. You
should now have a pretty nifty fade! There is one more thing that we need to do before the actual Transfer Player command, and
this is to change the screen to black. After the last Wait for Move's Completation command, add in a Change Screen Tint command.
I went over this in my weather tutorial, so it should be old hat by now - in this instance, just drag all the sliders down to -255
to get the screen to go to black. I set the duration to 15 frames, but it's up to you. See a picture here...
Now, add in a Wait command for the duration that you set in the Screen Tint box - for me, 15 frames. Now we can add the transfer
player command, transferring the player to somewhere else on the same map, to keep it simple. Make sure that the fade option is
set to No - otherwise the manual screen fade will mess up. Here's a picture of my box...
Okay? We have the first part of our door working - but the other half is a lot quicker, so don't worry! After the wait command,
add another screen tint change, changing the tint back to normal with a duration of 15 frames (or whatever you used before), and
then a wait for the same number of frames. Okay? Finally, we need to set the player back to normal opacity. Because this door
will be taking us inside, we don't need to do another fade - just set the opacity back to 255, turn Through OFF, and the speed
back to 4. However, to avoid the player seeing this, we want to do it when the screen is still black. So, just before the second
Change Screen Tone command, add in the commands that I listed. Then, after that, add in a final Wait for Move's Completation - and that's it for the door! See a complete list of commands below...
Phew! That took quite a while, huh? Try out your door in-game. Looks pretty good, doesn't it? Now that we've done the entrance door,
we can make an inside door to take us back outside. This involves quite a bit more eventing, I'm afraid, but it doesn't take as long as the
first door did!
Firstly, make a simple inside map, like so...
Nothing fancy, but we can see clearly where the door will bring us into the room. Head back to your outside map and go into your
door event, and find the transfer player command. Now, change the destination of this to the entrance sqaure of your inside map,
which will be in the top half of the wall. See what I mean here...
Now you know why we changed the transfer direction to up! If it isn't already, make sure that it is up, and the fade option is
No Fade. Okay? Now we can add the indoor event. Add a new event to the sqaure that we just set the transfer destination to, and
put in these commands...
All we're doing here is moving the player down by one sqaure, fading the screen back out again, transferring the player back to
the main map (in case you're wondering which sqaure to transport to, it's the same sqaure that the door event is situated on),
and fading the screen back in. Also, I've created a new variable called Door Close, and set the value to 1. This should be pretty
simple to you advanced eventers! However, you may have noticed that there is no ending wait after the final screen tint change
command, and when we're on the other map, we'll still be invisible. Don't worry - this event is, effectively, in two parts.
For the second part of this event commands, we need to add another bit to our outside door event. Go back to the outside door
map, go into you door event, and
add a new page, set up like this...
Notice the conditions and the trigger? When we exit the indoor map, this event page will automatically run. Now, we just need to
add the final commands into this Autorun page. See here for a list...
These are pretty self-explanitory, really: firstly, fading the player back in (this is exactly the opposite to the fade out
I did earlier), moving the player out of the door, changing the Through and speed settings back to normal and setting a move
route for the door which closes it (again, opposite of the move route I showed you earlier). The final control variable command
stops this autorun page from looping. Voilà! We have a working door system! Test it out and see how it works.
And now you have a very realistic door system! That's about as complicated as doors get - you can just copy and paste these
commands into all your other doors now, with the transfer player commands being the only things needing changing. Oh - and if
you want to use the closing doors on a map with more than one door in screenshot, you might notice that all the doors close at
the same time. Check the Mini Tutorial section of the site for a tutorial on how to fix it.
Well, that concludes my very long door tutorial - I hope that you found it handy. My next advanced eventing tutorial will be on
using timers in events.
:: << Previous Tutorial ::
:: Home ::
:: Next Tutorial >> ::