Know another language? Translate this tutorial!

How to code doors and lock logic

Favourite 23 favourites
Tutorial written by KyatricOriginally published on 31st, March 2014 - 2 revisions

I've written a tutorial for Gamedev Tutsplus.

Here is the teaser for the article :
Doors play an essential part in the navigation and progress of the player in many game genres, and locks that require keys are the perfect way to control the flow of play. In this tutorial, we'll examine the basic logic behind doors, locks, and keys.

All of the examples that illustrate the article are made in Construct2 and the capx files are commented and can be downloaded from the article.
(The "Download attachment" button on the right side of the article)

Notice it is aimed at intermediate users, but hopefully, beginners can find it useful to a certain extent. Nevertheless it's not a "follow the recipe" kind of article.

I hope you can find this article and the examples useful.

Unlock your full gamedev potential

Upgrade to the Personal Edition of Construct 2, it has way more features and won't holding back from making money and using your full creativity like the free edition does. It's a one off payment and all Construct 2 editor updates are free for life!

View deals

Plus, it's got a lot of additional features that will help you save time and make more impressive games!

Congratulations on finishing this tutorial!

Did you learn a lot from it? Share it now with your friends!

Share and Copy this Tutorial

You are free to copy, distribute, transmit and adapt this work with correct attribution. Click for more info.


Kyatric 75.7k rep

If you subscribed to me and got several Emails in a row, sorry, I edited the tutorial after submission, and each edit happens to send some notification.

Monday, March 31, 2014 at 5:23:35 PM
DUTOIT 12.8k rep

I went through the tut earlier today. Very indepth, and very informative. Would have left a comment on but they have disabled comments for some time now.
A 10 out of 10 tutorial as usual :)

Monday, March 31, 2014 at 7:44:26 PM
Kyatric 75.7k rep

Thanks @DUTOIT.
For the comments, I know they are moderated, and you need to register/login on Disqus to post them, but I'm still getting comments on older tutorials posted there on a regular basis (I've received and exchanged a few last week).
As far as I can tell, comments are not disabled, you might want to check it out, and let me know if you still have issues so I can report the issue to the editors.

Monday, March 31, 2014 at 7:55:50 PM
DUTOIT 12.8k rep
As far as I can tell, comments are not disabled, you might want to check it out...
quoted from Kyatric

Oh, disqus, forgot they switched over to that rubbish - lol. Disqus just stopped working a couple months ago, and haven't missed using it really. Saves me time :)

Monday, March 31, 2014 at 8:18:37 PM
aerger 4,957 rep

Once again, Kyatric, you're one of the very few here that write good, clear, detailed tutorials. Thanks.

Monday, March 31, 2014 at 10:09:03 PM
SirG 11.5k rep

Thanks a lot!!!

Tuesday, April 01, 2014 at 2:12:56 AM
K969 1,533 rep

Clear and Concise Tut, thanks for the time and effort ;o)

Tuesday, April 01, 2014 at 10:37:00 AM
jastrazz 3,535 rep

Thanks Kyatric !!! :D

Tuesday, April 01, 2014 at 3:13:21 PM
Tedg 9,893 rep

Thanks Kyatric for sharing !

Tuesday, April 01, 2014 at 5:51:00 PM
AbelaNET 14.9k rep

Thanks for sharing. Very in depth. Keep it up.

Wednesday, April 02, 2014 at 8:15:44 AM
farnsu 1,759 rep

This is helpful so many examples, which door to choose.Thanks

Wednesday, April 02, 2014 at 5:51:10 PM
fishbottle 2,824 rep

Very thorough, great examples.

Thursday, April 03, 2014 at 3:11:32 PM
TheDom 9,348 rep

Another great tutorial!

Monday, April 07, 2014 at 3:36:10 AM
KoolEcky 16.3k rep

Good tutorial. Thanks mate

Saturday, September 24, 2016 at 5:20:29 PM

Leave a comment

Everyone is welcome to leave their thoughts! Register a new account or login.