How To Open A Locked Door With A Key - Unreal Engine 4 Tutorial

  Рет қаралды 43,362

Matt Aspland

Matt Aspland

Күн бұрын

Hey guys, in today's video, I'm going to be showing you how to open a locked door using a key. The door will be locked by default and you will need to pick up a key to open it. This will also include sound effects.
Key Model: www.cgtrader.com/free-3d-mode...
Locked Door SFX: freesound.org/people/Benjamin...
Key Pickup SFX: freesound.org/people/niamhd00...
#Ue4 #UnrealEngine4 #Ue4Tutorial
___________________________________________________________________________
00:00 - Intro
00:19 - Overview
00:39 - Creating The Door BP
10:30 - Creating The Key BP
14:21 - Final Overview
14:37 - Outro
___________________________________________________________________________
Unreal Engine 4 Tutorials Playlist: • Unreal Engine 4 Tutorials
The Basics Of Nodes Playlist: • The Basics Of Nodes In...
Blender Tutorials Playlist: • Blender Tutorials
___________________________________________________________________________
If you enjoy make sure to subscribe: / @mattaspland
Join My Discord Server: / discord
Follow Me On Instagram: / matt_aspland_
___________________________________________________________________________
If you want to support me, you can PayPal me at "matt.aspland.1@gmail.com". This is by no means expected or required. It is just a nice support :)
Link to PayPal: www.paypal.com/
You can also support me on Ko-Fi following this link: ko-fi.com/mattaspland
Thank you :) ___________________________________________________________________________
♫Music By♫
●Kronicle - Chill Noons
●Soundcloud - / the-chemist-10

