iPhone App Directory
RPG Maker VX
 
Gallery Members Search Calendar Help


Welcome Guest ( Log In | Register )

Collapse

>Announcement

Keep an eye out for the upcoming 3rd Quarter Contest!

> Note for Tutorial Threads

New threads (tutorials) here will go into a moderation queue. You will not see your thread appear when you create it. A moderator will decide if it will be approved or denied.

 
Reply to this topicStart new topic
> [-Eventing-] Moving a Player Through a Door Using a Move Route, A Beginner's Quick-and-Easy Specialized Tutorial
Sharpe
post Aug 8 2011, 07:44 AM
Post #1



Group Icon


Type: Writer
Alignment: Lawful Good




This short, specialized tutorial started off as a question for the forum, but as I typed it, I figured out my own answer.

Instead of simply deleting the post, I edited and greatly expanded it to turn it into a tutorial. After all, Google returned page upon page of people posing this very same question on the RPGMakerVX.net forums, so I figured this might be of some help.

Being a newbie myself, I am well aware how hard finding answers can be. I have roughly three weeks of experience with RPG Maker VX.

This is my first tutorial. I wrote it for two reasons. The main reason is to help new users. The secondary reason is to practice writing tutorials.

That all said, let's begin! smile.gif


Moving a Player Through a Door Using a Move Route

This tutorial will explain how to make a player walk through a door using the Set Move Route Event command. This usually happens during a cutscene.

This click-by-click tutorial is for complete and total beginners.

People using this tutorial will almost always have their maps already created. If that is the case, you can skip to Step #2.

If you have a strong grasp of the basics and are just seeking a quick answer, skip to the CliffsNotes section at the end.

Introduction

Using the Move Route in tab 3 of the Event Commands, my intentions were to have my player leave home, walk through town (two maps) and then through a door to the inn and be transferred inside like normal.

I got stuck trying to get the player to walk through the door.

As expected, with Through OFF in the Move Route, the player just stands at the door without opening or walking inside. The autorun event just waits and the player can't do anything.

Like I say, this is what I expected to happen. After all, Transfer Events didn't work for me while the autorun Move Route event is moving the player, so I had been making the autrorun event transfer the player and play the sound effect when he gets to where the Transfer Event is on the town map. That worked fine.

But, I couldn't figure out how to make the door "open" and the player walk inside...

So, I searched. I came to this reply in 2009:

QUOTE (Cylindrical @ Sep 30 2009, 01:15 AM) *
What you need to do is open the door using set move route


While correct, it's a little more complicated than it sounds. There is no "open door" button in the Move Route's Movement Commands. Doors operate with a rather complex system of Move Commands.

Here's an easy way to make it work.

Step #1:

This entire step can be skipped if you've already drawn your map and placed your doors. This is all complete and total beginner stuff.

Using a mixture of standard tiles and Mack tiles, I started with a 17x13 map (the smallest possible) and filled it with grass. Then, I drew a little house and put a black space in the center of the wall to represent the door's threshold. You can make something like I did:

Spoiler:


Now that we have the outside done, we need to make another map for the inside of the house.

Transfer Events, including door Events, usually take the player from one map to a different one. In this tutorial, we'll transfer the player from the outside map to the inside map.

To create the second map, right click on Map001, the outside map, and click on "New Map." Then, clicked "OK."

Then, draw the inside of the house. Here is what I drew:

Spoiler:


Now that we have both our maps, it's time to make the door that will transport the player form the outside map to the inside map.

Left-click on Map001 to select it.

Then, switch from the Map Editor to the Event Editor by clicking on the red 'Ev' button up at the top. After that, right-click on the space where you placed the black square, then mouse down to Quick Event Creation and over to Door and and left-click on it.

Spoiler:


That opens a New Door Event window.

Now, click on the "..."

Spoiler:


Then, click on Map002 to select the inside map. To set the destination of the door transfer event, click one space into where you want your entrance to indoors map.

