Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Interior Doors

I had been looking for a script that you could use to make a simple door inside a building that doesn't transfer you anywhere... it just opens and lets you in. Well since I never could find one that I liked I developed my own.

I have made 5 types of these doors. First one just opens when you use the action button, opens lets you through then closes back. 2nd and 3rd one takes a key to open, then either deletes the key from your bag or doesn't, then functions as door #1. 4th and 5th is a door that takes a key from your bag or doesn't, then deletes it's self.

Okay this first door is a 2 page event door. On the first page you need to have a picture of the door you want to start. Set your priority to same as character, trigger to action button, and option to direction fix. Then use this code:

Code:
Play SE: 'Open 1' 80, 100

Set Move Route: This event (Wait)

          : $>Direction Fix OFF

          : $>Turn Left

          : $>Wait: 3 frames(s)

          : $>Turn Right

          : $>Wait: 3 frames(s)

Control Self Switch: A = ON

On the 2nd event page you need to set your trigger to autorun, options to Direction Fix, priority to below character, on conditions set Self Switch to if A is on, and use this code:

Code:
Set Move Route: Player (Skip, Wait)

          : $>1 Step Forward

          : $>1 Step Forward

Control Self Switch: A = OFF

Also do NOT use a graphic on the 2nd page.

And that is it for the regular door that just opens, send you through it, then closes back and waits for you to use it again.

Ok the 2nd door. You use these 2 pages above but with a new first page and an extra option turned on the 2nd page. On the first page set the picture to a door you want to use. Set priority to Same as Characters, trigger to action, and on Options set it to direction fix. In the commands column make a text saying something like, "You don't have a key to unlock this door." Now go to your database and make an item and call it the same name as the item you want to open your door. I used Magic Key. If you want to have more than one of these keys set it to consumes. If it is a key that will unlock multiple doors with the same key don't set it to consume.

Ok use the first page of the last script is the 2nd page of this one. At the bottom of the script add a change item command to take away a magic key, if you want to consume the key. Also on your conditions set item to whatever you named your key, in my case Magic Key. Your script should look like this:

Code:
Play SE: 'Open 1' 80, 100

Set Move Route: This event (Wait)

  Â  Â  Â  Â  : $>Direction Fix OFF

  Â  Â  Â  Â  : $>Turn Left

          : $>Wait: 3 frames(s)

          : $>Turn Right

          : $>Wait: 3 frames(s)

Control Self Switch: A =ON

Change Items: [Magic Key], - 1

Now that last line is ONLY if you want the key to be consumed if not leave it off. Think of keys in Dragon Warrior... some keys were consumed when you used them but special keys, like the gold door key, weren't.

The 3rd page should be exactly like the 2nd page of the last script.

The 4th and 5th door is exactly like the last door. You either set it to consume a key or you don't depending on what you want. But the difference is we are going to ad a page and on the last page of the last script we are going to add a line. On the third page add the line, Control Self Switch: B =ON. Then add a fourth page. On the fourth page do not use a graphic, set priority below characters, trigger is Autorun, and options is direction fix. The conditions are Self switch B is on. Now when this door is used, wither it consumes a key or not, the door will disappear.

I hope this helps all the people out there, like myself, who wanted regular doors but never could find a decent script for them.
 

Jason

Awesome Bro

Camerous":1e1sqskj said:
Just because you and your circle of friends who have been doing this for years knows it doesn't mean "most" know it.

2nd Why did you feel the need to make your second remark? Just curious.

Firstly, he's right by saying most people know how to do this, your thread isn't special because it has a big paragraph explaining how to do it, this has been done too many times before and you won't get any "Oh wow I didn't know how to do this you're a god !" or anything like that cause it's kinda common sense how to make a door move...

Secondly, he said that because this is in the wrong section, you're giving a tutorial (Although it doesn't need one since there's most likely another 50+ of these floating around the forums), and you posted it in the RMXP/VX General Support, instead of the Tutorials forum, so yeah.
 
Enough people. Chill out.

Yes it's practical knowledge, but so what? Is it any worse than 3 or 4 script request/support topics all asking the same thing. I don't post, "Oh god, I've answered this 6 times already." I post the answer.

Cam, learn to take some criticism/comments. I know they didn't really say anything directly related to your system, but now you know to avoid tutorials that people tend to figure out on their own and such. Now it's if big guide for newbies, that's one thing. But a quick explanation on something everyone has to pick up eventually probably doesn't need a tutorial.

Alright. Now unless you have a post about the tutorial content itself, let's please limit the posting here.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top