Пікірлер: 120
@GlitchingColors
@GlitchingColors 9 күн бұрын
Thank you so much i looked everywhere for a tutorial for a lockable door and now i found my favourite Ue4 Tutor!!! 🤩
@PatrickTheDM
@PatrickTheDM Жыл бұрын
Warning! if your character dies/respawns the key variable will reset to to false. Simply create the variable in Third Person Game Mode instead of Third Person Character to prevent this.
@seanposkea
@seanposkea 2 жыл бұрын
I've done five or six other door tutorials and this is by far the simplest and cleanest way. Thank you.
@TheLastEpiscopalian
@TheLastEpiscopalian 2 жыл бұрын
All your videos are insane. Best on youtube by far man.
@mr.john.m.f.1323
@mr.john.m.f.1323 2 жыл бұрын
Your channel is awesome!!! You are the only KZbinr that I have watched that the Code actuly works every time!!!
@Limey-pu3ms
@Limey-pu3ms Жыл бұрын
Fast paced, love it
@alexjr977
@alexjr977 3 жыл бұрын
Great man ! Next video "how to randomly place objects like in many horror games " Thank you soo much for your time
@athelstanm7298
@athelstanm7298 2 жыл бұрын
Thank You for this Great Tutorial!
@Alex_Panagiotidis7
@Alex_Panagiotidis7 2 жыл бұрын
exactly what i needed thank u!!!
@justwill7467
@justwill7467 3 жыл бұрын
really helpful, thank you!
@ChrisRed147
@ChrisRed147 Жыл бұрын
thank you very much mate, great explanation
@guerosoometv
@guerosoometv 3 жыл бұрын
thank you man, you're amazing!
@aleksboboychev
@aleksboboychev 2 ай бұрын
Thank you!
@MrsHorridVR
@MrsHorridVR 2 жыл бұрын
i just wanted to thank you. im planning on making a horror game as my first release :D so thank you so much for making these tutorials theyre helping a lot
@wawa_enjoyer
@wawa_enjoyer 2 жыл бұрын
Yoo same here dude
@puri7597
@puri7597 2 жыл бұрын
Thank you so mcuh fot the tutorial!
@Mrkev217
@Mrkev217 3 жыл бұрын
good idea as always matt
@MattAspland
@MattAspland 3 жыл бұрын
Thanks so much man! :)
@Stopmotioniscool
@Stopmotioniscool 2 жыл бұрын
Thank you this helped me
@mrdragancrazy02
@mrdragancrazy02 11 ай бұрын
Amazing Video Tnx Man :)
@fosterboy1587
@fosterboy1587 3 жыл бұрын
thanks for this matt just what i was after cheers
@MattAspland
@MattAspland 3 жыл бұрын
No worries man, always happy to help!
@fosterboy1587
@fosterboy1587 3 жыл бұрын
@@MattAspland hi matt i have another issue woundering if you could help i have put stairs in my level and when you go up them it hovers up instead of walking up step by step is there a way to fix this
@nofrillbear
@nofrillbear 2 жыл бұрын
great tut just wondering how would you set it up so a message will display when it's locked and when you use the key the message goes away
@ninyqin7086
@ninyqin7086 3 жыл бұрын
Hey man I tried this in the mobile mode, I can pick up the key but I can't open the door. I did about everything you did in the tutorial except for using cast to first person character and having separate names of collision for door and key. btw I'm clicking on the door in iOS mode, with mouse. I rlly appreciate your work and it would be so nice if you can help out.
@MotivationMagicc
@MotivationMagicc Жыл бұрын
Good Tutroial even works in Unreal Engine 5 Thanks :)
@isolophobiaofficialgame
@isolophobiaofficialgame Жыл бұрын
It didnt work for me when i trigger r nothing happesn i even tried doing a print string and still wont trigger
@abdullahsohail5395
@abdullahsohail5395 3 жыл бұрын
Nice video . I Appreciate it
@MattAspland
@MattAspland 3 жыл бұрын
Thank you, glad I could help!
@shallah3113
@shallah3113 2 жыл бұрын
Nice video! It's just a suggestion or question, i don't know, but can you make a video where you can lock the door by yourself and unlock it with widget? (the widget only shows when you looking at the door).
@jas-jr3rv
@jas-jr3rv 2 жыл бұрын
and how do i add a sound for when its opening? great tut by the way!
@TheLastEpiscopalian
@TheLastEpiscopalian 2 жыл бұрын
From flipflop onward to open close door, can we compile that into one node so we just tell the flip flop to link to the ‘open/close door’ node? Or is that the definition of an interface? Instead of having to constantly write the open close door blue prints.
@rat1n69
@rat1n69 6 ай бұрын
THANKS VERY MUCHHH, i very happy! I can`t find a tutor for that, but u help me
@fosterboy1587
@fosterboy1587 3 жыл бұрын
hi matt another question on this is there a way to add text on screen once you have picked it up saying you have the key
@SafouaneAYADI
@SafouaneAYADI 3 жыл бұрын
thanks, bro
@kummistudios8755
@kummistudios8755 Жыл бұрын
LEGEND
@luqmanhakeem6539
@luqmanhakeem6539 3 жыл бұрын
interesting way of opening/closing door, most video i watch about door they dont use gate or lerp function. now i know, thanks 😊 edited: so this method doesn't use array system, what if you have a lot of looked room with different kind of keys? love your video tutorial.
@MattAspland
@MattAspland 3 жыл бұрын
No problem, glad you know this way too! :) And you are very right yeah, you could use multiple Booleans, or follow a way I did for a keycard system, which is very similar. In that, I used arrays to have multiple doors and keycards :) Part 0: Overview: kzbin.info/www/bejne/hnjMkmmDiLCBkM0
@artdrawing6682
@artdrawing6682 Жыл бұрын
@@MattAspland my friend please i send you message in Instagram and the gate node not working for me i need your help please and thank so mush
@Pezz323
@Pezz323 3 жыл бұрын
theoretically would i be able to combine this video with the randomized spawn video?
@beastNick7713
@beastNick7713 Жыл бұрын
I remember my self 1 year ago that i didnt know how to do this and now i know about 10 more things about ue4
@notadhdeveloper4994
@notadhdeveloper4994 3 жыл бұрын
Is there a way to make the door lock if you have the key?
@patrickmiller1723
@patrickmiller1723 Жыл бұрын
how do you change the pivot point of the door in the blueprint
@GainsGuru761
@GainsGuru761 6 ай бұрын
Hi Matt I was wondering how you could do this but once you use the key it gets destroyed and cant use it again. I would be greatly appreciated if you could help.
@inheritorofthewilloffire2547
@inheritorofthewilloffire2547 3 жыл бұрын
Did anyone else have trouble with the key not working? The key just sits still for me in the environment and I'm unable to pick it up or interact with it. The door seems to work, I just can't open it since the key is not working for me. I'm using a cube static mesh as the static mesh for the key, could this have something to do with the issue I'm having?
@inheritorofthewilloffire2547
@inheritorofthewilloffire2547 3 жыл бұрын
I will also mention that I am now testing it with the key model and it still is not working. The door has working colliders but the key does not seem to have any colliders at all and I cannot pick it up. It sits there in the environment and I can walk through it. I'm not certain if this is an issue with the static mesh or it has something to do with the blueprint.
@xfedonaras
@xfedonaras Жыл бұрын
@@inheritorofthewilloffire2547 im having the same issue did you find the solution?
@beastNick7713
@beastNick7713 Жыл бұрын
Maybe the box collision is not big enough and if u interact with it and it doesnt disappear u have to put destroy actor and make sure that the variable that u have put is checked in the key blueprint
@madar382
@madar382 Жыл бұрын
Is this for multiplayer too?
@surflexy
@surflexy 2 жыл бұрын
so ive added a widget to notify on the player's screen that he doesnt have the key so he needs to find it however if i press down my interact key twice quickly, the widget will no longer get removed from the screen after the 2 seconds delay. any ideas on how to fix that? thanks
@neutrino76
@neutrino76 2 жыл бұрын
Excuse me, how do you switch from third person view to first person view during play?
@5qsgreatchannel
@5qsgreatchannel Жыл бұрын
the boolean variable doesnt come up when i use a "get" or "set" blueprint. It's set on the character. Any idea why this isn't working?
@MattJSowards
@MattJSowards 3 жыл бұрын
Hey matt will this show for other players if its multiplayer?
@gevorggevorgyan8099
@gevorggevorgyan8099 3 жыл бұрын
Yes
@Si-Toecutter
@Si-Toecutter 3 жыл бұрын
lock pick tutorial would be epic
@MattAspland
@MattAspland 3 жыл бұрын
Nice idea, I'll write it down!
@meganbishop7652
@meganbishop7652 Жыл бұрын
hi, i have a small issue when I'm animating the door, everything works fine until i attempt to open the door. its laying flat on the floor instead what do i do to fix this?
@Alex00m
@Alex00m 3 жыл бұрын
Nice one bro,iam back again😊, ❤️❤️❤️❤️
@MattAspland
@MattAspland 3 жыл бұрын
Thank you so much, good to have you back! :)
@spellwhisperrr
@spellwhisperrr Жыл бұрын
fallow exact for the variable info Get and Set
@adrjen55
@adrjen55 3 жыл бұрын
Great tutorial! Can you made tutorial about AI hear player footstep?
@MattAspland
@MattAspland 3 жыл бұрын
Thank you! I can definitely look into doing that yep :)
@alexanderdimitrov7965
@alexanderdimitrov7965 3 жыл бұрын
+1 sub
@sas-vo1cs
@sas-vo1cs 3 жыл бұрын
First think you so much, second can you make a tutorial of how to make a car drift in ue4 because i searched in youtube but i didn't got any thing and sorry for my bad English
@MattAspland
@MattAspland 3 жыл бұрын
Hey, no problem man, and I can definitely add it to my list yep :)
@sas-vo1cs
@sas-vo1cs 3 жыл бұрын
@@MattAspland thanks❤️
@tombriader8389
@tombriader8389 9 ай бұрын
Nice man but when i dont have key i can walk through door can you tell me why ?
@fernandosouza0308
@fernandosouza0308 2 жыл бұрын
Hey man, ik the video is more than one year old but could you tell me how to set collision for the door? my character simply walks through it
@stevieselva7124
@stevieselva7124 6 ай бұрын
is there a way to make the key only work 1 time?
@fosterboy1587
@fosterboy1587 3 жыл бұрын
hi matt just wondered how you add an unlock sound once you got the key and opened door
@MattAspland
@MattAspland 3 жыл бұрын
Hey mate, out of the exit for the gate, you could get a "Sequence". Then 0 goes into the code we have now, and Then 1 goes into a DoOnce. Out of this DoOnce, get "Play Sound At Location", with the location as "Get Actor Location", and the SFX and the sound for unlocking the door. This means we can play a SFX for unlocking the door, only the first time we open it. So after we unlock it. Hope this helps :)
@fosterboy1587
@fosterboy1587 3 жыл бұрын
@@MattAspland I will give that a go thanks matt
@fosterboy1587
@fosterboy1587 3 жыл бұрын
@@MattAspland thanks that worked a treat much appreciated
@MattAspland
@MattAspland 3 жыл бұрын
@@fosterboy1587 No problem mate :)
@fosterboy1587
@fosterboy1587 3 жыл бұрын
@@MattAspland can you add text to the door and key so with door being locked it says door locked need a key
@connorappleton1945
@connorappleton1945 2 жыл бұрын
My character can still walk through the door when I don't have the key, any solutions?
@albinodino.stevied3976
@albinodino.stevied3976 3 жыл бұрын
I'm using a top down blueprint and it doesn't seem to be working, the door has no collision and doesn't make a sound when I press E in the vicinity.
@albinodino.stevied3976
@albinodino.stevied3976 3 жыл бұрын
I should clarify, the door itself has no collision, i believe the box collision is working because when I shoot projectiles within the collision box they stay in place, however interacting with the door does nothing and I can walk right through it. Is this a topdown blueprint problem?
@MattAspland
@MattAspland 3 жыл бұрын
Hi mate, if you are using the starter content door, then it will be a problem with that. For some reason, by default it has no collision. To fix it, you can open up the static mesh for the door, and change the "Collision Complexity" to "Use Complex Collision as Simple"
@albinodino.stevied3976
@albinodino.stevied3976 3 жыл бұрын
@@MattAspland THANK YOU
@MattAspland
@MattAspland 3 жыл бұрын
@@albinodino.stevied3976 No problem :)
@supperfprs5102
@supperfprs5102 2 жыл бұрын
how do i make so one key can only open one door like a blue key can only open a blue door not a red door
@thejules.
@thejules. 3 жыл бұрын
My door is just gone. Would anyone know why it’s not showing up? It’s in the blueprint viewport but doesn’t show up when I put it in my world
@EerieRealms123
@EerieRealms123 Жыл бұрын
Im making a game with several locked doors but i want each door to be opened with a different key each time but i dont know how to can someone tell me?
@lokikennedy
@lokikennedy 2 жыл бұрын
For some reason this method MAJORLY bugs out for me from test to test. I can get the door to open and close and all that if I remove the key requirement. It's clearly interactive... But whether or not the key will work or break my door is a total crapshoot. I've had it work. Hit stop, play and immediately it can't find the key. The blueprint claims it's Accessing None trying to read the SET HAS KEY node. No clue why it keeps crapping out.
@molinarigamesltda2582
@molinarigamesltda2582 Жыл бұрын
Comecei a criar este mesmo sistema mas não estou tendo sucesso
@glitchy489
@glitchy489 Жыл бұрын
bro I can't connect the variable haskey to cast to third person character
@ahggxb2285
@ahggxb2285 3 жыл бұрын
bro...do u know how to edit the pivot?
@MattAspland
@MattAspland 3 жыл бұрын
Hey, there are a few different ways of doing it. Did you make the model yourself? If so, changing it in the model before exporting is the most efficient way of doing it. However, you can also try: "ALT + MiddleMouse" to move the pivot, then Right-click the actor and choose Pivot > Set as Pivot Offset to save. " Hope this helps :)
@fuzzypanda1684
@fuzzypanda1684 2 жыл бұрын
So this works for me except the door won't close when I press the interact key again after it opens. I can't figure out why. I've tried putting the "B" output of the Flip Flop node into "Reverse" and "Reverse from End" but I can't get it to work. I even bypassed the check for the key so it just opens when you hit interact and once again it opens, but won't close. Does anyone know why? EDIT: I solved it in case anyone else has similar issues. After endless frustration I decided to look at the door blueprint while playing and noticed that everything was fine until I used the key to open the door. At that moment, the box collider disappeared. Then I noticed that I had the box collider attached to the door static mesh instead of the defaultrootscene. I uncoupled the box collider from the door mesh and now everything works perfectly.
@musicdiary3789
@musicdiary3789 3 жыл бұрын
The door itself doesn't have collision so I can just walk thru it. How do I add collision to the door?
@mihovilmikulec
@mihovilmikulec 3 жыл бұрын
You need to set up door collision. Do what the guy in this video did: kzbin.info/www/bejne/p6uplWCGm7JoocU (starts at 5:40)
@Splatoony_ahh_channel
@Splatoony_ahh_channel 9 ай бұрын
I followed every single one of your steps, the key gets destroyed but it doesn't open the door, what do I do?
@user-ft2uq5yy5y
@user-ft2uq5yy5y 2 жыл бұрын
why do i go through the door? even when its locked?
@voyrex2675
@voyrex2675 3 жыл бұрын
Hi i need help about 2d side scroller crouch animation i watched your video i did exactly what you did b ut animation wont work
@MattAspland
@MattAspland 3 жыл бұрын
Hi, is this for my crouching video? If so, do the animations not work at all? Make sure you are setting and using the Boolean correctly. If you want, you can send screenshots of your code for me to take a look at.
@voyrex2675
@voyrex2675 3 жыл бұрын
@@MattAspland animations is not working i have custom character not using template character
@MattAspland
@MattAspland 3 жыл бұрын
@@voyrex2675 Right okay, you will need to retarget the animations to your new skeleton then. I have a video on it here :) kzbin.info/www/bejne/nIa4lKGtn8Z8nbc
@voyrex2675
@voyrex2675 3 жыл бұрын
@@MattAspland i send you a video by mail
@MattAspland
@MattAspland 3 жыл бұрын
@@voyrex2675 No worries, I've just replied :)
@TraumniniumnGames
@TraumniniumnGames 2 жыл бұрын
I copied the same exact nodes and the time line is paused
@imZANETTI
@imZANETTI Жыл бұрын
it worked great but i had a problem.. when i get the key, and after that my artificial intelligence kills me, the key is no longer there and i cant open the door
@happycakes8469
@happycakes8469 3 жыл бұрын
When I import the key model, the key isnt there
@MattAspland
@MattAspland 3 жыл бұрын
Hi, you might need to scale it up a lot before you can visually see it. Let me know if that works for you :)
@murphy1934
@murphy1934 11 ай бұрын
i cant pickup the key
@aliahmedgaming6083
@aliahmedgaming6083 3 жыл бұрын
💪 I want the floor creak because i am making horror game in unreal engine 4
@MattAspland
@MattAspland 3 жыл бұрын
Great idea, I can add it to my list!
@mhze
@mhze 3 жыл бұрын
I cant import sounds...:(
@MattAspland
@MattAspland 3 жыл бұрын
Hey, make sure that your sound files are .wav 16 bit. You can use this free online converter to get them into that format :) Change the bit resolution to 16 bit. audio.online-convert.com/convert-to-wav
@auragaming2776
@auragaming2776 3 жыл бұрын
Door open but I can't go throw door.
@MYMP22
@MYMP22 2 жыл бұрын
doesnt work and i literally doing all the same as you doing :(
How To Make A Grappling Hook - Unreal Engine 4 Tutorial
23:11
Matt Aspland
Рет қаралды 22 М.
Don't eat centipede 🪱😂
00:19
Nadir Sailov
Рет қаралды 23 МЛН
КАК СПРЯТАТЬ КОНФЕТЫ
00:59
123 GO! Shorts Russian
Рет қаралды 2,1 МЛН
Uma Ki Super Power To Dekho 😂
00:15
Uma Bai
Рет қаралды 59 МЛН
Blueprint Interfaces | Unreal Engine 5 Tutorial
14:41
Tyler Serino
Рет қаралды 34 М.
Unreal Engine 5 : Key and Door System Tutorial
15:50
sappydev
Рет қаралды 13 М.
UE5 - Open Door with 'F' - Only if We're Looking At It
32:51
DarkslayerTV
Рет қаралды 6 М.
How To Make A Key and Door System in Unreal Engine 5
20:02
Virtus Learning Hub
Рет қаралды 11 М.
Don't eat centipede 🪱😂
00:19
Nadir Sailov
Рет қаралды 23 МЛН