Spoiler:


Click OK twice.

Now we're ready to make our mini-cut scene!

Step #2:

While (still) in the Event Editor (the red 'Ev' button up at the top), Move your Player Start event straight down six spaces from your door. To do so, you can click and drag the event down. There should now be five empty spaces between your Player Start Event and the door.

Now, let's make the event that will move the player up and through the door. smile.gif

Anywhere on the map out of the way, right-click and click on "New Event."

Spoiler:


This will bring up a New Event window.

At the bottom of this window, change the Trigger from Action Button to Autorun. This will make the Event run as soon as the player enters the map. The player will be unable to do anything until the autorun Event is finished.

Right-click on the first line under Event Commands beside the @> symbol and click on Insert.

Spoiler:


Double-clicking accomplishes the same goal as right-clicking and clicking on Insert. wink.gif

This will bring up the Event Commands window.

Click on Tab 2. Under the Movement section, click on the Set Move Route button.

Spoiler:


Since there are five spaces between the player and the door, we want to move up five times.

But first, since the player will have to move "through" an Event, the Event being our Door Event, you'll have to turn Through ON. Click that button.

Then, click the Move Up button five times.

Spoiler:


Notice I circled "Player" in the above picture. The player is basically considered an Event for Move Route purposes. If you wanted to move something or someone else, you would use that drop-down menu to select a different Event, such as an NPC's Event.

Great! Now, click OK twice.

Save and playtest the game. To playtest a game, click the little green "play" arrow up at the top.

As soon as you start a new game, the autorun Event should begin and your player should walk right through the building! You shouldn't be able to do anything because we didn't set the Event to turn off when completed. We'll cover how to do that in the next step.

Note: Basically, since we left Through ON and since we didn't turn the Event off, the player goes right through the building and just keeps trying to walk up five steps over and over, but the door is blocking his path. So, the autorun Event never completes and thus never stops running.

Once you're done testing, we're ready to make the player walk through the door! smile.gif

Step #3:

Right-click on your door Event and click on "Edit Event."

This will bring up the Edit Event window.

All Events have names listed in the upper-left corner of the window. I circled where Event names are located in the below picture. If you're following this tutorial from the beginning, your door Event should be called "EV001." You need to remember the name of your door Event for later in this step.

Now, we need to copy most of the code in the Event Commands section to put in our autorun Event to make the door open, close and transfer the player inside the building when the player reaches the door.

Left-click once on the first command line in the Event Commands section to select it. Then, holding the shift key down on your keyboard, click the last line of the Set Move Route command. It should be the line right above Control Self Switch: A =ON. This will select all the command lines we need to copy.

Right-click on any one of the selected lines and click on copy.

Spoiler:


Click on OK.

Now that we have the code copied, we need to paste it into our autorun Event.

Right-click on the autorun Event and click on Edit Event.

Right click below the last line of your Set Move Route command beside the @> symbol and click on paste.

Your Event should look like this:

Spoiler:


But, there's a problem with the new Set Move Route code you just pasted into your autorun Event. Since you pasted it from the door Event, it -- how should I put this -- it refers to itself in the first person. It says, "Set Move Route: This event." However, we don't want to move the autorun Event. Since there is no graphic associated with it, it's invisible to the player and it would be pretty well pointless to move it!

We want the door Event to move. "Move" in this case being "open." wink.gif

To make that happen, right-click on the first line of the new Set Move Route code we just pasted into the Event and click on Edit.

In the drop-down menu in the upper-left corner of the window, change "This event" to the name of your door Event. If you've followed the tutorial from the beginning, your door Event will be called EV001.

Spoiler:


Click on OK.

We're not quite done yet. We still have to go back and get the second half of the door code.

Almost there! smile.gif

Let's get the second half of the code. Right-click on your door Event and click on "Edit Event."

Click on Tab 2 (see below picture). Now you should be looking at the Event's second page. We'll talk more about Event pages later.

