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 with Transparent Walkways

Interior Doors with Transparent Walkways[/FONT]

http://i145.photobucket.com/albums/r228 ... xample.png[/IMG]

DEMO

Are you currently dissatisfied with the rtp doors that seem only to be made for exteriors? This tutorial will show you how to create realistic interior doors.

First, you'll need the following charset from http://www.lrpgm.com/site/index.php?show=resources_download&did=1731.

Or, you can save it from here.
http://i145.photobucket.com/albums/r228 ... Kaniko.png[/IMG]

For this tutorial, I will be editing forest town02. I use GraphicsGale for all my editing needs. It can be downloaded from here: http://www.humanbalance.net/gale/us/download.html Really, anything with gridlines can be used.
  • Set the gridlines to 32x32. This is the size of 1 tile. I also like to use the snap function for accuracy.
  • Select a wall tile and copy and paste it. Then move it to a blank tile.
    http://i145.photobucket.com/albums/r228 ... rial/1.png[/IMG]
  • Now change the gridlines to 8x8 and zoom in about 200 to 300%. It is 8 pixels from the top of the door to the ceiling. Remove everything except the topmost 8 pixels from wall tile you had pasted.
    http://i145.photobucket.com/albums/r228 ... rial/2.png[/IMG]
  • Save the tileset and import it into your materials base. Make this a passable tile with a priority of 5. This is so the player will go under it.
The door event will consist of 2 event pages and will then toggle back and forth between the two.
http://i145.photobucket.com/albums/r228 ... rial/6.png[/IMG]
On the first page, make sure you set through on only when the player is opening the door. If you set the through option on on the left side, then the player will go through the closed door.

http://i145.photobucket.com/albums/r228/yisuz/9.png[/IMG]
The event commands on the second page are a little more complicated.
  • First, you have to check the player's location. This basically records the location of the player which should be in a doorway.
  • Then you set up a conditional branch checking to see if the player is at that location.
  • If the player is facing up, the player will take one step backward before closing the door.
  • If the player is facing down, left, or right, the player will first turn down, and then take a step backward. Otherwise, the player will get stuck inside the door. If the player is facing down, it will just appear as though the player is taking a step backward.
And here is the final result:
http://i145.photobucket.com/albums/r228 ... rial/8.png[/IMG]


Now, there are other things you can do to enhance the look of the top wall tile but I'm not going to go into that here. You may also want to add this to your common events, which I have done to save me time. If you do, you should make one for opening the interior door and closing the interior door.

Well, that's pretty much it, then. If you have any questions or suggestions, please post a reply.
 
I enjoyed this tutorial. It's very simple and straightforward. I've always wanted Interior Doors! Thanks for making it!
 
I'm loving the graphics, but there is a lot of code there that you do not need. I mean, you do not need the second page at all. If I were making an interio door, I'd have an erase event at the end of it. This will remove the event until the next time the player enters the map.

Alternatively, If you want the player to mve through the door, do this;
Code:
On Button Press
Direction Fix

Move Event: This event
>Play SE
>Direction Fix: OFF
>Face left
>Wait 1 frame
>Face right
>Wait 1 frame
>Face Up

Wait for Move Completion

Move Event: Player
>Through: ON
>Move Forward
>Move Forward
>Through: OFF

Wait for Move Completion

Move Event: This event
>Face right
>Wait 1 frame
>Face left
>Wait 1 frame
>Face down
>Play SE
>Direction Fix: OFF

Wait for Move Completion

Why can't you have it like that? Unless there's something I'm missing, please say (Don't mean that in a snobbish way, btw)
 
@Bruno: I have the event set up so that the player is not automatically moved. It just opens the door and the door remains open until the player chooses to close it. It gives the player more control. And the reason I have to check the player's coordinates is because if I don't, the player will get stuck in the door when he/she does close it.

@TMG: On event page one, change the set move route command to "this event" instead of the player and you also need to turn self switch A on after the wait for 12 frames command.

And on page 2, on the left side, check that self switch A is on as a condition. Also, change the door graphic to the open door graphic.

To everyone else:

There are some bugs that need to be addressed. For instance, if the player is facing left or right, the player gets stuck in the door. And I need to remove the change player speed part. I only included that because I have a dash script in my game. This will be updated this weekend. I will also include a demo.
 
~UPDATE~

I have updated the first post with an additional step so that the player will not get stuck in the door. I have also uploaded a demo.
 

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