# Doors

**URL:** <https://forum.kirupa.com/t/doors/183624>\
**Category:** Uncategorized\
**Created:** [March 28, 2006, 10:07pm UTC](https://forum.kirupa.com/t/doors/183624 "2006-03-28T22:07:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nich](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@Nich](https://forum.kirupa.com/u/Nich)\
**Post date:** [March 28, 2006, 10:07pm UTC](https://forum.kirupa.com/t/doors/183624/1 "2006-03-28T22:07:06Z")

</div>

Ok, here’s the deal: I’m making a platformer with metroid style levels. Small (or large) rooms with doors that lead to other rooms. Originally, I was manually instantiating the doors and building the levels around them which worked fine for a while. The problem is that I want to attempt rooms with multiple entrances. I already have code that can create the doors and handle the hittests required to make the doors work. When each door is created it is given a unique depth and instance name. I have the x,y,h, and instance names stored in arrays.

What I can’t figure out is how to handle rooms with multiple entrances. How do I determine at which entrance to put the character in my dynamic code? Since each door is given a unique name every time the character passes though a door, and the same room may have different names for objects, using the instance names as a reference is out of the question. The only way i can think of is giving each room fixed names for everything, but if there is an easier way I would be glad to hear it.

---

<div class="post-metadata">

**Author:** ![Nich](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@Nich](https://forum.kirupa.com/u/Nich)\
**Post date:** [March 28, 2006, 11:21pm UTC](https://forum.kirupa.com/t/doors/183624/2 "2006-03-28T23:21:00Z")

</div>

Nevermind, figured out a method 😏. It seems just writing it out here helps me get a better handle on the problem at hand.