Left-click once on the first command line in the Event Commands section to select it. Then, holding the shift key down on your keyboard, click the Transfer Player line of code. It should be the line right above Control Self Switch: A =OFF. This will select all the command lines we need to copy. Right-click on any one of the selected lines and click on copy.

Spoiler:


Click OK.

Once again, Edit your autorun Event and paste what you just copied into the last line of the Event Commands the same way you did last time.

This time, we don't have to change anything.

However, we do still need to turn Through OFF.

Double-click on the last line under the Event Commands section beside the @> symbol to bring up the Event Commands window.

Under Tab 2 in the Movement section, click on the Set Move Route button. Click on the Through OFF button and click on OK.

We could finish the tutorial here. If you save and playtest, everything should work just fine. Your player will walk up to the door, open it, walk in and be transported inside your building.

However, we need to stop the Event from running. Otherwise, every time your player enters the map with the autorun Event, it will activate. Not good!

Step #4 (Optional)

It's quick and simple to turn off an Event for the rest of the game. But first, you should understand a bit about Event pages.

Remember that earlier, we went to the door Event's second page?

Events read their pages from right to left, the opposite way a book written in English is read. So, events on the second page are read before events on the first page.

If the Event sees nothing on its second page that it needs to do, it will basically ignore its contents and continue to the first page.

Let's put that information to practical use and make the Event turn itself off once it's finished running.

Double-click on the last line under the Event Commands section beside the @> symbol to bring up the Event Commands window.

Under Tab 1 in the Game Progression section, click on the Control Self Switch button.

Spoiler:


This is a pretty important button. As you become more familiar with Events, you'll probably be using this button often.

It brings up this window:

Spoiler:


As you can see, by clicking OK, you're turning Self Switch A on.

Next, we're going to make the Event read Page 2 if Self Switch A is on. Also, we're not going to put anything on Page 2. This effectively makes the Event totally blank while Self Switch A is on. While it doesn't delete the Event, it effectively makes it do absolutely nothing. This all should become clear as you work through the rest of the step.

First, well have to make the new Event Page.

To do so, simply click the big, square New Event Page button up at the top of the Event's window.

Then, under the Conditions section on the left, put a check mark beside Self Switch. The drop-down menu will become active and 'A' will already be selected.

Spoiler:


This means that under the condition that Self Switch A is ON, the Event will read this page. Since we have nothing on the page, it's done doing anything. Moments ago, you'll recall, we had the Event turn Self Switch A as the last thing it did.

Click back to the Event's first page and look it over. It should look like this:

Spoiler:


Click OK and you're done!

Save your game and playtest it. Everything should work perfectly!

Thanks for reading and I hope you found this tutorial helpful. smile.gif


CliffsNotes

  1. In the player's Move Route, set Through to On, then set the Move Route to end at the space right before the door. In other words, if there are five empty spaces between the player and the door, click the Through ON button then the Move [Direction] button five times.
  2. Copy and paste all of the door's code from both pages other than the Self Switch ON/OFF lines to below player's move route. After copying and pasting from the door event's first page, you must change the Move Route's control from "This event" to instead point to the door event's name (e.g., "EV001").
  3. Turn Through OFF.

Here's the Event code I used to move my player up five spaces, then walk through the door:



Again, thanks for reading! I hope someone finds help from this tutorial. smile.gif


--------------------
My first tutorial: Moving a Player Through a Door Using a Move Route

"I give thee now a chance to share this world and to rule half of it
if thou will now stand beside me.
"What sayest thou?
"Will the great warrior stand with me?"

--The Dragonlord, Dragon Warrior, 1989.
Go to the top of the page
 
+Quote Post
   
kingsofrpg
post Aug 10 2011, 07:47 AM
Post #2



Group Icon


Type: Designer
Alignment: Chaotic Evil




I suppose this could potentially help us answer some of the newcomers questions quicker in the support topic


--------------------
Variable/Game_Interpreter Fix
Spoiler:

