Unreal 5 Tutor: Essential Blueprints 01: Level Blueprint

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
foreign [Music] [Music] my name is Dan and this video is at the first in a short series of videos that I'm going to do on what I call the essential blueprints in unreal and in this one we're going to look at the level blueprint these videos are designed for people who are new so unreal but actually this series of videos has some elements in it that I have found that some people have used unreal for a while are not aware of as I'm sure you'll find as we go through as well there are elements of this that I am unsure is the best use of them so I will be absolutely clear where I know what I'm talking about when I'm not uh that's my intent so as I said uh this one is about the level blueprint so the when you're in the standard editor here and this is where we are I've got a third person template with not a lot else going on in here um and um when you add things into this level um they appear over here on the right hand side um but this level itself is um is a thing that can have a blueprint and in fact it is a class in its own right and if we look through the content browse uh I'm doing this off the top right now certainly maps and the third person map that is the file that we're editing at the moment and we can see up at the top yeah whatever the size is the third person map um so uh the obvious thing to think is if you've got a level which is a blueprint can you put scripts in it and the answer is yes um uh but it's you have to know where to find it and it's up in the top left here let's zoom up here on this little button here a list of world blueprints available used for editing or creation uh you click on that there's various things here but what the one that you want here is open level blueprint and if you click on that it will open a blueprint editor for your level um so we've got an event graph here what we don't have is a viewport because the viewport effectively for this level is the main editor because there's lots of other stuff that can go on there so it looks a bit different from other blueprint classes that you might create for actors um but in other ways it's very similar so we've uh we've got an event graph here and we can do things in the event graph what we're going to do is I'm going to show you how you can create a script in the in the event graph which accesses some of the uh objects that are in the world and these are objects that don't have uh they're not blueprints they're just static meshes so they don't have their own scripts we could change them into static meshes uh to do this functionality but we can also do it this particular functionality from the level blueprint uh so what I'm going to do is I'm going to pull this down here so that it's a smaller box because that allows me to get into um to get into this editor and get into the outliner and I want to click on there because I what I'm going to do is I'm going to get this round pedestal here I've got to make it rotates it's actually made up of four pieces so we need to grab all of them so uh see if I can shift click get them there and we can because I've got the graph open here um I can actually drag from there into here and I get a node for each of them which gives me access to them so let's uh make that big again so we can see it and zoom in we have these four nodes what we're going to do is we're going to put an event tick on uh to move all four of these nodes uh well to rotate them so I'm going to start by adding The Tick event node um and I'm going to determine some kind of speed I'm just gonna multiply the Delta seconds by uh uh how much I it was 10 I did earlier so multiply just type in volts because the letter X doesn't work very well and then multiply it by 10 but it's going to be quite a slow rotation because we're in degrees so what's going to happen is that the fraction of a second but basically it's going to rotate 10 degrees per second if we do this and to access the to actually rotate the individual elements uh we'll just grab it and we say get uh static if I can type right what about get static components there we go um that's the node what we want for each of them that I if you remember from previous um videos or if you're just jumping in here you might not know when you've got a static mesh that's just pulled into a level it actually creates a um kind of like an anonymous uh static mesh actor so it is actually a kind of actor that we've got in that but then so we want to access the actual mesh that's inside the actor play grabbing those um and for each one we're just going to add a rotation to it which is this uh thing that we've got down on the left on the side so I'm going to do add World rotation um I wouldn't we're gonna need to make it up into a rotator so what I'm going to do is pull out from there and say break uh why is that same transform break no it's make I want and that's because I've got it wrong way around that's why make rotator because we're just going to use the bit that rotates around the z-axis and so we're gonna uh put that in there so the z-axis is upwards rotating around up and means it rotates an horizontal plane um and so we're going to uh hit that on there now there is one more thing we need to do we need to apply it to all four of them but the other thing that we need to do is to make that component movable um and as we highlight each of these we'll see over here on the right side let's zoom in I'm going to find the yeah I can't find it kind of there it is it's oh it's actually set to move well this is because I've already done this so if you were doing this uh fresh that would be set to static and you need to set it to movable to actually be able to move and I think you need to set all four of them to be movable before you can actually make one of them move because otherwise the others get in the way but I'm not 100 sure on that let's go back to the uh third person up here because we just wanna duplicate this and do it so I'm just doing Ctrl C Ctrl V to get more copies of this one two three four I'm gonna do each one of them separately um and chain them together there we go and take the individual components and so this add World rotation is a function that is available inside a static mesh component I'm going to take that same Rotator and plug it into all four of them so as always live coding uh there are there is a chance that this has gone wrong but let's have a look and see what's going on and yes we're now rotating all these components here so we're standing on this platform that's rotating now and that's being controlled through the level blueprint as we it will just showed now I want to give you a little bit of a caution about the level blueprint there's um a whole lot of useful things that you can do with it but it's misused quite a lot in videos that you'll find on YouTube uh in that a lot of people use it to to hold and store and do manipulations on uh things that they think of as a game meta level uh information so for example scores or health or things like that and while you can do that if you've got a um just one level in your game you then can't transfer any information from that into any other levels that you've got because obviously you've learned it in a different level if you do that and the other thing is that it's quite easy as you've seen for the level blueprint to communicate with other objects that are inside that level it is not easy at all to get anything in the level to communicate back to the level blueprint I will do a video uh later on in a different Series where I talk about how that is possible but it's quite a fudge to make that happen and I will talk later in this series about the blueprint that you should use if you wanted to do game level information so that's it from me for now [Applause] thank you
Info
Channel: Dan's Game Dev Channel
Views: 2,928
Rating: undefined out of 5
Keywords: Unreal, Epic, Unreal 5, Unreal V, Game Development, Game Engine
Id: 6iUwVrEdOio
Channel Id: undefined
Length: 10min 39sec (639 seconds)
Published: Thu Apr 27 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.