Intro to Blueprints: Level Editor Component Workflow | 09 | v4.8 Tutorial Series | Unreal Engine

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone welcome back so in the previous video we were working inside of the construction script inside of our light blueprint and we've set it up so that we could have a little bit of variance on each of our individual instances of our light blueprint so quickly quickly recapping here now if we go ahead and play in the editor here we could walk up to this light and press F to turn it on and notice that the lights green and our light on the back side even though it's the same blueprint that particular light has a blue light attached to it and it was on by default but we could still turn it on or off like so so that's what we did in the previous video we set up our construction script to allow a little bit more flexibility with how this blueprint functions what we're gonna do in this video is still work with blueprint classes but we're gonna do it in a different way we're gonna take a brand new approach to building our blueprint class it's just a different workflow so recapping our previous workflow what we've done is inside of our content browser down here we've right clicked we've created a blueprint class we've picked our blueprint our parent class to use which was the actor and once we've created our blueprint class we've had the ability to add components so we've added several components to make up our blueprint once we were happy with all of our components we hopped over to the event graph provided this script for how our blueprint is going to function and customized it on the construction script but what we're gonna do now is a little bit different so let's close this we're going to do here is we're going to build out our blueprint class inside the level here so we're gonna make a brand new blueprint class inside of the level here and add all the components and everything we need inside the level here and then turn it into a blueprint that we can then modify and add script to so let's go ahead and do that so we're going to it we're hop to the other side of our little building here and over in the modes panel under the basics tab notice there's an empty actor let's go and select this empty actor here we're going to left-click and drag that into our level and just place it somewhere on the floor like so it's going to translation mode so we can kind of move it around a little bit somewhere in the center like so and now with our empty actors selected if we hop over to the details panel for it notice we have the ability to add components here as well so we can add new components to the sector now notice this is an actor this is currently not a blueprint we have no ability to add script to it just yet however if we turn it into a blueprint then we can add additional script to it so what we're gonna do we're gonna add some components to this we're gonna make a bush on the side of our building here that whenever the player enters a trigger volume catches the bush on fire cuz that's fun burning things is it's fun not to sound like a pyromaniac here but that's what we're gonna do let's go ahead and add some components to our actor here so let's add a component well actually that's not let's not click the add component we're going to do a couple different ways of adding components here so let's actually go down to the content browser let's go to the props folder inside of the starter content there's an SM Bush inside of the content starter content and props folder let's take our SM Bush and you may be inclined to drag it into the level and build around it but we're going to drag it into our empty actor here so when we do so that's gonna add it as a component to our empty actor now since our empty actor is no longer empty first of all let's rename our Bush to well I guess I said which is a good name will leave it as SM Bush since our actor is no longer empty we're gonna get rid of this default scene root just as we did before with our light fixture we're gonna take this SM Bush here left click and drag it on top of the default scene root that's gonna make our Bush the new root and kill that default dummy object so now that we've dragged something from a Content browser into our actor now let's add a component we'll click the add component button and we want to add a particle system and a particle system is what is used for particle effects and our fire is going to be a particle effect that we want to attach to this this Bush here so we could search for it but it's pretty much right at the top here there's a particle system that's what we want to select go and select that it's gonna add a new particle system we'll rename this one - will they name mr. fire like so and with the fire particle system selected currently we're not seeing anything in our viewport here that's because we haven't assigned the particle system to use so down into the particle section I click this none drop down here and all the particle systems that came as part of that starter content is being displayed to us here right there somewhere in the middle there's AP underscore fire go ahead and select that and that's gonna add fire to our Bushehr now we don't want this to be on by default we're gonna add a trigger volume here in a second that when the player enters will then turn this on so we're gonna scroll all the way down at the bottom all the way but down at the bottom of this particle system there's an activation section and it says auto activate down there at the bottom for mouse-over it says whether - whether to that component is activated at creation or must be explicitly activated making a mental note to update this tooltip here we're gonna uncheck this because we don't want to auto activate this we want to activate this through blueprint script so go ahead and uncheck the auto activate there some uncheck that so it turns it off inside of our level here and then the last thing that we need to add is our box collision which will represent our trigger just as we did with our light fixtures so I'm gonna add one more component I'm going to search for box it's gonna give us our box collision so go ahead and select it and it's asking us for a name we're gonna call it the trigger box like so now our trigger box inside our level is super small and super tiny so we're gonna have to scale that up we could do that right here inside of the level editor make sure that our trigger box is selected can I move it up just a little bit I'm gonna press R to go into scale mode and just scale it along the Y and X here to kind of stretch it out like so we can move it up along the Z - I guess and W to move it gotta move it out of the wall so it is not clipping through the wall like so so there we go I think that should begin when if there enters this volume will catch the bush on fire so we have all the components that we need now we can click the blueprint add script button and that's going to turn all of these components that we've just added to this actor into a blueprint so let's go ahead and click this it's gonna ask us to select a location and a name for this new blueprint let's go ahead and save ours inside the blueprint folder we're just going to call this the burning bush underscore VP because that seems like an appropriate name and go ahead and create a blueprint out of these components and when we do so the blueprint editor opens to the viewport tab there's all of our components there's our box collision our fire which is currently hidden and our static mesh bush so we are already ready to start scripting let's go to the event graph and I'm gonna mouse wheel out just a little bit and drag a selection box around these nodes here and just hit delete since we don't need those so those can get out of here so this process is going to be very similar to what we did with the light setup so we're gonna go through this really quickly here so I'm going to select our trigger box and the components window I'm gonna right-click in the graph and there's our ability to add events for that trigger box so again add event collision there's our begin overlap we're not gonna worry about the end overlap for this example for the sake of time we're just going to use the beginner overlap to turn it on if you'd like later you can use the end overlap and turn it off but for us we're going to start with the add on component begin overlap so go and select this yeah that's gonna give us our node there and we need to take our fire we need to get a reference to our fire so let's go ahead and left-click and drag that into the graph here it's going to give us our getter so that we can access and modify this fire here and the property that we used to turn it off your callback in the level editor here so there's our fire all the way down at the bottom was that auto activate now this property determines whether or not this actor is auto or this component is auto activated or not we don't want to necessarily turn on activate we just want to activate things so we're going to drag off of fire inside of our blueprint here and we're gonna search for activate and there it is right there at the top we can activate or deactivate it so again if you're gonna deactivate this later come in and use this option but for our purposes when we overlap the trigger volume we want to activate it so go ahead and choose activate and let's move this node up just for clarity and let's connect left-click and drag our executable wire and to our activate and that's all we need to do let's just compile and save and let's close this blueprint and now if we play in the editor here later make sure my sounds down if we play in the editor here we have our Bush on the other side there if we approach it and we enter the volume our Bush now catches fire which is pretty cool again if you want to set it up so that when you leave the volume and turn it off similar to what we did with our lights you could go ahead and do that although looking at our blueprint it's kind of coming through the wall here so we could probably come through the wall let's see just a little bit more I'm being nitpicky I think that's fine so we have taken a different approach to creating a blueprint class by creating an empty actor and adding the components that we need to it right here inside of the details panel and then once we were happy with all the components and all the things that we wanted to add to that empty actor we then turned it into a blueprint and added script to it so that's just a different way just a different approach you could just as easily right clicked created a blueprint class select connect actor and then inside of that new actor actually let's just do it inside of that new actor added all those components here and then hop to the event graph and out of the script but it's just a different workflow I thought we would go through that process here together and show you a different way of doing things in fact there's one more approach that we're going to take that you can do before we wrap up this series here and that is turning anything that you've placed into into your level here turning those into a blueprint into a blueprint class so way back in the second video I think it was we created our room here we created our trigger volume and our light that we set up so that when the player enters that comes on and comes off and we did that script inside of the level blueprint which again is self-contained to this level we're gonna turn all of this into a blueprint including this building so what I want you to do is hop over to the world outliner we're gonna select all about all of our wall pieces here so select the first wall there hold shift and select the bottom wall that's going to select all of our walls we're then going to hold ctrl and select our trigger box and we're also going to select our point light so that's going to select all of those walls that point light in our trigger box they're then gonna hop up to the toolbar under blueprints and under blueprint class convert selected components to a blueprint class so go ahead and select this it's gonna again ask us where we want to save this blueprint let's save it in the blueprints folder and we're gonna call this we're gonna call this the little building well the little little house VP cuz that's nice and friendly little house VP and we're gonna create a blueprint out of it and what that's done for us is take all those components and everything that we set up and turn it into a blueprint for us now if we hop over to the event graph our event graph is going to be empty we are going to need to reset up the script for turning on and off our light there so that's going to do that really quickly so I'm gonna select all of our nodes here hit delete and let's go ahead this is a little bit of an extra credit hadn't intended on doing this but figured I'd show it so let's go and do this again really quickly so here's our collision component let's go ahead and move this over just a little bit if we right click on it you can add an event for our collision component drop the collision drop-down add-on component begin overlap and let's select our collision component again right-click an event collision add component end overlap and just as we did in our level blueprint now let's take our light component here just left-click and drag that in we're now gonna drag off of it and say toggle visibility it was so talk on visibility or toggle vis like so we're then going to take the executable on our begin overlap and connect it to our toggle visibility we're gonna take the end and turn it off as well like so it looks good let's make sure let me select our light component here make sure that it is still off by default so let's find that visible section which it still is because we set that already that's nice and helpful for us let's compile and save and then let's close this blueprint so now if we play and the editor here it's giving us an error one or more blueprints has an unresolved compile error are you sure you want to play in the editor no we don't so what is the error we're getting actually let's open up our level blueprint here or an excuse me out level we're in our little house blueprint compile I think it was the level blueprint that was giving us the error let's double check so let's open up the level blueprint I bet you this is what it was so our level blueprint it's giving us an error because we had this script that's basically repeating this script inside of our class blueprint as well as the level blueprint so it's getting a little bit confused here we no longer need any of this so let's actually delete this out of the level blueprint that was the problem let's compile on level blueprint so it's nice and empty now if we play in the editor shouldn't give us any errors and if we enter our room our light should turn on which it does if we exit turns it off go for to our bush that catches on fire and if we go over to our lights we could still turn these on and off which is nice and helpful now the beauty is we've created all of these as class blueprints now and let's actually save all of our work here let's just save it all so it's gonna save the level that we created as well as our blueprint classes well this is the new blueprint I guess we didn't need to save that but I'm gonna save it anyway might ask us to give us a new name for this new level we're just gonna call this the demo level like so so it's saved demo level for us let's actually go down to let's go to the third person VP folder we haven't been in here just yet we're gonna go back to the maps folder and this is the default map that was used for this template so way back in video 2 I think it was we created our new level we're gonna go back to the template map now so go ahead and open up the third person example map so I'll take just a second for it unloaded up this should look familiar and back in the content browser now let's go to the blueprints folder let's take our little house VP and let's left-click and drag that into our new level here so we can drag that into our level and we can hold alt and drag out a copy so while we're holding out we could drag out a copy well if I actually hold out that would probably help so hold alt and drag out a copy of it and we could press E and rotate this one around like so so the doors facing the other way yeah we can move it over or something like this you can hold ctrl and select both of these so that they're both selected you'll get a hold alt and drag out two copies of those and then we could drag in our burning bush and put it somewhere in the middle put this one over here and we could add some of our lights on like so kind of see what I'm doing here I'll press E to rotate it around press W like so alt and drag out a copy this one over and now we have this little little I guess it's a town of sorts kind of that example that I was talking about earlier and we've done this all through blueprint classes so now we can press play and we have bunch of different buildings that we can go in well I guess I need to move this one up a little bit cuz it's clipping into the floor they're like so I guess you do need to make sure that that doesn't happen uh-huh otherwise you can't enter the room so let's move those up just a little bit like so there we go so now if we play now I can go in and this light comes on don't goes off I can go in here this one comes on then I can exit our bush I approach it catches on fire in this new level can come up to this one press f2 toggles some turn that went on so as you can see we've set up just three blueprints here and we were able to create instances of those blueprints and they just automatically work in this new level so that is the beauty of blueprints it's it's very flexible very quickly you can prototype gameplay scenarios out or events or or as we've done here little structures and buildings and so forth so that is actually going to do it for this series thank you guys so much for watching I hope you guys enjoyed it we hope to see you in the next video series thank you guys we can end and we'll see you then
Info
Channel: Unreal Engine
Views: 75,645
Rating: undefined out of 5
Keywords: Unreal Engine, Epic Games, UE4, UDK, Unreal
Id: mHfiAOlZZRQ
Channel Id: undefined
Length: 18min 54sec (1134 seconds)
Published: Fri Jul 31 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.