Proud Puzzle Maker of "Relic"


CODE
dont_hate_the(player) unless player.is_a?(Game_Enemy)
Go to the top of the page
 
+Quote Post
   
Madmadman
post Aug 10 2011, 09:09 AM
Post #3



Group Icon


Type: Writer
Alignment: Chaotic Neutral




The only thing that would confuse me if i were new would probably be why you have to move the door to "open" it.
Explaining how these sort of events movements work might be helpfull if
someone is wondering how to for example close the door again if the cutscene still goes on afterwards.
Other than that it's very step by step so if someone is wondering how to make someone go through doors, even with no experience whatsoever, your tutorial should certainly be of help.
Go to the top of the page
 
+Quote Post
   
Piyan Glupak
post Aug 10 2011, 07:28 PM
Post #4



Group Icon


Type: Undisclosed
Alignment: True Neutral




Thank you very much, Sharpe. I found this extremely useful for my introduction. (Yes, I am very new with RPG Maker VX.)
Go to the top of the page
 
+Quote Post
   
Sharpe
post Aug 10 2011, 09:44 PM
Post #5



Group Icon


Type: Writer
Alignment: Lawful Good




QUOTE (Madmadman @ Aug 10 2011, 04:09 AM) *
The only thing that would confuse me if i were new would probably be why you have to move the door to "open" it.
Explaining how these sort of events movements work might be helpfull if someone is wondering how to for example close the door again if the cutscene still goes on afterwards.

You mean, leave the door open? Yeah, I thought of that too as that seems to be one of the questions asked on here.

Thing is, I'm not experienced enough to write those into my tutorial without testing. I don't exactly understand how the doors work well enough to put it into words, but with just a bit of testing I could figure it out.

But, I agree that I should explain that part better. Another version might be in order.

QUOTE (Piyan Glupak @ Aug 10 2011, 02:28 PM) *
Thank you very much, Sharpe. I found this extremely useful for my introduction. (Yes, I am very new with RPG Maker VX.)

You're welcome.

Did you get stuck on any parts?

Was anything at all of use to you in Step #1?

Thanks.


--------------------
My first tutorial: Moving a Player Through a Door Using a Move Route

"I give thee now a chance to share this world and to rule half of it
if thou will now stand beside me.
"What sayest thou?
"Will the great warrior stand with me?"

--The Dragonlord, Dragon Warrior, 1989.
Go to the top of the page
 
+Quote Post
   
Piyan Glupak
post Aug 11 2011, 04:57 AM
Post #6



Group Icon


Type: Undisclosed
Alignment: True Neutral




QUOTE (Sharpe @ Aug 11 2011, 12:44 AM) *
Did you get stuck on any parts?

Was anything at all of use to you in Step #1?


Didn't really get stuck - I thought your explanations were very good, although at one point I was using the wrong event number to try to open the door. Your tutorial clearly stated that you have to check the correct event number and use it, so that was my error. Duh!

banghead.gif

Although I had created the maps already, Step #1 did show the context of what you were describing, so yes, it was of use to me.

Thanks again.

This post has been edited by Piyan Glupak: Aug 11 2011, 04:58 AM
Go to the top of the page
 
+Quote Post
   
kingsofrpg
post Aug 11 2011, 06:14 AM
Post #7



Group Icon


Type: Designer
Alignment: Chaotic Evil




Something to add, it's easier to name your door event something like "Door" so it's easier to identify when you do the set move route for it. Otherwise you have to memorize a number and when your map has like, 40+ events it becomes fairly difficult


--------------------
Variable/Game_Interpreter Fix
Spoiler:

Proud Puzzle Maker of "Relic"


CODE
dont_hate_the(player) unless player.is_a?(Game_Enemy)
Go to the top of the page
 
+Quote Post
   
Sharpe
post Aug 12 2011, 05:09 AM
Post #8



Group Icon


Type: Writer
Alignment: Lawful Good




Thanks, everyone, for your replies.


