Blueprint For Beginners in Unreal Engine 5 | 2023 - Learn in 30 Mins!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up guys welcome to new Unreal Engine 5 tutorial and today I'm going to show you all about blueprints if you are a beginner and you don't know anything about them it's going to be a very easy video to follow so let's get started but first check out the link in the description to get out with some unreal ending courses on winfox alright so the first thing that we want to do is go ahead and open the unmute engine editor so you can go ahead and create a new project in my case I'm going to be using the new version of Unreal Engine 5.1 but of course you can use whatever Unreal Engine 5 version that you want so what we want to do is go ahead and select the third person template as it is just what we need to learn from it and all the blueprints that it has and everything like that so let's go ahead and select a bright location that you want to go ahead and create the product on and then we're going to set a prime name in my case I'm gonna say like blueprint beginner uh toot okay but of course you can name it like you want now it's very important well it's not really important but uh make sure that it is just selected in Blueprint and yeah that's pretty much all the things that you have to make sure select blueprint and that's it if you select C plus plus it will also include blueprints but it's just better if you include directly blueprints okay so I'm going to go ahead and click create and now we're gonna go ahead and just wait until it opens all right so now you can see that the bird has opened and we have the viewports the outliner the content browser Etc now I do have to say that I have a tutorial on how to create your first game a very small game of course but how to create your first game in Unreal Engine for beginners so if you want to check that out after it's in this video we'll go ahead and leave it in the description and oh and in there I basically cover more about like the viewport and Etc about the editor but this video is going to Center on the blueprints itself like the visual um graph noting Etc okay so first of all let's check out a blueprint and let's explain what it actually is so for example we can go into a very simple blueprint this is gonna be the third person Blueprints and we can see that we have here the third person cats have looping okay so now we can see that um it is a blueprint class so what this is is it it is like it was a prefab okay so here we will contain all about our player character from the visual notes that we can go ahead and interpret all of the logic and stuff which is probably what you know as blueprint and then we have um all the um components and the character model itself with its um animations and stuff okay I mean the animations are done in a separate blueprint that I also have a tutorial on so if you want I can also link it in description below but you get the idea okay we have the notes itself and then we have like the character and the collisions Etc let's go ahead and open this up so you can kind of see how it works so it will go ahead and open into new window we're going to go ahead and just anchor here into new tab okay so let's go ahead and check out this so we have a lot of things to hear and you're probably a bit overwhelmed but let's go ahead and narrow it down so first of all let's start with the viewport itself okay we're gonna go from left to right over here so you will see that we have the viewport which is very um very similar to of course the scene viewport but in this case it's just previewing the blueprint itself okay so in our case this is the blueprint for a third person character so here we have like I mentioned before the model for the character the capsule Collision for it and then things like the camera and stuff so in here we have the component section in this is basically we have both like I just mentioned before the the mesh for the camera for the character sorry the capsule component the the camera itself the camera boom which is basically used where the camera will anchor and rotate uh itself and we can add so many things like for example you can see here we can use for example add a cube if we were to to add that we can also use for example duplicate this mesh with Ctrl D and then we will go ahead and get another player Etc so in here is basically you can add all of your things into your blueprint okay for example you can also add like lighting and stuff for example a point light and you can see that I have a light over here so it's basically where you can add all your things now we can also add another type of components which includes some Logic for example in here we have the character movement component which includes and you know some Max Speed um variables some gravity Etc okay which is already added for the third person character but you can also add other ones as for example upon sensing in the future we're gonna make AI um and Etc and so on so on so of course I'm just going to cover the basics over here but you get the idea okay so uh let's go ahead and I will cover well yeah I'll go ahead and cover this too so if you select any component you will see the details panel over here now I'm gonna make a note over here and it's that if you for some reason which is very weird but for some reason you don't see any of these steps you can just go into window and then you will access you can have open them um all of them okay so the details panel will go ahead and display all the properties that um that they are for the component or the variable or whatever that you are selecting on this blueprint so in that case in the mesh you can see that we can change the asset itself so for example I can change it into be this um orange guy you know you can basically change the materials you can change the ending class which is basically what I explained before for the animations and stuff you can change uh for example it will simulate physics so we'll have like a physics and we'll fall if I can cast Shadows Etc all the properties about what we have selected in the blueprint okay the location Etc okay so now yeah we have uh kind of covered a bit um those we're gonna go into this and graphs over here so first of all we have the construction script now we are not gonna cover this because it is some thing that probably you're not gonna touch in this art really and basically um I will explain it in a second because you will understand it better when I had to explain the event graph so the event graph is the place that gonna actually place all the visual notes itself okay this is where you're gonna place all of the logic okay now the difference between this and the event graph is that the event graph will begin executing when you press play when you press play it will start you know if a big gameplay will do all this when you are not press the jump key it will do all this Etc but the construction script it will do everything also while we are not playing the game and we are just in the editor okay so this is the main difference that's why you're gonna be using more event graph to start because you don't really need to do anything on the editor itself for now when you're in more simple level again beginner level whatever but the event graphs really what you're gonna start touching as we execute the game which is probably what you want okay so let me cover one more thing first week before we enter into the vein graph itself and the notes and we start doing some things um so we have one more thing which is here the um functions graphs and variables section so first of all on the bottom here you can see that we have a list of all the variables that we have in our case we has we have um two variables which are actually referencing our components so sometimes when you add a component it will create a kind of variable so you can access it anyway don't worry about that about the variables linked into components but if I were to add a new variable you will see that we can you know put the name of the variable and then the type like if it was normal code you know if it was a Boolean a float an integer Etc now we'll play with them in just a few seconds now when we actually start doing things but you get to know where they are and how you can add them and delete them Etc so then we have the event graph section so you can see that this is just a kind of shortcut into different notes and that you may have for example the the gameplay can just double click and it will go directly for example the jump node you can just go directly here it's basically just like a shortcut but then we have the functions which comes into a separate event graph so if I were to create a new function you will see that it opened a new tab and we have a new event graph with a new space address so this is just to make things a bit more organized so we're gonna make a big uh you know chunk of code I know some stuff instead of having all in this enormous event graph you can just narrow it down into different sections by creating functions so we can put all the code here and then you can go ahead and call the new function that we have just created from here and when you play the game Etc so it's a bit more organized in that sense but we're not going to be using that right now but you get the idea okay so now that we have kind of covered a bit the basics of a blueprint itself and stuff let's start actually um you know getting to know a bit the notes and how they work and Etc so like you may know of course and they go from left to right so when they're plugged in you can see this arrow pointing with that you know where they will go so the notes will have some properties first of all the ones that are on the left over here is basically there are inputs so for example the this is just casting to the player control so this is accessing the player controller okay so this requires an input it is what player control we want to go ahead which is the object so now guess we are saying that well it is the control itself so we're plugging that into an input now it might make not a lot of sense now when we start experimenting we'll start to make more sense but you can see kind of how it works and in the left side we'll have the inputs and in the right side you can see that we have the outputs so here this will give us the player control yourself and now we're accessing to the inputs and adding the mapping Etc so not all notes will have for example an input and an output it's just depending on what their task is and what their logic itself is okay so for example if we go into a simple um thing over here we can say that we have a simple um input action so this is basically when we press the spacebar okay so when we press the spacebar when it's triggered we'll go ahead and close the jump node so if the character will go ahead and jump but when we stop pressing the spacebar which is basically uncompleted it will stop jumping so you can see how it kind of works and how it organizes and stuff now we can get into more complex stuff when we can organize them into little like knobs so it's a bit more organized Etc now we will go we'll not go into so much detail but you can see how you can start breaking them down uh plug on the input over here which will contain an output Etc so let's make something uh very simple right now and it's just we're gonna use a variable to kind of print something in the screen and we can get to know a bit more variables and how we'll go ahead and display them Etc so let's go ahead and create a new variable which is going to be for example my number so my number is going to be a integer because it's going to be just a whole normal number and then we can compile and you will see in the details panel if we selected we can actually assign a value of course in the future you can create variables for example with your health Point like which health it has estrogen but this is just an example so for example we can say five so now what we can do is just drag this variable into the event graph and you will see that we have two options we can get it or set it if I were to get it it just will give it me the the output itself so I will basically be accessing well what what value has right now so if I were to get this this will contain the number five but if I were to drag it and then set it I can basically overwrite it and change the number so now if I were to press a 2 over here now where to connect this this will change from a 5 into A2 whenever and it gets into this part of the event graph okay so you kind of know how it now works now let's go ahead and just do something simple we're gonna print it on the screen so if I were to get the number here and get it so we want to access whatever is right now over here and then I drag this and I say print sorry we have to uh drag from here print you can see that we have a print string over here okay so the reasons that we cannot directly type here print is that this is a integer and this is a string so what Unreal Engine is very good at is just dragging it and then we can go ahead and see that it already created a node to convert the number into a string so we can have it displayed on the screen so unreal and just very good at it so the reason it didn't appears because we have context sensitive and it's just it will just display things that are um that makes sense what wait what you're gonna basically uh plug in okay anyway so this will just print into the string whatever value my number has so now we can compile and save it so compile is just making sure that everything is okay and then Etc okay like it was normal code and then if I press play you will see down here we can see that it has number five appeared now it was very quick we can go ahead and just expand the settings over here and then we can just go ahead and put the duration to be like uh 10 seconds okay so we can of course uh also change a lot of different parameters in between nodes so you will see some more time and you can see number five and if I were to stop here and then change it into 10 of course now it will go ahead and print the number 10 which is great but if I were to go ahead and just before just before go ahead and set it and for example into zero you will see that now of course well it will print zero because right before we print it we're changing this variable into P0 but if I were to do it the other way around and as first printed but then go ahead and set it to zero you will see that now it will print 10 because well we're printing it and access the value before we actually change it so you can see how the workflow kind of works over here now just to make uh to be clear over here this is printing right when we press play because we are going ahead and going through the big gameplay so this event will just launch as soon as we press play it will do all this which is just adding the input and stuff don't worry about that you don't have to know that right now but then after that we're just doing our thing which is just printing our number now we can do one more thing and it's for example make your Boolean for example um yeah my Boolean okay I'm I'm choosing very boring names over here but it's just to make some example so if I were to just create a Boolean which is like you know a true or false and then drag it and then afterward to get it we can use this really handy note which is a branch and this is just like an if statement so if it's true it will go through here and if this Boolean is false it will go through here so if I could start example can you say that if this building is um if this bullying is true we will print well true but if this Boolean is false we can just copy and paste this and then this will basically say uh well false so right now this Boolean we selected you can see that is false so when I press play you will see that it will print well false because of course um this is false and it's coming through false but if I were to change this into be true and then compile and then if I press play you will see that now it appears through so this is just a neat way of just making if statements and you can also see how and depending on the variables value and stuff it will go through one node or each other so this is just how you will start making a simple workflow and systems and Etc with the logic itself and you don't really know I need to know how to code in a normal script you know this is very handy notes that will make you a lot of the processes stuff okay so let's make a very simple example with actual functionality for gameplay so let me go ahead and delete this to uh variables over here so what we're going to do is that when we press a key it will turn on a flashlight now we're not gonna have any model or whatsoever it's just gonna be as simple as just activating the light okay from the player's head it will just activate it in a simple light which will be a flashlight and then when we press the key again it will disable it so um now I want you uh to kind of think about how we would do this okay so I'm going to give you a few seconds and and we'll go ahead and start making it ourselves all right I know that was really quick to kind of think but but okay let's get started if you want you can just pause the video um but the first thing you want to do is go ahead and add the key input itself now you can see that it will be a bit different about this the reason is that well let's go ahead and first add the key so if we right click I haven't mentioned this I think but you can just add whatever node you want okay for example print I can use access well the print string node you can just right click and add whatever note you want and also you can use drag from any node itself and then also print whatever no access and you know that you want so you can right click or just drag from other things okay as well as also from outputs on and inputs too okay so now if we were to type key and scroll back down you will see that we have a keyboard events with all the keys that we want and for example let's make that when we press the EQ we will do our flashlight thing now you can see that's a bit different between this um input and this input the reason is that this is using the an enhanced input system which is being added on the start Etc now this is a bit more advanced so that's why you really don't know how you don't need to know that right now but this is just a better way of just making inputs so then later on you can have them from a single collection and then access its trigger completed if it's going with different modifier Etc now you don't need to know that so we're going to make it as simple as just um going ahead and typing here we can access the print keys and for example the E key so when we press the key will do something and then release Etc now we do have a very handy note to make sure and that when we press it once it will go ahead and enable and then when we press it again it will go ahead and disable so we can just go from press and then access the flip flop node which is exactly what we want so when we press it one time it will go ahead and go through a so in our case enable the flashlight and then we will press it again will go through b and then disable the flashlight now if you want you can change this and make it so that you can hold the IGI to enable the flashlight and disable so how we will go is that like very similar to the flip flop but when you press it you'll go ahead and enable the flashlight and then when you release it you will disable the flashlight so then you will need to hold instead of just clicking once now in my case I'm going to make it so you can click it once but of course you can change it up and into your customization and stuff so just so you know how to basically how things work and stuff okay anyway so now we have to basically enable our flashlight but how do we do that well like you may have to guess we have to add a component over here in our case it will be a light component so you can just go up here into add and search for light now in my case there are a lot of different uh lighting options in our case we just want this Spotlight which is the most similar thing to a flashlight okay this is uh applying a light into a certain direction okay so I'm gonna change the name into um into flashlight okay we go flashlight the air like this okay okay so now we have a flashlight now you can see that we really cannot see the light this is because on the viewport there's not really an environment to lead up so we kind of have just to you know manage ourselves but the later in the game you will see that we can actually do so but anyway so I'm gonna kind of just uh put it in front of the player's face and stuff okay there's not gonna be any model itself any animation of of a turning on this is a simple logic I just enabling the same light okay so we can just place the light over here and then if we want we can just turn up ability intensity so for example seven thousand and then we can just compile Now by default if I press play you'll see that we have the light you can see that we have the light um but we haven't pressed key e or whatever okay of course first of all we haven't applied any logic in E whatsoever if not right now if I press e nothing will happen because I mean it would not do anything we just have the flip flop which is you know just controlling A and B okay it's not actually doing something but the thing is that we have the flashlight enabled by default so that's why when I press play it's enabled so what we have to do is go ahead and go into details and then say this book and then you can see that we can disable visible so we can see that now if I press play now the lighting is not appearing so this is exactly what we have to do but from our code from our visual notes so in our case we're going to leave it like this so in by default in the start it will be disabled so we want to leave our component disabled but now in the bank graph we can just drag our flashlight okay now we're gonna go ahead and get it and now you can see that we'll get an output node so we can do things with this flashlight and I guess we can just get a node which is set visibility which is exactly what we want so you can just go ahead and plug it into a and then the new visibility will be true so now it will basically turn the flashlight on and then what we want to do is do the opposite in B so we can get go ahead and get again a flashlight and then set visibility but leave this as false and then we just plug this in and then put this flashlight over here so now if I were to compile and save if I press play you'll see that now well a flashlight is not enabled over sway but if I press e now we have our parsley and we can go ahead and move around and then if I were to press e again now our flashlight is disabled so now you can see that this is very simple and I mean we have just like four notes over here this is very easy to make blueprints okay you don't have to code or know any you know coding programming itself you can just go ahead and have logic itself and just apply them okay and I'm just saying that notes the name of the notes will kind of make sense and be accordingly to what they do so in my case side base of a table will do what it is you know set it visible or invisible uh so Etc so I think to make it more organized well you can use is Select everything and then just press C and we can add a comment so what we're going to do is say well flashlight oh sorry yeah well set and flashlight on and then off so like this it's just you can basically um have your code a bit more organized by putting uh kind of comments and Stuff Etc so yeah we have a very simple example of just going ahead and turn a flashlight on and off as you can see so this is really cool now the thing that we can do is go ahead and go into flashlight and we can just go ahead and drag it inside the mesh so what this will do is basically make it a child of mesh and make mesh a parent or brush light it's going to be like inside it's gonna be like his child okay it's gonna be like inside now we have a new option which is pen socket so now we can just go ahead and drag in here and we can search all of the bones that this character model has on this skeleton so what I want to do is attach it into the head so we can just search for head and you see that now it will start like moving our cone into the head now it's off of the position that's because we have to reset the location so just press this volume in here and it will go back into here so now you'll see that it's perfectly attached into the head it will be following the rotation the the position Etc it's basically right now inside of the head so um I think I need to do is just put a bit forward and then we can change the here into five so the snapping will be a bit different so now we can just drag it a bit more there we go and then put it back to them and then what this will do is simple as just be following the bone so basically the head so now if I press play it will be a bit more realistic I press e and you'll see I mean it's hard to appreciate but it will kind of follow the Hess movement as you can see with a lot of the attention so it's a bit more realistic in this case you know what I mean and now what you can do is get this concept and put it more into the expertise mode so for example add a model so you will go ahead and add a a static mesh over here add a starting mesh and then this will be for example the flashlight model you know and then in the setting mesh you will add your flashlight model so for example uh I can just gonna add a cube now you can be very creative with these things and just add a cube and just like make it small I'm gonna also disable the snapping so I have maybe more of a freedom actually this snapping yeah for the scale all right you can also change between um different tools if you press uh w e r okay between them anyway so we can just go ahead and stretch it and make it smaller right and then this will just basically create a very simple um flashlight over here so now what we can do is go ahead and parent it into the um right hand so Hand R and you will see that now we can reset the location and now we can go ahead and rotate this guy over here and we can kind of place it in the hand as you can see and now of course this model is rubbish okay um it's not actual flashlight but you can see how it will kind of work now it's like holding a flashlight and then what you can just move this flashlight to be well and also a child of flashlight model itself and then you can just reset the rotation and then plug it over here and now it will be following this model and the flashlight will come out from there as you can see so now if I press play we have the um like the cube selector which is like the flashlight model you will replace that and then if I press e the the flashlight will come from the model itself as you can see now the rotation is a bit um not exactly good I think but you get the idea of how it would basically go ahead and work you know what I mean um uh and and just how to manage components to make them jealous of each other to arrange them and make the thing that you want and then with the event graph you just go ahead and enable a flashlight or disable Etc now let's go ahead and narrow it a bit down so let's go ahead and create an event now like I mentioned before we have functions and events I didn't mention this but I I did mention functions so an event is exactly the same as a function but it will be in the same event graph so to add an event what you can use is right click go to custom event and this will be for example turn a flashlight okay so now what I can do is replace this and then do all of this from here so the E key will not do anything but turn flashlight will do everything so now what I can do is make it more organized so when I press e it's going to be you know cleaner so I can just say well turn flashlight and call my event and you can see now there's only two notes but the less the rest of the logic is probably Happening Here so you're gonna make things multiple times from different points in your graph instead of doing it every time and copying and pasting you can just arrange them into an event and then call them later on what you want to go ahead and call them and this will do exactly the same now you can do the same thing but actually from um an a function to have its own graph so again just right click over here well sorry left click to add a new function then again turn uh turn there you go flashlight oh I had the same okay uh turn flash turn flash okay uh so you can see down well to the flash okay anyway the name doesn't really matter in this case now you can see that we have exactly the same but with his own graph so we can just go ahead Ctrl X to cut it and then paste it over here plug it over here and then compile and now you will see that if I press E I can just get the Toton flash or directly drag it from here you can choose and then this will do exactly the same but it's way more organized because we just have two notes on our main event graph literally two notes but the rest of the code is happening in this function which is here so it would just make it in another tab so you can go ahead and have things a bit more organized and you can see it will do exactly the same um so you can see now how you could you know play with functions events and things to make it more organized and just structure record a bit better um now you probably don't want to make a whole function or event just for this silly four notes over here you know like you probably want to make functions or events for bigger things or for things they're gonna reuse a lot for example if you want to go ahead and enable the flashlight not only when you press e but when you for example jump or move or uh when the game starts then you can use a an event to trigger them from different points without doing that but if it's something very small you know I don't really recommend making a lot of events and functions because then if you have a lot of them it will be a mess too you know what I mean so you have to kind of see if if the systems that are going to make requires an advanced functions or whatever you know but you can see how it will work so you guys I will be living this tutorial over here if you enjoyed it and found it helpful I would really appreciate if you could like the video and subscribe to my channel I have lots of Unreal Engine for uh five tutorials of this one so if you want check it out go ahead and now yes with all that said well bye bye [Music]
Info
Channel: Gorka Games
Views: 93,100
Rating: undefined out of 5
Keywords: games, videojuegos, unreal engine, unreal engine 5, ue5, blueprints, tutorial, quixel, megascans, unreal engine learn blueprints, blueprint for beginners unreal engine 5, ue5 learn blueprints, ue5 blueprint beginner tutorial, ue5 how to make your first blueprint, unreal engine 5 easy bluepint, unreal engine 5 beginner blueprint, unreal engine 5 how to make a blueprint on unreal engine 5, unreal engine 5 what are blueprints, ue5 make a bp tutorial, beginner first blueprint in ue5
Id: tCJ3174CssY
Channel Id: undefined
Length: 32min 8sec (1928 seconds)
Published: Sat Jan 14 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.