--------------------
My first tutorial: Moving a Player Through a Door Using a Move Route

"I give thee now a chance to share this world and to rule half of it
if thou will now stand beside me.
"What sayest thou?
"Will the great warrior stand with me?"

--The Dragonlord, Dragon Warrior, 1989.
Go to the top of the page
 
+Quote Post
   
Done off
post Aug 15 2011, 04:04 PM
Post #9



Group Icon


Type: Undisclosed
Alignment: Unaligned




Thanq's a lot!I needed to do such things! smile.gif


--------------------
Crocococodile says welcom!
Go to the top of the page
 
+Quote Post
   
Piyan Glupak
post Aug 16 2011, 03:55 PM
Post #10



Group Icon


Type: Undisclosed
Alignment: True Neutral




Have a feeling that I might have solved shutting the door. Don't know whether or not it is the most correct or most efficient method, but at least it shuts it.

Spoiler:
@>Set Move Route: [Party Bedroom Door] (Wait)
: : $>Direction Fix OFF
: : $>Turn Left
: : $>Wait: 3 frames(s)
: : $>Turn Left
: : $>Wait: 3 frames(s)
: : $>Turn Down
: : $>Wait: 3 frames(s)
: : $>Direction Fix ON


The party had to go up through the door.
Go to the top of the page
 
+Quote Post
   
kingsofrpg
post Aug 16 2011, 07:41 PM
Post #11



Group Icon


Type: Designer
Alignment: Chaotic Evil




We know how to close the door tongue.gif.... Well most of us do....


--------------------
Variable/Game_Interpreter Fix
Spoiler:

Proud Puzzle Maker of "Relic"


CODE
dont_hate_the(player) unless player.is_a?(Game_Enemy)
Go to the top of the page
 
+Quote Post
   
FelixOfVicis
post Sep 4 2011, 08:25 PM
Post #12



Group Icon


Type: Undisclosed




What if you took the door and told it to move the player through on the second page. Should look something like this...

Set Move route: Player (skip, wait)
_____Through ON
_____Step forward
Play sound effect
Transfer to map
Set Move route : Player (wait)
_____Through OFF
Self Switch A = OFF

Instead of having another object control the door, have the door control the player.
Go to the top of the page
 
+Quote Post
   
Dark Tower
post Sep 18 2011, 11:01 PM
Post #13



Group Icon


Type: Spriter
Alignment: Unaligned




QUOTE (Sharpe @ Aug 10 2011, 10:44 PM) *
You mean, leave the door open? Yeah, I thought of that too as that seems to be one of the questions asked on here.

Thing is, I'm not experienced enough to write those into my tutorial without testing. I don't exactly understand how the doors work well enough to put it into words, but with just a bit of testing I could figure it out.

But, I agree that I should explain that part better. Another version might be in order.


You're welcome.

Did you get stuck on any parts?

Was anything at all of use to you in Step #1?

Thanks.

maby its because when you go to a new map the self switch resets itself.If you do a regular switch it stays as it is.
Atleast i think thats how it works....

This post has been edited by Dark Tower: Sep 18 2011, 11:05 PM
Go to the top of the page
 
+Quote Post
   
Celianna
post Sep 19 2011, 05:28 PM
Post #14



Group Icon


Type: Artist
Alignment: Chaotic Evil




^No, that's not how it works. Self switches don't reset.

Using an erase event command resets the events upon re-entering the map.
Go to the top of the page
 
+Quote Post
   
Dark Tower
post Sep 21 2011, 05:52 PM
Post #15



Group Icon


Type: Spriter
Alignment: Unaligned




What I ment was how when you make a door the pre-set has the set up for turning off sef switch a.
and that you can use a regular switch to tell the event to have the door open when you exit the map.
Sorry iv never been verey good at explaining my ideas.... biggrin.gif
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 29th August 2014 - 01:11 PM

RPGMakerVX.net is an Privacy Policy, Legal.