Transcripts
1. Project Preview: do you want to make games? To learn the skills and know how game designers need today? Do you want to learn how to use Unreal Engine four, The same gaming engine used to make games like Rocket Lee Kingdom Hearts? Three fortnight If you said yes to either of those than this is the course for you. Hi, I'm Mr Wandera, 12 year industry veteran and current top rated teacher who's taught thousands of satisfied students. The craft of game design in this course will design and create a full shooting gallery style game using Unreal Engine. Four. Skills learned include how to set up a project, build a level, work with materials, particles and sounds, script, interactive game play and even how to make functional menu screens. By the end, you'll have a showcase piece for your portfolio, as well as the skills and confidence to start creating your own projects. This course is for anyone with basic computer skills and a desire to learn game design. No coding. Art skills or gay making experience is needed and unreal. Engine four is completely free to use. So join me and get started on your path. Game development. I can't wait to see you inside
2. Project Primer: welcome one. Welcome all a quick project primer Before we really get rolling here, I just wanted to communicate with you all how the course is constructed so that you can get the most out of it. For starters, you should know that you should go through the course sequentially. Start with video one, then go to video to video three video for etcetera. Don't be jumping around videos because the knowledge in one video is built upon in subsequent videos. Don't go from video 40 down to 62 etcetera. Make sure you're going through them in order. Now you may notice that I have different film Il images here along the left hand side, depending on what the video content is all about. What's the difference here? Well, I've broken down videos into course critical videos and for beginners, Onley videos, any video that starts off with a black and white thumbnail image such as this that is considered a course critical video. Everyone hoping to complete this course and have a shooting gallery style game at the end should absolutely go through these videos, However, for those that are completely new to unrelenting for, I have some beginner only videos. Those are denoted by these black and blue thumbnail images. Now these give some very foundational essential information to beginners of unreal engine for things like how to place actors, what are events? What are functions, those sorts of things. And I actually do those lessons in a completely separate project from our shooting gallery . So if you are going through some of these beginner only videos and you notice that Hey, this isn't the shooting gallery style project, you're right. That's because those are done in a completely different project and are just meant to explain those very key concepts that we will be using back in the shooting gallery project that we will be putting together. So just know that go through the videos to sequentially and the video that starts off with the black and white thumbnail image is course critical in any video that begins with this black and blue thumbnail image is for beginners. Onley Alright, Hope that helps clear things up. So glad you guys join this course. Can't wait to see you inside. See, in the next video
3. Download and Install: Welcome everyone. In this video, we're going to cover how to get Unreal Engine installed on your computer. This one is just for the newbies out there. So if you're ready, have Unreal Engine install on your computer, you can feel free to skip this video and go to the next one. Now, this is an updated video I am shooting after I've recorded the original course. And the reason I am shooting an updated video here is because this looks a little bit different from when I last recorded. So I thought it was time to refresh this video. Alright, so how do you get unreal installed on your computer? Well, firstly, choosing an Internet browser of your choice. Come up in type in Unreal Engine.com. You have a screen that looks something like this up today's date that is presented to you. I'm sure that they will update this at some point in time, but you're looking for either of these blue buttons here. You got download in the upper right or get started. Now, you can click on either. They will take you to the same spot. I will click on get started now. And you're presented with an option. Do you want to have a publishing licence or a Creators license? And the fine folks at Epic Games have given you this little checkbox here to show you the differences between the two. The key difference for us is for game development, we want to choose a publishing licence. Something to point out here is no matter what you choose, Unreal Engine is free to use it. It's free. You can use it for Windows machines or Mac machines, doesn't matter. The one thing to note though, about the publishing licence that if you do, let me just highlight over it that little tool tip there. If you do create a product and then ship it and make money off of it, the first million you get to keep for yourself after that, you owe Epic Games a 5% royalty. But hey, I think that's pretty good deal. Given that you are getting these fine tools to work with, that is the Unreal Engine. So let's click this download button under the publishing licence. And then it's going to start adding this little bit, the epic installers, something or other down in the lower left, you're like, what is that? While I will explore this in just a moment, now if you're tired of hearing me Yammer, you could watch this video on how to install the Unreal Engine, but I'm going to walk you the rest of the way it through this. Now, before I even shot this video, I did this step right here. So let me just go to my folders, my File Explorer, and I'm going to show you what just got added to your downloads folder. So here in my Downloads folder, and if you wanted to, you could just click right here and say show in folder that'll take you to the File Explorer as well. You're going to see this epic installer thing where Bob and you'd be like, whoa, what is that? Well, we need to install the Epic Games launcher and this is what's going to do that. And it is through the Epic Games launcher that we're then going to install Unreal Engine. So if that's all little confusing, stay with me. Alright, so once you find this little guy in your downloads folder from here, you're going to double-click on that. And I've already double-clicked on this before I shot this video so I could show you what this looks like. So once you double-click on this, you're gonna get a window that looks something like this. It's going to be the Epic Games launcher is setup. You're just going to click Install right here and that's going to start installing the Epic Games launcher. Onto your computer. Now, I've already done this step, so I'm not going to do this, but you should do that right now. That'll take a little time and I'm going to pause the video here and rejoin you in just a bit. Alright, once you've gone through the installation process, we simply need to launch the Epic Games launcher. So let's find that icon if you don't see it here on your desktop or long your Task Bar, you can search for it by typing in epic down here. There it is. You could right-click on this to pin this icon to your task bar. It saying unpin from me because I've already got it there. And if I double-click either on my taskbar icon or my desktop icon, I can launch the Epic Games launcher. Now, again, this is the portal through which we will install Unreal Engine four. We still haven't installed Unreal for. So how do we do that? Well, along the left-hand side, make sure you've got Unreal Engine selected and across the top, make sure you've got your library tab selected. At the very top. Here are all the different versions of the engine that I have installed. I've currently got four of them installed on this computer. Down below, I've got all of the different Unreal Engine projects that I've created. And it shows in the lower right here which version of the engine I created them in. So once we have created some projects, you need to do is come back here, double-click on this and I can launch that Unreal Engine project. Now how do we install different versions of the engine? Well, we've got this little plus button right here. Once we click this next engine versions, it's going to add a little card in gray. And if I click this little drop-down, I can select different versions of the engine to install. You can pick whatever one you want, going all the way back to the very original if you want. Now, just know that I did record this course using Unreal Engine four D21. As of today's date, the latest version of the engine is 4.2c, picks a preview version. At some point in the future, they will have newer, updated versions. I'm sure. Feel free to use the latest version of the engine is should be absolutely fine. However, if you want to have the same experience, the exact same experience that I had, you can use Unreal Engine four, D21. It's gotta be for D21 or newer, however, to ensure your best experience. Anyways, once you have an engine version slotted in down here, installing the engine is as simple as clicking on this Install button. Once you do that, you're gonna see this Unreal Engine logo kind of fill up in the background from bottom to top. I'll so you can track the installation process of whatever engine version you want by clicking this download section and you're gonna see a meter and a percentage fill out here. Now again, I don't want to install any other engine version right now, so I am going to exit out of here. But guys, that is how you can get Unreal Engine installed on your computer. That'll do it off of this one, guys. See you in the next one.
4. Project Creation: Welcome back everyone. In this video, our goal is to create our project. Now, I am creating this video as an update to the previous video that once lived here because the project creation process has been updated a little bit and I thought it's time to refresh this video. Alright, first things first, we need to launch the Epic Games, a launcher. Let's double-click on that guy. And in here, making sure you've got Unreal Engine selected along the left and makes sure you've also got the Library tab, select that across the top. Now at this point, Unreal Engine four should already have been installed for you. You did that last video. Now, how do you launch Unreal Engine and then go through the project creation process? Well, that's as simple as clicking on either this yellow launch button or the launch button associated with whatever engine version you wish to launch. Now, as you can see, I've got to update all of these different versions of the engine. However, my latest version of the preview version of 4.2c six is available to launch. I can click here to launch the latest version of the engine. Or alternatively, I could click this yellow launch button right up here. Now if I click this yellow launch button, which version of the engine? Which of these four that I haven't solved? Will it launched? Well, that is dictated by whatever version I have slotted by clicking on this little drop-down right, right here. And you can see, I can choose any of these. So if I select 4.2c one, you can see how this is now got the yellow highlight around it. So if I was to click this launch button, now, it would launch that version of the engine. However, if you don't want to deal with any of that confusion as to which engine version this is going to launch. I suggest just clicking right here to launch whichever version of the engine you're hoping to launch. Alright, so once I click this, it's going to start bringing up a series of windows for me to navigate through to instruct unreal what type of project I want to create and what kind of assets that I would like to have. This can take a little bit of time, so I'm just going to pause the video here in rejoin you in just a bit. Alright, so after clicking that launch button, the first window we see here is asking us to select or create a new project. Now, here are all my recent projects and you see a lot of these icons are kind of grayed out. The reason that most of these are grayed out is because at most of these projects were made with a different version of the engine. You can see that down in the lower right. Again, I was launching Unreal Engine four dot 26x, a preview version. And in fact, I've already created a preview version of this project prior to shooting this video. That's why this one is not grayed out like some of the rest of these. Just note that say if I wanted to update my football project here from 4.2c three to the latest version of the engine, I can simply click here, say open project. And it would ask me if I'd like to create a duplicate of this project with the latest version of the engine. So that's just all FYI, Good to know stuff. Alright, let's go ahead and create our new project. We're going to be creating a game's projects here. So go ahead and select that guy clicking next right here. That is going to ask us to choose a template. There are different templates to kind of get you started creating the type of project that you're trying to make. Side-scrolling is gonna have a side-scrolling camera, a vehicle games gonna give you a car to drive around. We're going to be choosing first-person so that we've got a gun and a projectile to shoot out. And we're going to be viewing the gain three first-person perspective. So that's what we want. Use click Next. And then from here you've got some project settings that we can choose. I'm right here, blueprint, or if I click this, I can create a C plus plus project. However, note that we are not programmers in this project. We're going to be creating this using Blueprint, scripting. All of our functionality in this game is going to be created using Blueprint scripting. We want to keep all of these default options here. There's gonna be no ray tracing in this one. We do want starter contents, just FYI about this option with starter content is going to give us a few assets to play around with an explosion, particle effects, some materials to place on walls, some good stuff in there to get us started. We're also going to keep desktop console, all of this. We're going to leave at its default. Down below, we're asked to pick a location where we would like to store this project. I'm going to say that is hunky-dory for the time being, however, naming our project, please give it a name, don't leave it as my project. I call this first underscore you E4 underscore project. You can call it whatever you want. Just know that throughout this project, this is what I named this project. I don't care what you call it. From here, you simply click this Create Project Button and then it's going to start opening Unreal Engine. Now this can take a little bit of time, so I'm going to pause the video here and rejoin you in just a bit. All right, and with our project created, we are now presented with Unreal Engine four. This is the level editor interface. I'm simply going to click this dismiss button right down there. I don't care about that. Just a few quick things to note about what you're seeing in front of you here in the upper right should be the name of your project down below, in this content browser area, we've got a couple of folders that we see here. If you click this little button right here, that's gonna show or hide what is known as the Sources panel. And I just wanted to point your attention to this folder right here, these starter content folder, remember we created our project with started contents. So inside of here, you've got some folders of different things like different prompts you can use to build out a level, some particle effects that explosion always comes in handy. Some materials to place on floors and whatnot, some good stuff to get you started. Also, I wanted to point out with newer versions of the engine. One thing that is different from when I originally shot to this course is right up here in the upper left. You're going to notice that in the original course that I shot, there were five different tabs up here. These were different modes that you could place the editor in. All that they did in later versions of the engine is a simply remove these five tabs and they have a little modes button right here. So if I was to click this and I was to go into brush editing mode, that's something that you can use later on in the course. That's how you can access some of these different modes. We're not gonna deal with that too much in this class at all. Also, just note that what was once here, there were five trim tabs. They simply placed that into a mods button right here and you can turn it on and off these different modes. Alright guys, we now have our project created. You could go ahead and file and sage or current level control S will do that is well, there we have it. That is a project creation process. That'll do it all for this video, guys, see you in the next one.
5. Project Organization: Welcome back, everybody. Our project is now created in this one. I'd like to take the opportunity to organize our project before we start learning the various areas of the editor. For now, I'd like to direct your attention to the lower left hand corner of the editor in an area known as the Content Browser. And I'm currently looking at this folder structure right here. And if you don't see this folder structure off to the left hand side, you can click this little button right here to show or hide what is known as the sources panel. Now, this is a simple folder directory like you would find in Windows Explorer. And in fact, if I was to right click on this content folder right here, I could say show in Explorer and you can see how these folders actually live on your computer is Welt directory of folders here in Microsoft Windows Explorer and then also right here in the content browser. Well, we're gonna be doing in this one is simply creating some folders that our assets throughout the project are going to live within. We've got some folders that exist here, but I want to create some of our own and show you how to do that. We're going to start off by right clicking on this top most content folder and in the right click menu. We're going to select new folder, and we're going to name this simply first project. Okay, with that done, I'm gonna add some sub folders underneath it. So I'm going to right click on the first project folder, select new folder, and I'm going to call this one Blueprints. Blueprints is very important. When it comes to unreal engine. I'm going to select my first project folder again and right click new folder. I'm going to call this one levels. Right. Click again on first project new folder. This one. I will call you I for a user interface and for hearing a slow drum beating sound in the background. It is raining rather heavily where I am currently located. All right, so with those folders in place, we're gonna add a couple more, but I'm going to place these within our blueprints folder. So go ahead and right. Click on your blueprints folder. Add a new folder and we will call this one actors right click again on the blueprints folder and add another one called Framework. So there we've got our folder set up that we're gonna want for this project. One more thing as it relates to folders you can actually right click on any of these folders and you can choose to set a color like this. You can simply punch in an RGB value. Or you can simply slide around this little dot here. Ah, blueprints folder. I'd probably make this Probably makes sense to make it some shade of blue here. So pretty happy with that. We'll go OK. And there you go. One more thing before we finish off this video while we are here, let's go into our Levels folder. You can see our current directory along the top here, content first, project levels, content first project levels. And we're going to create a new level. Now we could actually right click and create it from here, but I'm actually going to do choose to go into this file menu, win the upper left because if I choose new level from up here, I then have the option to choose a default VR basic or empty level. And I want to choose this default level to go ahead and select that. It's gonna ask you after you choose to save it here because it is currently untitled and not saved. Let's go ahead and click the save button along the top, where we would like to say this into and we want to places in Our Levels directory here. So first project levels. Let's call this guy L. V. Actually, let's do the full word level underscore 01 and then click Save and you will see that asset now populated inside of your levels folder. All right, that's gonna do it all for this one. Time to learn some basics about the editor itself will see you in the next one.
6. Game Design Overview: All right. Welcome back, everyone. Now that you have learned some of the essential skills working with unreal engine for its back to working on our very first project here, let's start off by taking a look at our finished project and what we're going to be building on and welcome back. Hopefully that gets you a little excited for all the work that we got ahead. OK, take a look at what we've got here. We've got some play mechanics that we're going to be implementing into our project, namely walking, jumping, shooting targets and opening doors. Always a good idea to identify. What are your plane mechanics? We have one simple system in our game. We have a health system. Our health will deplete when we hit some hazards and it can be replenished by picking up some health pickups. We have just a few level hazards out there. We've got some steam jets that can damage us when we touch them. We've got some spinning van, some spinning fans that can hurt us if we hit them. Instant kill zones like pits, spikes. You can choose to add some of those later and maybe will should explore some of that as the course goes on, that's not super essential. But that's a possibility and I've also identified the time limit as a level hazard itself. You are kind of racing against the clock here to reach the end of the level. In addition to hazards, it's a good idea to identify what are your games objectives? Most games have a primary objective as well as secondary objectives in this one or primary objective is simply to get the high score. We could create a leaderboard in a top 10 and all that sort of stuff, but that requires a lot more work not going to do that in this course. But we will say that our players objective is to get the high score. Secondary objectives obviously include shooting targets, staying alive in completing the level game rules. Now game rules are essential to any game. And really, any game that you guys play have I'm guarantee, has a lot of underpinning rules that determine how things work in that world. Some of the game rules in our world are as follows. If a player shoots a target, then they receive points, Ah, speed bonus or a time bonus. Now I highlighted the words if and then in that particular bullet point there, because that is really how many rules in games are structured, if this than that. Or sometimes while this than that, here are a few more rules that we have. If a player touches steam or a fan than they lose health, that's rule. If a player touches ah health pickup, then they gain health. If a player loses all health, then they respond at the start of the level with score and time intact. If a player reaches a target area, then they complete the level and receive a final score. And lastly, if a player runs at a time, then we're going to say it's game over. No score. Only option is to quit or restart. Why is it important to identify these game rules? The reason is because we are eventually going to have to implement some logic into our game to account for all these source off events that happen. And if this happens, then what happens? And through a process called blueprint scripting, we will make all those game rules a reality. Lastly, I just wanted to share with you all the map designed that I am going to attempt to build in this course, I'm going to suggest that you try to build something close to what I am creating. You can take some creative liberties in there, and I'll let you know when you could do that. There are lots of ways to create what we call a paper map designed, even though it's not always done. On paper, you can use simple graph paper. There are a lot of old school designers. It's still swear by using graph paper to help get the size and scale of your level down. Nowadays you got a lot of modern day programs you can use as well. Microsoft Visio is a good one. I used Ah Google Extension, known as draw dot io, to create this top down map you see over on the right hand side. But you can use anything you can use photo shop, or I don't know anything that you can think of to create a map design. If you are using Google, check out draw dot io. It's not too shabby once you learn it a little bit, and just to talk through our map here a little bit. Um, you will see that I've got a legend often left identifying key things. Like, Where does the player start down here? Where does the level end up here? And also I've kind of got my sections. My zones of the level sort of mapped out is well in scaled. You can see that I have identified an X coordinate in explain right here and a Y plain. And also, I included a numerical value down here. 11,000 U U. Which stands for unreal units. Each unreal unit corresponding to one centimeter. Just to give me a rough idea and see the overall scale of my level. Now, I may a justice a little bit as we go along, but that's essentially what I'm gonna be shooting for. So always a good idea to create yourself a top down map prior to gray boxing your level. All right. That's gonna do it all for this one. Guys, in the next one, we're gonna be talking about player metrics. See, there
7. Player Metrics #1: All right. Welcome back, everyone. And in this video, we're going to be talking about player metrics. Well, first of all, what are player metrics? Player metrics are parameters that determine things about your characters. Things like how fast can a move, How high do they jump? And there are metrics associated with other elements of your game as well, not just related to the player in this one. We are going to be using first person template and shooting out projectile. So we wanted to determine things like how fast is our projectile? Doesn't projectile bounce? What is the gravity gonna be like on the projectile? Is it going to drop off eventually, or is it just going to shoot in a straight line forever? Now, why are these things important to determine before we start the great boxing process? Well, let's think about this, and I've gotten example to share with you. Let's assume that we were all tasked with making a Mario game, and we have decided that pipes are going to be about 200 unreal units tall and that we want Mario to be able to jump on top of this pipe in a single jump well, we have to make sure that Mario can jump high enough to obviously get up and over and onto this pipe. There's a parameter in unreal engine for a character known as the jump Z parameter, and you have to set a value to it to determine that he can get up high enough to jump that 200 unreal units. Now, maybe the value for that jump Z parameter is something like 900 and that will actually get him up high enough for any time. You press that a button that he's going to jump up on the pipe so you would do that before the start of the project to ensure that for any pipe that you put into your level, Mario can get up and onto it. Because if you build that pipe to be 300 unruly units, he's not going to be able to jump up that I So you go about building all your levels with pipes that are 200 unruly units or shorter. But then maybe you've got a boss that comes along and says, Hey, you know what? Morrow's jumping crazy high in this game. That's just not realistic. Not that a Mario game is realistic, but bear with me. So your producer, your boss tells you you know what we want you to half Marios jump I So now you change his jump Z value that determines his jump high to 450 now, every level that you had built with pipes that were 200 unreal units tall are no longer going to be able to support Mario jumping onto them. Mario is not gonna be able to jump up high enough to get up onto that pipe. And now guess what? You've got to go back into your level and fix all your jumps because you changed one player metric. That is why it is important before you even start building out your levels, even gray boxing your levels that you get a pretty good sense as to how your character is going to play. How fast is he gonna move through your level? How high is it going to jump? How fast those projectiles gonna move? Are you? Are they gonna bounce all these sorts of things so that when you build out your level, you can build it out with full confidence that you're happy with how your characters move. Okay, so with that, I'd like to transition into the unreal engine to actually modify some of our player metrics now.
8. Player Metrics #2: So in jumping into unreal at this point, we are actually going to be digging into something known as our character blueprint. And there's a lot of talk in this course about blueprints. This is jumping the gun a little bit because I don't want the discussion to be diverted to much of the blueprints, but we need to dig into a character blueprint to simply get to these metrics that I've been talking about. So here in your content browser, select your first person blueprints folder. So again, I am in the content first person BP Blueprints folder and you're gonna find an asset known as your first person character. Go ahead and double click on that guy to open him up and in here along the left hand side, you see a whole bunch of components that make up your character. I'm gonna select this character movement component, And if you just want to see what your character looks like, you can select this view poor tab here, and you can see that your first person character is nothing more than you is a camera and some floating arms, right? All right, so with your character movement components selected over on the right hand side, you're going to see all the detailed parameters associated with your character movement component. Now, there are a lot here, but I'm on Lee going to be dealing with a few of them. The most important ones that I have identified you can drag and drop are done. Dragon Trump, You can move this left and right a little bit to help read the text or hide the texts as you see fit. And you can drag this window out a little bit like that as well. We're going to start off with probably the most important one. This one known is Max. Walk Speed. This is what determines how fast your character moves throughout the level. A value of 600 right here. I'm just going to jump in place you so you can get a sense as to what that is like I'm using my W A s and D keys to move around right here. If I was to set that to be something like 100 then just jump in and play W A S and D, you can see that I am moving much slower, so that is obviously going to affect the rate at which I am able to move through level so critical before you start great boxing. How fast is your character gonna move through the level? So I'm gonna set this back to 600 you can actually click this yellow triangle right here to reset it back to his default. I like that value pretty good. The next one is going to be this this jump Z value that we just talked about in our Mario example It's called Jumps the velocity officially, and you can see that this is what's going to determine how high your character can jump. So I'm gonna jump in and play hit the space bar. You can see about how high he jumps, selecting my character movement component again. I'm then going to set this to be Let's try 1000. I'm going to jump in and play, and now you can see that I jumped way, way higher. I'm just pressing the escape key to escape out of this play mode. In case I already forgot to mention that I am gonna go ahead and set my jump Z velocity to 500 another good one to mess around with. Here is your air control. This is going to determine how much control you have over your character while they are in midair. As the name suggests, I find this value to be a little restrictive. Ah, value of one is going to give you a lot of control. In fact, I'll set it now and then just jump in and play. And you can see that as I jumped. If I move the press, the d key or s key, I can pretty much almost move myself off of my tiny level here. A zai am doing so. So I'm going to change that back to a value of I found point to to be to my liking. 0.2 next one that is fun to play with. That you can experiment with is this one up year known as gravity skill. So value of 1.0 means that gravity is doing It's normal thing. If I was to set this to something like I don't know point 5/2 and I go in and play, you can see actually wasn't too much of a change. Let me go a little bit more drastic with that, I'm gonna go to, like, point to and play again. There you go. This will also have an impact on your jump height because it's kind of like you're on the surface of the moon with less gravity and you can jump 20 feet in a single bound. Right? I'm gonna set that back to one by clicking this yellow reset to default. There are a whole lot more parameters here that you can play around with. Those are the main ones I wanted to talk about here. There are a few more parameters in this area under the class default. I'm going to direct you to click on this right now. And over on the left hand side, there are two important parameters to talk about. There's jump, Max. Hold time and jump, Max, count. We'll start off with the max count here. That should be pretty obvious. This is the number of times they can jump in a single turn while they're airborne. So five set this to three, for example, that will give me a triple jump. So 123 Obviously, I can't go more than that just three times. I'm gonna set that to one jump, Max, Hold time. Is this kind of effect? You know how in a Mario game when you press and hold the a button, Mario will jump a little bit higher as opposed to when you just tap the A button. So if you want that effect toe happen, set this to be a value greater than one. I'm just going to give you an example as to how crazy this can kind of be if I said this to a value of like to that is ah, hold time of two seconds. By the way, if I tap the space button, I jumped pretty high. If I hold the space button, it's kind of got a jetpack e type feel about it, not something I'm too crazy about. So values that are larger than half a second kind of give you that jetpack field. Maybe that's what you want. Maybe not for me. I like a value. Well, excuse me like a value of about two point 25 and you saw something I just did right there. That's worth mentioning. And I click this little drop down arrow to collect to collapse. These parameters to know that you can do that in various areas of the editor. The 0.25 will give you something like this. I just tap the space bar. A little jump, I hold it, get a little bit higher. Not too bad. Okay, that's gonna do it for our character parameters. There are some or projectile parameters I want to set. So with that, I just want to make sure that I compile and save, and that is gonna make sure that all your values here stay the same. And I'm gonna exit out of here in the same folder where you found your first person character is your first person projectile that you can shoot out. Go ahead and double click on this guy. And you can drag and drop this tab to be right along your level tab up here. And if I click on the view port, you can see that we are shooting out these little yellow balls right here. Isn't that cute? All right, go ahead and select your projectile component along the left hand side. And there are some parameters to know about here. One of the most important ones is your initial end your max speed. This determines how fast your projectile, Congar. Oh, now, if I set my initial speed, actually, just let me jump in and play and show you how fast the shoot out that gives you a rough idea. And then you may say, Well, that's too slow. I want I want that to be, you know, triple the value. So I'm gonna set this to be, like, 10,000 and well, that's certainly should go faster right now that goes about the same. The reason that that is the same as before is because if you're going to raise your initial speed, you need to raise your max speed as well, because your initial speed is that is when your projectile is at its fastest. This is basically saying Nope. Your projectile can only ever go 3000. So your initial speed here of 10,000 not valid. But if I changed my max speed here to 10,000 to match my initial speed and then play, you can see those fly out way faster. I like a value of like 6000 for the east. I'm gonna roll with that. I usually set those to match. If you don't like your projectiles falling off for having gravity applied to them, you can fiddle with this. You've seen that it kind of drops off after a while. So if you set this to be a value of zero, that means no influence from gravity, and that will just keep going straight. Maybe that's what you want. Maybe that's not what you want. I usually like to set this to about I don't know, 0.7 or so. Let's see what that looks like. That's not too bad. Maybe we'll fiddle with that one later on. That one's not to, uh, we don't have to worry about that, too. Too much for building out our gray box levels. Um, other parameters you may want to experience experiment with here are should bounce by default. This check box is checked on saying yes, it should bounce like, so you can also choose how bouncy it is if it should bounce. So play around with that one other parameters that you should know about. Here, um, go into your class defaults button up here cause there's one more pretty important one with your class defaults button selected. Look down in the lower right hand corner of your screen. In the details panel, there is an initial lifespan. This is stating that after three seconds, this projectile is going to disappear from existence. So play around with that one as well. I am going to leave it at its default again. Whenever you have changed some parameters here. Always a good idea to do this thing called compiling and saving to ensure that your changes have taken place. All right, get exit out here. That is going to do it all for this one. Guys, we will see while in the next one.
9. Geometry Overview: All right, Welcome back, everyone. In the last few videos, we've taken a look at our overall game design. We've figured out some character or player metrics that we are happy with. We are ready to go about gray boxing a level and great boxing is done in unrelenting for using geometry. Now we're not talking mathematical equations here. We're talking about geometric shapes. So before we get started, I wanted to take a quick overview as to what geometry and under your engine four is all about and why we use it in the gray boxing process case of First of all, here's an outline of what we're gonna be covering in this relatively brief slideshow presentation. It's going to start off with an overview, so geometry is short for JIA g o metric brushes. Geometric brushes are simply tools used to sculpt the gaming world in general engine, for there are two distinct brush types that we will explore. There's an additive brush type that adds shapes to our world, and then there's a subtracted brush type that subtracts shape from the world. Brushes come in different shapes. Now the purpose of using geometry and unrelenting for is to rapidly prototype a level. The idea is that you want to build a level quickly to get the scale inflow of a level Down on the left, you see a prototype level in unreal engine using geometry, so simple geometric shapes to kind of get the size and feel for how level layout is all set up. Onley once that is determined, the size and scale of things in the flow of things. Do you want to transition from this prototype over on the left hand side to this finalized look over on the right hand side. Why is that? Well, the reason is is this picture on the right takes a lot of time and effort to get looking that beautiful. You don't want to create something this beautiful and then suddenly realize that the whole scale of your level is way off. It's either way too small or way too big. So what you do is you gray box of level, using simple geometric shapes to get the scale and flow down first and only once you're happy with that. Do you transition it over to this finalized look? So we mentioned that geometry comes in different brush shapes. So unreal. Engine four. You've got access to a box shape, a cone shape, cylinder sphere, cursed air, linear stare and spiral stair. We talked about the two different types of brushes, and you're kind of seeing that in action. In this slide. Right here, there's an additive brush that will add geometry. That's his purple right here with a subtracted brush. So there is a subtracted brush, which is in pink right here, overlapping this additive brush. So here you're seeing it in more of a full view. This is the wire frame view of what you're seeing over on the left right here. So an unreal engine for where do we access geometry? Well, in the upper left hand corner of your engine, you will find the modes panel, and there are five different tabs across the top. The left, most one being placement mode along the left hand side. You've got some tabs that you can select, and you have one for geometry. This is where you could find your different geometry brushes. Once you've got a brush in your level, you can actually find tune its shape in something known as geometry edit mode. which we will explore a little bit later. That is the right most tab of our modes panel. When you are in this sorry geometry edit mode, there are things that you can change, such as the face, the line or the Vergis E that is the flat side, the edge or the corner. Layman's terms for you all with any of these John geometric brushes again will export more that later. So various terms to remember here as it relates to gray boxing in geometry. So great boxing is nothing more than a rapid build out of a level using geometric shapes, additive brushes, adds geometry, shapes to our world, subtracted brushes, subtract from the world. Face is the flat side of a geometric shape line is the edge and avert. Asi is simply the corner of a geometric shape that will actually do it all for this one. We are ready to go about gray. Boxing are level we will see while in the next one
10. Additive and Subtractive Brushes: All right, welcome back, everyone. In this video, we are going to talk a little bit more about additive and subtracted brushes in under engine for and seeing how they work. So again, as we just covered over in the modes panel, which is way up here in the left hand corner of our editor, we are by default in place mode along the left hand side. You've got various tabs and we are going to be selecting this geometry tab. And with that selected, you have access to various geometric brushes to drag and drop into your level. And it's a simple is left clicking and dragging this out into your level like so Now this is an additive brush because it added geometry to our world. It added. This Q shape and I know that it's an additive brush, not only because I see that it added geometry, but because with this actor selected, this is known as an actor. Now that it's added to my level over in the details panel, it says the brush type is additive. You can also see that any time we add any of these particular geometric shapes to our level down here it is determining if what we're adding is an additive brush or a subtracted brush so I could change my next box brush that I'm about to bring in here to be subtracted right out of the gate. So let me click on this to change that, to subtract Ivo. And now I'm going to left click and bring in a subtracted box brush. Now it's gonna show up in this kind of wire frame. Eve you. And if I move this over to the left to intersect with my additive brush, you will notice that that it takes away geometry from the additive brush. Now I'm gonna demonstrate something that ah may confuse people right out of the gate. But I'll explain what's going on in just a moment here. I'm gonna bring out another box brush, and again it will be subtracted by default because I've got some attractive selected down here and I can change this brush to be additive from over in the details panel. So changing it from subtracted toe additive. Now, you might think that if I move this additive brush over to where my subtracted brush was that that subtracted brush would take away from it. But you can see that while the subtracted brush takes away from this one, it doesn't take away from this one. One thing I just want to point out really quickly, there's subtracted. Brushes can be a little tricky to select after you've selected off of them. So if you were to click kind of the inside portion of this additive brush right about here , that's an easy way to get that subtracted brush back so you can see that are subtracted. Brush here is overlapping this other additive brush, but it's not taking away from him. That's because the ordering of when we place these actors is not conducive to subtracting from this one. Because you see this box brush was the last thing that we added to our level. If I was to take this attractive brush and over in the details panel, I go under the brush settings and I click this show advanced. There is an order option, and I can click on this and set this to be the last thing that I have placed in the level. And now you'll see that it does in fact, subtract from this geometry So if you're ever wondering why it is not subtracting or adding like you are expecting, just remember that in our brush settings where there is this little drop down arrow to show advance, you can change the order with which your various brushes were added to your level. Okay, with that all done, what I'm gonna do is I'm gonna delete out this guy, and I'm going to demonstrate for you very quickly how you could make a door and a window set up. So I'm just going to take my additive brush here. I'm gonna scale it like so maybe make a wall like this, and I'm gonna move it over and up and tap that end key to make a drop down to the floor. You can see my subtracted brushes right there, so making a window would be nothing more than making sure that your subtracted brush penetrates all the way through an additive brush like so. So you can imagine how you can create windows and doors just like that. Anyways, that is all I am going to demonstrate here in terms of additive and subtracted brushes, just as a quick recap. Here's our geometry tab with various geometric shapes. We focus here on the additive and subtracted brushes. You can change their additive or subtracted right when you place him in the level by clicking either of these. And once they are in your level, you can come under the details panel with that brush selected and change if that brush type is additive worse, attractive. And if you're not happy with how the additive and subtracted brushes are interacting with one another, don't forget this advanced menu where you can change a given brush to be first or last. That is gonna do it off for this one. Guys, we will see you in the next one.
11. Geometry Brush Settings: all right. With our discussion of additive and subtracted brushes completed, it is time to talk more about geometry brush settings. It's important to know all the different settings of our various geometric brushes before we begin the great boxing process so we can get the most mileage out of each brush type. Let's explore the box brush a little bit further here, and I'm just going to drag and drop one into our level. And with that guy selected over in your details panel, you can see that you've got a whole section of parameters labeled brush settings. Now, when you go and size up or down your box brush here, you can do it in multiple ways. And this confuses a lot of people. You know that when you press the space bar, you can change between movement, mode, rotation mode and scaling mode, and I could scale a box brush like this. You could do that, but I wouldn't recommend it when dealing with brushes. And here's why. You can see that I've changed my brush scale. But the brush shape still shows that the box is 200 unruly units by 200 unreal units by 200 UN really units. Now we know that the X value the X is not actually 200 because we've scaled it up 2.75 times that size. So it's not actually 200 unreal units. You got to do some math there to figure out exactly how large it is. And that can get a little complicated when looking at your paper map that you've designed in figuring out how maney unreal units something should be. So what I recommend is that when people are working with geometric brushes that they don't actually scale it, but instead use these brush settings to determine its size. Instead, I'm gonna click this little yellow triangle to set this back to default. And what I'm going to do next is I am going to change my box brush here to be a little bit bigger. I'm gonna go 500 by 500 by 500 and then I am going to change off of skill mode by pressing the space bar, moving it over and up a little bit, and I'm gonna hit the end a key to slap it down onto the ground. Although that did not take. So I actually I'm just gonna move it down like so. And one more thing I am going to do is check this box called Hollow. This is a great thing to do when trying to replicate or gray box out a building. So what you can do with that checked hollow, you can then determine the thickness of your box brush, and I'll set this to be 20. And now, if I bring in a box brush and make it subtract Ivo, you can see that I can now get to the inside of my hollowed out box brush to cut through the floor a little bit. Mice attractive brush there, but you get the idea. I'll go ahead and delete that out and delete this guy out. Next. Let's talk about the cone. The cone of shame. Right? All right, so few parameters here that you can adjust. You got your Z value, which is currently at 300. If you said that to 500 obviously you're going to make that taller in the Z plane. Your outer radius is going to be going to determine how big this, uh, top of the ice cream or should I say, a top or bottom of the ice cream killing? Let's flip this over. Let's begin. Ice cream cone, shall we? Right. Got a nice little ice cream cone. They're gonna change my outer radius here to be something like 300 right? A little bit wider. Too wide for an ice cream cone. And our sides here going to determine how many sides I'm gonna go. Something like 30 just to make it a little bit rounder. Ah, Word of caution when you are dealing with the cone or the cylinder and you get to determine how many sides I wouldn't go crazy with this. I know everybody nights likes to make it look nice and round, but you're just trying to create simple geometry here. More count polygon equals worst performance. So you know what? I'm gonna be a good designer. Change that to a lower value, like 10. You can also make this one hollow is well, so just know that I'm gonna leave Mr Cone out here for a while because we're going to do something with it in just a bit. Here, let's explore these cylinder brush next here to you've got a Z value that you can change an outer radius that you can change and sides as well that you can determine. And also you can make that hollow as well. Let's explore the curved stair. Next. Here, you can determine things like the inner radius. Let's go 300 you can see how that pushed it out from this central point right here. 400 just toe. Situate that again. Step height. You can determine how high each of these steps are. If you make it something like 50 or 100 just know that if you're going with something crazy like this, suddenly your character is going to have to jump up steps instead of walking up them. Set that back to its default step with will do exactly what you think it does. Make those steps wider. Angle of the curve instead of 90. Let's go something like 45 you can see how that lesson that angle and then the number of steps. Let's say we want it to be 100. Yeah. There you go. Stairway to heaven. Right there. All right, we will get rid of that guy for the time being. Ah, linear stairs got much the same parameters. Step length, height with etcetera. Same with your spiral stairs. One thing I did want to mention with any of these brushes is a phenomenon that I just demonstrated by accident. Right here is after you click off of a brush and then click back on it, You're going to say, Hey, where are my brush settings? Well, what happens is when you do that, your brush settings get pushed down to the bottom. Here and up to the top, you see a whole bunch of parameters labeled under surface properties. These have to deal with materials placed on these brushes, and we'll explore that a little bit more later. So just know that if you click off of a brush and click back on the brush, settings are lower in the details panel. Last but not least here, I'm going to bring on a sphere, and obviously it doesn't look too spherical here. But you got some parameters here to change it in the brush setting radius is what you think it is. If you set that to 500 you've just made a bigger spherical shape, but the real one that's going to make this more spherical. Is this test elation one And you can Onley change this up to a value off five. And you can see how many polygons it adds there. If I decreases, you can see it becomes less. Unless so, this Onley takes a value between five and one. We'll go value like three right in the middle there, and I'm gonna change this radius down to 100. Actually, I'll go 200. And the reason is, I'm going to demonstrate one more thing as it relates to geometry brushes. I'm gonna move this brush kind of on top of our cone here. And, man, I should really be a good designer and use my Ortho graphic views, right? And what you've got here is a nice scoop of ice cream on an ice cream cone. Now, let's just say that Hey, you really like that ice cream cone shape And you wish you could say that out as a static mesh actor, which is something we're gonna be learning more about later so that you can drag and drop these into your level. Can you do that? Yes, you can. And the way you do that is You select one geometric brush like you got here. Hold down control and select the other geometric brush. And then over in the details panel, you're going to come under your brush settings and click this little drop down a row to show advanced. And in your advanced settings, you can shoes to click on this creates static mesh button. It'll say, What would you like to name this thing? And where would you like to say that I am going to put this in? Let's put it in my Starter Content Shapes folder. And I will label this as S M Underscore ice cream and click create that static mish. So these are now not considered geometric brushes, but one static mesh asset. And I can now find that in my starter content under the Shapes folder. And there is my static mesh cone pretty cool, so you can make your own custom shapes in un really using geometry and save them out as a static mesh. I'm gonna delete that out because I don't really want it. All right, guys, that is going to do it for this one on geometry brush settings. We will see you guys in the next one
12. Geometry Editing: All right. Welcome back, guys. And we are continuing to expand our knowledge about how to work with geometry before we go ahead and gray box are level. And in this one, we're going to talk about geometry editing. And the goal here is to demonstrate the different ways geometric brushes can be manipulated to create all kinds of interesting shapes. To help with this discussion, I'm gonna bring in a box brush. And next What I'm going to do is I am going to kick the editor into a different mode. Currently, we are in place mode. We're gonna jump on over to this tab over here known as geometry editing mode, and you can also get there with the hot key of shift plus five. And you could see that as soon as I clicked on this my geometric brush here changed to have this kind of purplish outline and right away what we can demonstrate here is how to manipulate our box brush in three simple ways. One way you can change the shape of this brush. This is simply select what is known as a face. That's a flat side. So I'm gonna choose this left side over here, and I'm just gonna grab this arrow using my left, click and hold, And I can obviously extend it out like So you can also do this with lines by Lines were talking about thes thin lines right here. And these air honestly, pretty hard to select, but you'll know you've gotten one when it turns orange. So I could simply so like that and move it up into the air, create a little bit of a ramp that is super useful. Additionally, you can select these little corner pieces here and move those out as well to create a shape , something like that. And I got a ramp that sort of extends from a skinny, skinny mouth to a wider top portion. Okay, you can see as you're modifying the shape here is gonna add some polygons where it needs to . Okay, Next thing I am going to do is delete this out because I want to start off fresh with new box brush here, and you may try to select it and then go delete like that and you're like, Oh, my gosh, what did I just do? That's not what I meant to do So just demonstrating what to do when you want to actually delete out the brush is jump out of geometry edit mode so you could simply come back into place mode and selected and then delete it. Or you can select the box brush here in the world. Outline er whoops tapped into the leaky, and that will get rid of it as well. So I'm going to jump back into place mode here, come under geometry and add another box brush and then jumped back into geometry edit mode to show off the next thing. Okay, with our box here, I'm going to attempt to extrude it when I mean by that is, I'm going to select a face. And then when I do that, this extrude option up here becomes illuminated. It wasn't illuminated before. You can see if you click off of it. It's not illuminated, but if you select it, it's like that face. Rather, you can then select extrude. Now it will give you this little pop up saying extrude. Onley works in the local coordinate system, and you just click this close button and say, yes, I understand, and then you get these settings that you can play with right here. Now we know our box brush here is 200 by 200 by 200. So what I'm gonna do is I am going to set my length here to be 200 in my segments. Here to be, Let's say, 10. And nothing has happened yet until I click apply. And what I am saying, Here's I want 10 more segments to branch off in this direction that are each 200 unreal units across. Now watch what happens. Boom. Just added a whole bunch mawr boxes out here. Now, why would I ever want to do this? Well, guess what you can do from here. You can modify this fine shape in which ever way you want. Maybe you want to grab this face, pull it out that way. Maybe you want to grab this face, pull it up. That way, you can see you can do all kinds of crazy things with just one simple shape. Uh, let me go ahead and delete that guy out so I don't have too much of a monstrosity here. Gonna just jump back into place mode in place. Another geo metric box brush again and then hop back into geometry edit mode once again. Ah, this time I am going to select a line. And again, these can be pretty tricky to select. And you can see that when I have selected a line, a button over in geometry edit mode has illuminated this one called Split. What this is going to do is it's gonna take this line and split it perpendicular early. So clicking on that I have now created a section over here in a section over here that I could move independently of one another like so. Ah, the other option that I would like to point out while we're here is if you select one Vergis E. That is a corner piece and you select another Vergis E by holding down control and left clicking not the line, but rather the vert ISI. Again, these can be a little tricky to select. They will turn orange. That's Holly, who will know that you have them selected. If I click this Weld option, what will happen is you'll get rid of one introverted sees here, and it will collapse it over here to your first selected Verdecia watch what happens. So now you've gotten rid of that Vergis E, and these two are connected to this guy. So you can see how you can use that to create even more interesting shapes, as I did before. I'm going to go ahead and delete out one of these faces here to show you how you can get a polygon back in the event that you do delete a face. So if I select this face right here and tap mind a leaky, how do I get it back? Well, what you can do is you can select one versi than hold down control, select another and another and the fourth. And with all four of those now selected, I can release the control button and simply select this create button over here to bring a polygon back. Okay, Next, I am going to jump out of our perspective, you and come up over here into our left Ortho graphic view. Let's enlarges because we're gonna be doing some work in here, and I'm gonna delete out this box brush because I don't want that. We're gonna do something a little bit interesting next over in the geometry edit mode panel . There is an option for Penn. Go ahead and select this. Well, we're gonna be doing is we're going to be creating our own brush shape. And to do so, we need to take this create brush shaped box to go ahead and click on that. And then let's actually set our snap settings here to be 50 instead of 10. And then let's hold down control and scroll wheel in to make things a little bit easier to work with a little bit bigger. Okay, I'm just gonna click on my window here, and you should see this square sort of cursor that is moving around with your your normal pointer cursor right here. And I am going to find an intersection point like so. And I'm gonna press the space bar wherever I want an intersection point of sorts or sorry and main points to show up for my brush shape. So there is a corner point. I'll come under a little bit like that will go here and here and here and pressing space wherever I want one of those corners to appear and then press space bar one more time to create a simple sort of step shaped like that. Now I'm gonna jump up out of my Ortho graphic left of you and instead access my Ortho graphic top view and what you could see from atop views. We've just kind of created this liver piece right here. There's no depth to it whatsoever. That's what we're gonna actually managed to do next. And I'm gonna come a little bit underneath it here. This wire frame is our floor and right about here I am going to hold down the altar key and then press the middle mouse button that is my school wheel to set a pivot point around which we are going to lay the so note that we got our brush we created up here in a pivot point right here. With that done, have impressed anything yet. I'm gonna come over to geometry at it and click this lay the option. And when I do, I'm gonna get some settings here. How many segments? What I like in how many total segments are going to create the entire circle, your circular area that you're about to see. So I'm going to say there's going to be 16 segments to a circle, and I would like mice to get eight of those segments to essentially create a semicircle. Now, watch what happens when I click this apply button. I've essentially taken that stare Stich stare shape that I created and lay that around this central pivot point right here. So now if I jump back into my perspective view port, you can see that I have created I don't know, some stands or something like that. Great first sporting stadium, anyways, that is going to wrap up our discussion on geometry edit mode. Hope you guys learned a lot and we will see you in the next one.
13. Building to the Grid: Welcome back, everybody. We're getting also close to starting our gray boxing process. But there are a few important concepts to talk about first that are gonna help you immensely. And this one is going to be all about building to the grid, something I am constantly harping on my students to do because it is going to make your Cray boxing life a lot easier if you choose to build to the grid. What is the grid? Well, what you are witnessing right here. In my perspective, you port is the grid. This white ish area with these lines. This is this thing called the grid, and it is there to help you build more effectively and more efficiently. There is a place where you could actually turn off this grid if you don't want it, which I don't know why you wouldn't if you click on this show button available in any U port, you can simply tick that off to make it go away. But I highly recommend that you leave it on. So what is this grid represent? This grid represents all these squares represent a certain amount of unrealized units. Again. One unreal unit equals one centimeter so you can consider a six foot man to be about 183 unreal units tall. It's always important to remember your scale when you're building out your level six lowman about 183 unreal units tall. In fact, it might not be a bad idea to place a geometry brush that is 183 unruly units high in your levels so you can get that skill down right now, All of these different grid lines here, these boxes each represent 50 unreal units. That's 50 unruly units in this direction and 50 in this direction. How do I know that? Well, right up here is my grid size that I currently have set units of 50. If I was to select this and said it to be 10 you can see that my grid line suddenly got a lot smaller. That because that's because each square is now 10 by 10. I typically like to build with my grid setting set to units of 50 or 100. Now, when you do have your grid snap settings on which I currently have right here, as indicated by this waffle icon turned orange. That means any actor that you are moving in your level, such as this box will move 50 unreal units at a time. You can see that it's not moving smoothly, right? If I was to turn my snap settings off by clicking on this, you would see that now, I am not moving in increments of 50. So know that if you have your snap settings on, this will move by which ever amount you have indicated here. So if I change is to be 100 you could see that my grid changes to represent that. And now I am moving it in increments of 100 again. I like 50 and 100 quite a lot. I'm gonna jump over to a North a graphic view at this moment, and I'm going to choose a top Ortho graphic view to point out something how you can go about building to the grid. So right now I've got a geometry box brush out there in its 200 by 200 each of my grid lines here is 50 by 50. But you can see that my box brushes not perfectly aligned to the edges of these grid lines , and I would like to do so because it makes building things a heck of a lot easier. How can I? How can I get this to be perfectly aligned with my grid lines here? If I move it, it's just not going well. There's a hot key command for that. So if you hold down the control key and then in the end the key, you will make your pivot point go right upon that intersection of the grits. And now you can see my grid lines are perfectly in line with the size of my brush here as well. So why this is cool is because if I was to bring out another box brush, drag and drop this out here now, I can ensure that these are right up alongside one another without having to do any sort of like fine tuning and trying to make sure that they're oh so perfect right that makes life really difficult. So again, turn your snap settings on do control plus end to snap to the grid, and it will snap it to the nearest grid line. Now, something worth pointing out here is that not all pivot points for every actor are right in the middle of your actor like this, and I'm gonna bring out starter content props chair. We drag and drop this guy into the level. Now this one does have a pivot point right in the middle. But let's say that you wanted it to be along the edge because let's say maybe you wanted this to be a lined up nicely alongside of your boxes for organizational purposes. Get a rotated here, but I just can't quite get it to be right against my box right here. What you can do is you can actually move your pivot point. So if I was to hold down the altar key and my middle mouse button that is my school wheel, you can actually move your pivot point. Now you can see that it's jumping in increments of 50 right now. For the time being, I'm gonna turn off my snap settings and move it very smoothly. And let's say I want a police my pivot point right about there. I'm happy with it right there. What I can then do is I can right click on this actor and choose pivot set as pivot offset . It's going to remember that that is where I want to position this. So according to that pivot point, so if I click off of this and click back on, it's going to remember that that is my pivot point. So this point, I could hit control plus end, and it will snap this point to the nearest grid intersection. That's pretty cool, right? Awesome. Um, what else is there to know? Yes, the measure tool. If you hold down the middle mouse button, you can bring out a measurement tool to help you get the scale of your level down. Now, a few things to note about the measure tool. Right now you're seeing it snapped to increments of 50 and it is Onley snapping to the various grid point lines. That is again because I have snapped settings on. If I was to turn my snap settings off, I could then hold down the scroll wheel that middle mouse button, and I can bring out this measure tool to see how long it is from point A to point B. When I'm using the measure tool, I typically like toe have the snap settings off. But there are times that I like to, you know, say, Hey, how long is this distance from one end of this box to this brush to the end of this box brush? And sure enough, it's 400 unruly units. Note that the measure to Onley works in Ortho graphic views. It does not work in your perspective. You so keep that in mind, as you are working anyway. Is that is going to do it all for this discussion on building to the grid again? Building to the grid is a super efficient way to build out your gray box level in an efficient manner and to ensure that you don't end up with hideously overlapping geometry that ends up looking something like this. Human imperfections that is going to do it all for this one. Guys, we will see you in the next one
14. Building Efficiency Tips: all right. One more video here on some building efficiency tips before we get into great boxing are level. Keep these tips in mind to help improve your building efficiency. Tip number one billed to the grid and what I mean by this is ensuring that a you have some snap settings turned on in your view port. This orange coloration indicates that I do have snap settings on. Of course. Make sure that you've got some snaps. Size is set to your liking. I like round units like 50 and 100 are my favorites. And then, in addition to that, you also need to make sure that whatever objects you're bringing into your level here, that they are snapped to the grid as well. And I'm going to use a top Ortho graphic view to help me out here. And you can see that my pivot point right here is actually on the intersection of these grid lines. That's perfect. That's what I want. What you will also notice when it comes to building to the grid is that my geometry shapes themselves are nice round numbers. Take a look over in the details panel that I've got this brush shape of 200 by 200 by 200. Now it's one thing to ensure that my pivot point here is snap to the grid, and then I've got my snap settings turned on. But consider this case. Bring it out another box brush here and you can see that it's snap to the grid as well. But now let's say I want to change its brush shape and maybe I want to change the X value here to be 1 36 Something like that. The Y value. Let's go 3 33 something like that. Whatever you know, And then let's say I want to. But this piece of geometry up against this one, well, that becomes difficult because I have snapping in increments of 50 and they are overlapping . See, when you got weird values like 1 36 and 3 33 that becomes difficult. When you're great boxing, I suggest going to nice round numbers. Increments of 5100 etcetera will do you some well for great boxing alignment, so keep that one of mine. Tip number two here is to use your Ortho graphic views. Always use your Ortho graphic views to help you align things you can see from this top Ortho graphic view that is really easy for me to ensure that things are aligned here as well as from a left perspective. See, I can already see that these air, not a line from a left perspective. Now they are, and then also from a front perspective, which I can see that they are aligned here is well. Also, remember your Ortho graphic views give you access to your measure tool so you can bring this in to see the distance from one end to another measure tool. Super handy that is the Middle mouse button. Next, let's talk about how to duplicate objects super important, especially when you're great boxing out your level, multiple ways that you can go about doing this, and I'm actually gonna bring in a chair instead of these geometric brushes right here. Let's go down into our Starter Content Props folder A few ways you can go about duplicating an object, the easiest way that I find in my favorite ways to hold down the altar key left, click and drag. Alternatively, you can simply do control plus W with one of these selected and that will bring out a copy . You can also right click on the object, go under the edit mode, and there is a duplicate option there as well. So lots of ways you can go about duplicating objects. Next, let's talk about how to select multiple objects within your scene. Just gonna bring in a little road shares here. And let's say that we wanted to select our row of chairs multiple ways we could do that. One is to hold down the control key and left click on each one to select all four. That's one way. Additionally, I don't have to select interview port. I can select them in my world outline. Or so let's say click off and I want to select all those chairs. I can select the 1st 1 I can hold down control and select the second, the third and the fourth. Or you can simply select one share and holding down the shift key. I could left click right here, and it will select all of the actors in between that first and last one a half selected. Those are probably the easiest way is now, another way that you could go about selecting. These is in the Ortho graphic views. I'm gonna come to a top Ortho graphic view and let's say I want to select those four chairs . What I could do is left click and drag out what is known as a marquee selection here, and you can see that I've got all of my chair selected here. But you got to be really careful with this way of selecting because I've also accidentally selected my sky sphere here. So if I was to hit the delete key right now, I would delete out my four chairs, and I would also delete out this beautiful sky surrounding my entire level. So be careful when using that selection tool. There are different ways to group objects in unreal. One way is to simply select all these chairs. I'm holding down the control key and left clicking, and you can right click on any of your selections and then shoes. Group control G is a hot key for that's all trial. A hot key. Now you could see that when I have done this. A green outline is surrounding all of my chair. So now if I select any of these chairs. It doesn't select any of them independently. It selects them as a group, and you can move them around. As such. The UN group them, you can simply right click, come under groups and choose on group, and there's a hot key for that as well. Another way that you can go about grouping actors together is to simply use a parent child relationship. And what I mean by that is I can choose a single chair here and decide that that is going to be the parent share. And then in the world out liner Aiken simply left, Click and drag this guy on top of my parent share here, left click, drag, drop left, click, drag, drop. And now all these three Children chairs are going to be attached to this parent share. So if I move the parent, all the Children come along for the ride. However, if I select one of the Children that are attached to the parent here, I can move that independently. So check this out. I could move that independently and this independently, but if I select the parent share here, they will all respect where they are moved in relation to the parents. So that is a pretty handy trick is Well, hopefully all these building efficiency tricks will help you in your grave boxing process. That is going to do it all for this one. We will see you guys in the next one.
15. Level Layout #1: All right. Welcome back, everyone. And now the fun begins. We can start to gray box out a level. And just as a quick reminder here, I'm gonna jump back to my Google slide here and show you what my original map design looks like here. So this process can take some doing to gray box out of level. Even though it's simple geometry, all I'm gonna be aiming to do initially here is just kind of getting these floor slabs in place. I'm not gonna worry about any buildings or anything of that sort. Just going to try to get this floor slabs all the four slabs in place and get the rough sizing of the level down just to kind of get an idea of how quickly our character can move from one end to the other. So keep this one in mind. This is essentially what I'm gonna be aiming to build. So without further ado, let's jump back into Unreal Engine. And the first thing I'm gonna do is I'm going to select my floor piece here, which is a static mesh actor, and I'm gonna nuke that out. Bye bye. Next. I'm gonna come under my geometry tab. Bring in a box and my slabs are going to be, in most cases here, increments of 1000. So I'm going to send my ex value here to be 1000. Why? Value is gonna be 1000 and I'm going to set the Z to be 20. These don't need to be too big of slabs. Then right away, I'm gonna jump into my top Ortho graphic view. And this red line right here indicates my explain. And this green line indicates my Y plane. And now remember, if you remember for my Google slides, I had this red X line right here and this Why Green line Right here. So I'm essentially going to be using this as our starting point right in this corner and build out in this section along the X y Z plane. So right here, I've got I'm gonna have a slab that's 1000 by 1000 which I've just created. So that's the little corner that I'm looking to create right there. Notice that I've got my snap settings on, and for now, I can put snap settings of 100 that should be good and you'll notice that my slab is not currently. Excuse me. It's not currently aligned to the grid. So let me hold down control and do the end key that will move the pivot point to the grid. And now I can simply move this up into place. Now, I know that there's another slab up here, so I'm gonna hold down the altar key and drag out another slab right there. And I'm gonna be doing a lot of jumping back and forth between my Google slide. So I just put in this slab and that slab and this I want to be a little bit of a tunnel for the player to go through. So I'm gonna leave that alone for right now. Gonna take care of these two slabs. Next, which is going to be 2000 by 2000. Each of these technically, I could make this 2000 by 4000 so why don't I do that? So I'm gonna hold down the old key, drag out a copy, and I'm gonna set my why value here to be 2000 in my X value here to be 4000. I'm gonna slide this up into position like so let me just double check. Kids should be covering that expanse right there. And just so you can see kind of what we've built out here so far, I'm going to jump into the perspective you and that is essentially what we have. And I know our players start is going to be right in this location, and this right here is our players start actor. So why don't we just move them over into place so we can really get an idea? So where he begins and gonna move them this way and you're going to see that there's a bad size little tag on it right now and the way you can fix this has raised this guy up into the air, hit the end key to slap mon down on the ground, and that'll fix that. Ah, you'll notice that this blue arrow is pointing off in this direction that indicates our characters orientation when he moves into the level. So I'm gonna hit the space bar here, and let's just rotate this around so that the Blue Arrow is facing in that direction. So our character will be facing that way when they jump in. Okay, Things are coming along pretty nicely here. Let's see. Let's build out this section next. And this is going to be 12345 square. So that's going to be 5000 unruly units. And this is gonna be 1234 squares, 4000 units. So 4000 in the why 5000 in the X going to my top Ortho graphic view. I'm gonna grab this guy, hold down the altar key left, click and drag out that a copy. We'll set the why value here to be 4000 and the X value to be 5000. Move this into place so that those align nicely. And this is another 2000 by 2000. Slabs liken. Grab this guy again. Just grab select off of that Ones like this one. Hold down the old key left, click and drag. And I just need to set my ex value here to be 2000 like so next I'm going to build these right here. Indicates stairs. So I got some stairs that I want to be going down then through a tunnel and then some stairs coming back up. So time to bring out a stair brush. Obviously, this is going to be a linear stairs. Oh, go ahead and left. Click and drag this guy in and I am gonna jump into my orth It's not sorry. Not my Ortho graphic. My perspective view port holding down my right mouse button and using my WS and D keys to fly all the way over here so I can see which Woods is up in which way is down. Okay, I'm gonna hit my space bar. Let's rotate this guy around like so. Okay? And I am gonna want the X value here. Well, actually, this is gonna be the step with rather not the X value. I'm thinking X because I see the arrow right there. My step with I want to be 1000. Like so. Ah, let's see. How many stairs do you want to go down here? Probably double that amount, right? Yeah, Yeah. Number steps. Let's go a lot. Maybe like, 25 at the pretty hardy staircase. Something like that? Yeah. I think 25 will do good. Okay. And then let's jump back into our Ortho graphic view and get this into position. Now you can see. Obviously this does not match up super good with our alignment right here. So this is where we can take some some liberties and adjust our snap settings down. But let me just cross reference our map here. Okay? We got the stairs all the way to far right? Right there. So jumping back in, I couldn't remember if I had it in the center or the middle over here. Now it will align quite nicely over there. And, you know, if I add a couple more steps on there, it might bring it up nice against their but it might not. Well, we could adjust this step with, sir. Step heights up length. Let's go. Step length. Let's do that. Nice round increments instead of 30. Let's do 25 and let's choose. Let's choose 20 here. That will make it a nice round number. So it snaps to our grid rather nicely. Yeah, so we adjusted our step length to be 20. Our step height to be is 20. Air stepped with is 1000 and the number of steps is 20. And with that in place, you can see how that fits in pretty good Now, if you look at what I've got in my map here, I've currently got the stairs going. A total of 1000 unruly units off in that direction. That might be a pretty heavy staircase. Going 1000 units. Let me just double check this again. Going back into our perspective. Vieux Port. Actually, that's way too steep. You know what? I'm not digging that at all. And you know what game development is? A lot of this. You try something on your like, Nah, I don't really like that Too much. In fact, it can tell us that. Step blank. That's way too skinny of a step. I'm gonna double that to, like, 50. It's a lot better, in my estimation. Let's move this up a little bit. And you know what that is going to is going to go the full 1000 unreal units, is it not? Yes, it is. All right, so that is the settings I'm gonna roll with for the stairs. Took a little bit of doing, but that's game development. So got linear stair here. Step length of 50 step height of 20 except with of 1000 and the number of steps is 20 so you can obviously see 50 times 20 equals 1000. So we've got that nice length right here of 1000 unruly units. Now you can see that it's a line here in the top most Ortho graphic view, but it is not in the left view. So let's bring this on down and I might have to just that slightly upward. And then let's try from a front view and you can see how currently all of our slabs are up a little bit higher than what you're seeing. This red line here. So you're seeing all this so we can fix this. We've currently got our Blue Z axis, and all of our floor slabs are little bit above the red X axis or the red access right here . So we can do is let's select all of our non stare brushes, all of our box brushes here in the world outlined by selecting this one, holding down the shift key and selecting this one. And let's just shame you them down. Showy shimmy, shimmy, shimmy. Now you can see that it's not perfectly Ah, flush with our red X axis here and the reason is because we got a thickness of 20 here. So I'm going to temporarily take our snap settings here and move them down to 10. And now, if I bring our floors down a little bit more not gonna be even with that red x axis there, Okay. Might as well bring my stairs on down again. I've got my snaps that it's currently set to 10 momentarily, and I'm gonna bring those down as well. All right, so that's looking pretty good. I'm gonna move this back up to 100 for the time being and jumping back into our perspective , we can see that is looking quite nice. So the next thing I am going to do again, I'm not gonna worry about that. That tunnel for now gonna hold down the altar key and I'm going to left click and drag out a copy of this. I am going to hit that space bar, bring in my rotational tool, move this around and I know this is already going to be the Z height that I wanted to be. So I'm gonna go into my top Ortho graphic view and just make sure that this is slid into police like so
16. Level Layout #2: All right, Let's take another quick look at our map design here. Okay? So we're right about here. Gonna add one more. 1000 by 1000 slab over here. Let's grab one of those from way back at the beginning. Selecting this guy holding the cult key, dragging out a copy. Move that guy in the position. And you know what? I should double check that. Yes, in fact. Okay, it is home. I just want to make sure brain farted there. Thought that maybe that it was still not the right Z height that I wanted it to be. But obviously it is because I adjusted all the other floor brushes. Okay, then we've got a 123 3000 by 3000 area right here. Top with a graphic view is going to be best for this. Ault left click left key. Drag out a copy. I'll set the X to be 3000. The why to be 3000 that is positioned like so we've got some water area right here that I'm intending to put in. Um, yeah, yeah. This is gonna be some water in here to you know what? I'm gonna kind of Skip the water area right now. Uh, this is going to be a 2000 by 3000 area. Hold on the old key left, click and drag said the X to be 2000. Maybe something like that. I think I had about 2000 unreal units for that stream ish area right there. Yep. And then what? I've got another tube here and then two more slabs. And actually, you know what I think Just for consistencies sake To make it easier to build to the grid, I'm actually gonna bump all this stuff down toe, be flush with this line right here. So let me bring in one of these guys. Hold on the l key left, click and drag. That is gonna be positioned right about where? Yeah, right at the bottom. There about 2000 unruly units of weight right there. And then Ault and drag on another copy. I could have just extended this one up a little bit bigger, but this is gonna be our goal area, so maybe Well, maybe we'll make that look a little bit different. Okay, So all that's in place, The only thing that I am missing now is placing in some cylinders for our pipe areas that I wanted to kind of have our character navigate under. Now, obviously, if we're looking for a pipe shape, this cylinder brush is gonna be the one to use. I'm just gonna go ahead and left, click and drag this in, and it's gonna be up and down instead of laying on its side like I wanted to you. So I gotta find it and rotated. So let me jump into my perspective, Eun, if I tap the f key, that will frame up on that immediately. And I'm gonna do the space bar to rotate this on its side. And I know that this is going to need to be 1000 unreal units long. So I'm gonna take this Z value here and change that to be 1000. Now, you may be saying, Hey, Z value. I see the blue arrow right here by. Aren't you going to make it bigger in that direction? Well, because I turn this on its side. The local Z direction for this is going to be along this axis. Currently, I am in world space. If I click this little button right here. I will change that to be local space. So now you can see that the local Z for this particular brush is in this axis, I'm going to change that Z to be 1000 like so And I want to ensure that our character can actually crawl through this pipe. And I could make this more sides. But it is all I need for when I'm just great boxing don't need anything fancy. So let me just hop on into my Ortho graphic views here. I want this pipe to be kind of in the middle, like so That's good from a top view. So let's check out the side view that's gonna do nicely. The left of you right there and then obviously from the front view, I know this is already going to be fine. That looks pretty good. Okay, so I could take that pipe right there and duplicate it Old key left, click and drag. And I'm gonna bring this way up over here where I've got my staircases and that's gonna be a nice fit. Although I know I'm going to want to drop it down lower. So I am going to come into my let's do a left view here and large that and let's drop this down like so Okay, and we got one more pipe area. And for this I'm gonna left click and drag from my original. It doesn't really matter. Actually, let's left click and drag from, well, do from the original cause that should be on the same plane. Hold on the altar key left, click and drag. And if I hold down the shift key while I am moving this, my camera's gonna fly along with. That's pretty handy. Let's rotate this guy. There we go, moving into position and you can see my local Z is gonna need to be twice as long. So let's change that to 2000 and this pipe. I'm gonna have kind of a skew like that. Let's make sure that that is good in other V ports is well. In fact, I want to fly up over there, see what that looks like, Okay, so obviously we can't go through this pipe because it is solid. So if I was to try to jump in right now, there's no way that my character is going to be able to penetrate through that. So let's do a subtracted brush to poke a hole right through that. What I can do here is simply and I should have done this from the get go, I simply just forgot about doing it. I'm gonna drag out a copy of this brush, and when I'm gonna do is I'm gonna make the outer radius be something like 1 80 And then let's make this a subtracted brush and move it into position. And Walla, That works out pretty well. You know, I could technically move that down so that this pipe is super flush with it. But I'm not gonna obsess over that just now. I am going to do this, though, for my other pipe so that I could actually fit through them. Select ult left, click and drag. Gonna change my outer radius to be 1 80 Make this subtract Ivo, Move this back in. And that will cut out that circle there. And last but not least, Bolton drag out a copy, change the outer radius to 1 80 make the brush types attractive. And there we go. I think, actually have that a little bit lower. Let me raise that up. Just a scooch. How did I get that one down? Just a little bit lower. Did I not flush that? What did I do there? I did get that slightly off all rights. No matter. I will fix that in between videos here. So we've got a rough level. Layout are rough, gray box in place. If I jump in and play right now, you can get a rough sense as to the scale of this level. Obviously, we don't have any sidewalls here, but that's fine. This is where your player metrics really start to show. I can see my player speed and see how fast he's moving throughout this level. I'm gonna come and navigate down this pipe down here and up these steps, and I'm gonna have some wall that he There we go. That brushes a little bit off. I'm gonna have to fix out one in between videos and eventually I'm gonna have some floating platforms here for our player to try to use to cross that river. Like so anyways, that is going to do it for this video. We have gotten a rough size of our great box level all in place from here. We're going to add some walls, maybe some building stuff of that nature. And we got ourselves a level. All right. That will do it all for this one. We will see you in the next one.
17. Level Layout #3: All right. Welcome back, everyone. Between videos, I did fix that issue where some of these brushes were a little off their Z alignment, so that's all well and good. Now we have our floor layout generally in place. Where do we go from here? Well, this is gonna be a relatively short video because I'm going to just kind of generally give you some guidelines here. What I am intending on doing at this point in the great boxing process, this is simply place of simple building structures around here. My idea for this level is that the user is traversing through somewhat of an urban environment, just shooting some targets that pop up all over the place. Now we've gotten ideas how long the level's gonna be, but we don't really have a sense of this sense of the scale of the place, like how bigger these buildings and whatnot. So let's go ahead and try adding some geometry to represent buildings all around. So what I'm gonna do is come over here and I'll start off in the perspective. That's fine. I'm gonna left click drag out a copy here, and I am simply going to turn this into a building structure. So I am going to raise up the Z value here quite significantly. Maybe something like 5000. That's probably way more than I want. Let's go. 2000. We'll start off with some smaller buildings. I kind of want this to be more of a slum like place. Even that's who I'm gonna go 1000 for right now. Okay, move that in place. And I want these all to be hollow. So if I want to poke some holes in them, it will be easy to do that. So gonna make that hollow wall thickness of will. Say 20. Okay. And let's see, that's pretty good there. Why don't I just duplicate that Holt left, click and drag and bring one of those over here? And maybe we can even bring in old left, click and drag, and I'm gonna make that p 3000 kind of move it behind our player. So, are our players going to kind of start in this alleyway or something like that? If you will. Right. Okay. And you can see we can go about building structures all around the perimeter of our level layout here. Now I'm not gonna be building any structures like buildings on top of our floor. This floor is intended to be our navigable space. That is the area that are character can walk a run between. Okay, so everything is gonna kind of be here in these gaps. So with that, I'm gonna pause the video. Now it will come back to what I have been have all kind of finished up again. I'm not gonna be really thorough with this. Just enough to give you an idea. So with that, I'm gonna pause the video now and I'll come back when I'm finished. All right, so after about 30 to 45 minutes here, this is what I have. Essentially, I've placed ah whole bunch of block buildings all around the perimeter of my level layout. I haven't gone ahead and poked in any holes in the the buildings, but they are all hollow. If I can do so, if I wish a few things to note here. I took a creative liberty. Here is I was working and I decided to use a subtracted brush and put it right down the center of my level here. That's going to be a river of sorts in time. I then place this additive brush down below so that my character, for the time being anyways, could actually step on it and hop back out so he could keep going on through the level. So just a quick fly through. So what I have here just buildings of different sizes and shapes. Let me get you back to the beginning here. So we'll start up here, go through this pipe. Come on down here. There will be some platforms. And what not to help you cross this river. Come down here through this pipe. There will be some platforms here that you need to navigate to get up in over this wall, then back to get across this river channel up over this wall down through this pipe and then to the end of our level. Okay, so a few things of note here I'm definitely missing some things in this gray box. Level One is I don't have any identify IRS as to where hazards or pickups are gonna be again. I don't need to create those right away. I mean, I could use a chair mesh right here to represent Ah, health pickup, for example. Number two. You could see this checkerboard material on everything that makes things pretty distracting . I'm and hard to decipher the whole scale of the level as well as just, you know, kind of readability of the level. So I think what we might do is the next past year is placed some objects down to represent things like platforms, health, pickups and hazards and that sort of thing. And maybe it will just apply some simple materials to some of the buildings. Ah, to be different from what we have to the floor just for the readability of the overall level. It's anyways, that's gonna do it all for this one will see you guys in the next one.
18. Level Layout #4: All right. Welcome back, everyone. In this video, we are going to continue with the great boxing process with the objective of placing Cem placeholder assets throughout our level that are meant to represent certain things that will appear in our final level. Things such as what? Well, things such as hazards, Any pickups, any interactive doors, air moving platforms, that kind of thing. And in order to do this, I'm going to quickly reference back to our map design here and you can see from our top down level. I've got my legend here, and I'm indicating things like steam jets that I've got a few of them placed throughout the level, some spinning fans right there in the pipes and also some things like health pickups. And this is gonna pure pretty small on your screen. Ah, heart health pick up there and there and over here. And then I've got some moving platforms that I'm indicating by these squares with the multi arrow icon in them. So I'm not gonna follow this map to the tea, but I am going to use it as a rough guide. So first things first coming back into unreal engine. I'm going to start by placing some steam particles around our level to indicate our steam jet and I could find these in our content starter content particles folder right over here . So I'm gonna fly down to our players start area, and I'm not gonna be super specific with this for the time being. And I'm just going to place a few these throughout the level. And I like to put some hazards towards the front of the level because I want to indicate to the player that, hey, if you bump into one of these and I'm kind of counting on them to accidentally bump into at least one of them, that they will hurt you. And maybe I could include one over here like something coming out of a sewer, perhaps, Maybe one over in this area. Maybe we'll have kind of a sewer area over here. Maybe we'll do something. We're like steam is coming out of the wall right there. Maybe this steam is coming out of the wall over here. Now this particles kind of floating off to the side here, So I'm gonna kind of pull this away from the wall for the time being, And maybe I'll just drop another one or two. Those in here as well? These aren't meant to be super difficult obstacles for the player. It's meant to more demonstrate concepts of different obstacles. One of those there, one of them against the wall over here. Sure. Okay. Flying back to the start of our level again, I'm gonna place some fan obstacles. And I'm not gonna do all this process here on camera cause it's gonna take me a little time , but you get the idea. So I'm gonna find some acid here that I want to represent to be a fan. And you can come under your props folder here and probably find a few good ones. Also, I'm gonna play some door interactive door placeholders as well, so you can place things like door frames, for example. So with that, I've kind of described alarm gonna be doing here over the next few minutes, so I'm gonna pause a video here and then come back and show you what I've gotten after I've placed a few placeholder assets around our level and again I'm gonna replacing hazards some pickups and some platforms indoors as well. We'll see you when I come back and we are back. And just to show you what I all placed in our time away, I'm starting back from the beginning of the level here again. I've got thes steam particles to represent some of the steam jets were gonna be placing. I put some of these door frames for interactive doors. I put some flame particles out here because flame equals danger. So that's what I'm using as a placeholder for our spinning fans that I hope to put in a pipe here. Another interactive doors. More steam. I'm using this table with the statue on the top to represent a health pickup. Some more steam. The exact placements may be different than the final location. I place some of these gold brushes out here. These gold box brushes, geometry box brushes out here to indicate moving platforms. Now, obviously these air not moving that we will build later. But I've built enough of him out here just so you could cross over this gap. Now the health pick up another interactive door, some more spinning fans, another interactive door, another jet, some more moving platforms. We will have over here to get up over this wall and some or moving platforms to cross this river area again to get up over this wall and then finally through this door, past these eventual spinning fans through this door to hard goal area, which is indicated by this nice lamp prop. All right, one more thing. I wanted to demonstrate for you all before we wrap up. This very brief in rough explanation on the gray boxing process is I wanted to talk about some other things that you could consider placing in your grey box level. You can see that our path of travel here is boxed in by these box brushes. Thes are going to be buildings eventually, or that's the idea. Anyways. Sometimes games box players in by using things known as blocking volumes. Now blocking volumes are just simply an invisible barrier to prevent a player from passing through them. Unreal Engine four has those as well in a place where you can find those is over in the modes panel, the volumes tab and right here towards the top. You have a blocking volume that you can drag and drop out, and if I just sizes appropriately here. I'm just gonna create a temporary barrier. Like so bring this to the forefront. There we go. We contest this out now, I can right click and play from here. And you could see that I run into ah, wall right here. Maybe that's what you want. Maybe not. But also, you will notice that this could be a problem your bullets will ricochet off of That is well , So if you do want to place some blocking volumes, how can you get around that potential issue? Well, this gets a little bit deeper into into the discussion that I really want to get at this moment. But it's worth pointing out how to fix this. So we'll do that. Make sure you've got your blocking volume here selected and over in the details panel. You want to find a section called Collision and underneath the collision properties, you're gonna find an area called Collision Preset and this is going to show you what all collides or rather is blocked by this collision volume. This blocking volume right here, right now we're saying that our pon will be blocked by this blocking volume. Likewise, projectiles which we shoot out are going to be blocked by this blocking volume. If you wanted to change what can pass through this blocking volume and what does not? You can simply change your collision preset here to be custom and that allow you to make it so that you can have projectiles. Ignore that collision. Now notice our pawn, which is us, will still be blocked. But our projectile should ignore it. So now if I was to right, click play from here, you will see that my character is still blocked. But my projectiles will pass on through. Good to know. I'm gonna delete that blocking volume out of there. You may want to use some of those. So that is how you can use some of those. One more thing I wanted to talk about. He's a kill Z Volume now kills the volumes, will quote unquote kill the player. And this is done through use of this volume right here in the unrelenting left click and drag this out. And I'm just gonna resize this a little bit and I'm placing it in our riverbed area for the time being. Um, I'll probably place one of these down here to instantly kill the player later on. Um, but I'm gonna make that decision later on, eh? So let's just say we want to kill the player immediately once they fall into our eventual riverbed here. So what we can do is place that kills the volume down and simply to demonstrate this. All right, click pull A from here and now, what will happen is if I drop off the edge. Boom. My character has disappeared. I no longer have control over my screen. So kills the volumes are really useful to place in areas where he wants. Want to instantly kill the players places like a river bed here. Or maybe you've got a cliff that you want to kill the player If they fall off an edge, maybe you want to place a kill Z volume around a fire pit or a spike. Something of that nature That's a really easy way to kill the player. Now, how do we respond? The player will talk more about that later on in the course. But note that you can place some of these around your gray box level as well to instantly kill the player. All right, that is going to wrap up this discussion. We're going to see you guys in the next section about level dressing
19. Import Marketplace Assets : Welcome back, Everybody in this Siris of videos we are going to seek out dressing are level. And by that I mean we're going to make it look a little bit nicer than it does now. And in order to help us do that, we're going to import some assets from the epic games marketplace. So without further ado, I'd like to address your attention to the epic Games launcher. Make sure you have the engine, the unreal engine tab selected along the left hand side and across the top. Let's make sure you have selected the marketplace tab. Now you can add either paid or free assets to your project from right here through the marketplace, and you could see some of them have their pricing on. Um, there is a free tab. You can see different categories of products such as to the assets, characters, etcetera. I'm just gonna come under the search content area and type in the word soul, and I am going to whittle this down to the Soul City pack. Now, I have already added this pack to other projects that I've been working on, so this says owned right down here. But I believe it should say free for you. Go ahead and click on this, and when you do, it's gonna show you a preview. Some of the assets that are included in the pack. You can see some of those by simply clicking on these thumbnails down here, etcetera, and you can see what are the supported engine versions. And again, we are making this in four dot to one, which this does support. So simply click on this adds a project button, select the project that we want to added Tune for us. That's going to be first U E for projects, and then click this ad to Project Button. You'll see a little Progress bar appear here just telling you how long that that is going to take. So give that a moment to finish installing and I'll come back when this is finished. All right, Welcome back. Our Soul City Content pack has finished being added to our project and you can actually see that a new directory off folders has been added down here in our content browser. We've got all the folders that we have before. In addition to this guy right here, our soul city folder with all the assets that were contained within that pack. I know that from the marketplace you can add additional packs to your project if you want, and that's gonna be up to you to add more. If you would like for this project, I'm only gonna add the soul city. But know that the mawr packs that you add when you goto open up the engine, it's going to take longer and longer to load up the engine the more packs that you have installed. So if you're opening up your project tomorrow and you've added, you know, 20 content backs to your content browser, it might take a little while because that's a whole lot of assets. Okay, all right. With that said, we have gone through how to import some marketplace assets, guys, that's gonna do it all for this one. We will see you in the next one
20. Materials: All right. Welcome one. Welcome. All in this video, we're going to show how to work with materials when dressing up your levels. Materials are essentially the coat of paint that you apply to surfaces in unreal engine four. And there are some key concepts to understand before you really get rolling with this and that's what this video is gonna be all about. We're not gonna go into making materials, but rather how to apply them and work with them. So, key concept I want to show right off the bat here is placing materials on static meshes versus geometry. Now, static measures are going to be something we talk more about in the next video. But just to demonstrate the differences between placing materials on static measures and geometry, I am firstly, going to come to my basic stab bring in a static mesh cube, plopped that down in my level like so. And then I'm going to bring in a geometry box brush like so side by side. Okay, so if I come under my Starter Content Materials folder, I have access to all kinds of materials that I can place throughout my level now over on the left. I've got my static mess here and let's just say I am living the high life and I wanted to be solid gold. I can simply drag and drop this material onto the surface there or over here in the details panel. I'll just try to Dragon drop it onto the surface, because that's a convenient way of doing things. Now, if I do the same thing, let me click off of it and it's a little dark, so I'm actually gonna place a light nearby and we have a whole video on lighting coming up . But if I hold down the L Key and left click, you can bring in a light. Just help demonstrate this a little bit better. So that was the L Key and left click. Now let's say I want apply some gold to this geometry box brush over here. Well, I can left, click and drag, but you will notice that I only applied it to one side. I can apply it to this side as well, and I can actually apply different materials, two different sides. Maybe that's what you want. Maybe that's not what you want, but that is good to know you've got finer precision control, placing materials on geometry. Then you do a static mesh with a static message, all or none with geometry. You've got a lot more flexibility. So I'm just gonna delete these guys out right now because I'm going to demonstrate some of the things that we can do with materials on geometry that you can't do on static mesh. I'm gonna figure out a material to place on my floor here, and I like something. Brick, Let's go Something maybe Clay Brick, Let's try that. You can choose a material of your choosing, and I just place it on this giant slab over here and now some things to know our I'm not liking my grid right now being on because it's flickering. So I'm gonna shut that off by going under the show to have and just turning off the grid momentarily so I can see what I'm doing better. And that material looks pretty nice, but I would actually like to scale it up in size a little bit. How can I do that? Well, if I click on the surface of my brush right here and the whole surface turns yellow. You can see that over in the details panel. I've got several different things that I can change with my surface properties. There is in fact, a scale property right here that I can set to enlarge or shrink the size of this material. For example, let me just change the you here to be to and the V I will change to be too as well. And if I click apply, you will notice that my bricks air now twice is big. Now, if I apply four to this, the V is going to be a four is well because I currently have this lock on. If you unlock this, you can set these values independently of one another. So check this out. I'm going to set the Utes of Four and the V to be to actually set the VTB one. And now when I click apply, you're going going to see that my bricks are stretched four times, is large in the U direction here. That's left and right from this vantage point. And it is it's normal size one point. Oh, in the V direction. In this perspective, it is the up and down. So you have some drop downs here that you can preach, choose from some pre selected options. So I'm gonna go to in to cause I kind of like that. Now, some other fine control you have over over materials when they are applied to a box brush or any other sort of brush is you can pan them left and right. So, for example, I can click on this 1 64th button to pan it this way. These are just different increments that you can slide them over. You can also panic in the opposite direction by toggle ing that button right there. And likewise, you can toggle it down, move it down or up. So what would you use that for? Well, that would be a really good way to a line, your clay, if you have let me select that and set that to be the same size. So now I've got the same material applied to both of these, but you can see that they're not quite a line. So if you're really picking, you're like, Oh, man, I really want to set that right. You can, you know, panic up and down until it is pinpoint. Perfect. Right? I know that you also have some controls over here to flip the U and the V. Remember the US left and right from this perspective, and the V was up and down. You also have fine control over rotating a material. So if you wanted to, you could rotate your bricks here 45 degrees. You can change your direction of rotation like so again, this is find control that you do not have when materials are placed on a static mesh. Another good thing to note here, when working with materials and geometric brushes is you don't have to drag and drop ah material onto every side. There is a way to actually grab multiple faces at one time. For example, if I was to place this floor on one side, that blue color on that side, it gets really annoying to have to do this again and again and again. Wouldn't it be nice to just place it once and have it cover the whole brush? Well, there is a way to do that. So the way we can do that is by selecting a face here and then over in the details panel under the geometry section under select, you can say select matching brush. If we do this, that will select all sides of this particular brush. So now if I wanted to coat that entire building there in grass Sure. Now we have a grassy building. Pretty sweet, right? Let's say we wanted to get even more efficient. Well, what we could do is something like this will select one face and see that just this one side, this one faces highlighted, not the whole brush. I can then come under geometry, select and let's say select all adjacent wall surfaces. So now what? You've seen it done. Is it selected a whole bunch of adjacent wall surfaces, right? So now if I was to apply, say that blue color onto the wall, it is going to cover my entire sidewalls here in blue. Good efficiency Tip. If I do say so myself. Now, I just showed you a little bit earlier how you can select one of these faces here and you can nudge your material left and right and up and down a little bit a Z. You can see we've got different pieces of geometry right here, like this is box brush three. This is box brush to Are there other, more efficient ways to ensure that these materials line up perfectly? In fact, there is if you were to select both of these so I just control selected both of those and I went under alignment. I could choose a line surface, plainer floor, and that will make it so that everything aligns up really nice. Now, the little drawback there is it set my sizing back down again. So my scale went back down to one point. Oh, but if I control select them both again I set them back to two, and I click. Apply Now you can see that even though I've got these two separate pieces of geometry one on the on the right here, one on the left, they align really nicely. So you've got alignment plainer floored. You've also got an option there for the wall to, So that's good to know. Let's fly over here to our eventual riverbed. I'm going to show something really quick. Um but what I'm gonna do is select Let's do a box brush here, and I am actually going to go into the top down. Ortho Graphic view Two sizes. Appropriately. What? I'm gonna do his crank this up in size. What do we got? Let's go. At least let's go. At least 14,000 in the why And then we are going to go. What is that distance holding down my middle mouse button. 2000 in the X. Make sure that I am holding down control and end to snap that to the grid. And it is on a grid line and I am going to just fit that right from the top down perspective. Okay. And you can see I've already got a blue material applied to it. Now, why did it already have a blue material applied to it? Well, this is another good to know and not exactly where I wanted to go at this point. But to demonstrate another thing, another good to know with materials. When you bring in a box brush or a cone or a cylinder or any of these brushes with a material already selected, that material will come on the surfaces of that brush. So even if I bring in a curve, stare right here, it's gonna be coated in that blue material because I already have that selected. Okay, Back on topic here. Where was I going with this? Well, I want this to be water. So do we have a water material? Yes, we do. In our starter content, we've got water, lake and water. Ocean. I'm gonna try the lake. Water here looks a little dark, mainly because my lighting is poor. Right? But I wanted to point something out about this lake water material. If we double click on this material to open up the materials editor. And again, this whole video is not focusing on working with the materials editor at all. There is a property along the left hand side called two sided, and you should only see this property. If you have the master material node located or selected here on the right hand side, you can see that it is unchecked. There are materials in the engine that are not labeled as two sided, and this is one of them. So know that if you place this material on a given surface and you make that surface so that your character can pass through it, if they look up on the other side, they won't actually see that water at all. Let me actually demonstrate this better by coming over here. I know I just place that water right here. But I can demonstrate this a little bit easier if I come under the basic tab and I've got water selected here. Let me just place this on a plane. Okay? So if I was to click off, you can see that I've got someone actually let me selected right there. There is my water applied to that plane. A little tough to see, especially because I don't have good lighting on it. So let me hold down l and left. Click. There is a light now. If I was to fly underneath it, you can see that that material, which is not labeled as two sided, is in invisible, so you can't actually see the underside of it. So if you ever come across the materials like that one and you want to make sure that you can see both sides of it, you're gonna want to double click on that material, select your master node and click on this two sided right here. Then click, apply and save. And now if I come into my level. I can see not only the top side of that material, but let me hold down l and left Click to bring on another light. And of course, I put the light way over there. Let me just copy this one holding down Ault left clicking And now you can see I can see the underside as well. So that is a good to know when working with materials. Now, at this point, after our materials discussion here has wrapped up, you can decide what materials you want to place all along your floor and some of your buildings. Now, I wouldn't go crazy with the buildings yet. I would I would say, Go ahead and place materials on any of the floor pieces. I would hold off going all out with materials until we get through the next video on static meshes just next because we are going to be replacing some of these box brushes with static meshes in how many you replace is going to be up to you. Some of these you can choose to replace with static meshes others of these box brushes. You can choose to leave and simply apply materials to them. All right, That's gonna do it all for this one. Guys, we'll see you in the next one.
21. Static Meshes: welcome one. Welcome. All in this video we will be talking about static meshes and their role in the level dressing process. First of all, what are static? Meshes? Well, you could think of static meshes as the props that populate much of your gaming world. These could be things like benches, chairs, lamppost, buildings, that sort of thing. And I've given a demonstration up on the screen between videos right now is to what static measures are often times used for. I do have Iraq in a chair placed out here, which I will talk about more in a little bit. But you also see in the background that I've replaced one of my geometric box brushes with a bunch of static meshes to comprise this building here. Now, sometimes the aesthetic meshes maybe one entire building. This particular building face is made up of a whole bunch of other static measures that I found in the soul city pack. So where do you find the static meshes to populate your gaming world? Well, if you come into your content browser and select your content folder, a real handy way of finding these issue, then come over to the right here where you've got this filters dropped down and say I want to find all the static meshes contained within my content folder in any sub folders under it. So notice that whatever folder you have selected, it will. It will then whittle down whatever static meshes exists within that folder. So if I select the Soul City folder now, you can see all my static measures that exist just in my Soul City folder. Note that you can click on this static mesh filter right here to toggle it on and off. When you see this little color bar to the left, it is on left. Clicking on it will turn it off. Left clicking again, we'll turn it back on. Alternatively, you can right click on it and remove it that way as well. So after this video, you should feel comfortable enough where you can place a whole bunch of these throughout your level. Now, I'm not going to do that between this video and the next, because that would take me many, many hours, and I don't have that time available to me. But my goal here is to provide enough knowledge about working with static measures that you feel confident and comfortable forging ahead Some things you need to know about with static meshes. Go ahead and find a static mess. Share in static mesh rock. You'll be ableto locate these in your starter content Props folder. There is the chair and there is the rock. And all I did was I dragged and dropped a copy of each of these into my level. Now, if I was to right, click and play from here, you'll notice something about my chair. I can run into it and my bullets will ricochet off of it. However, this rock here is not very rock like I can shoot through it and I can pass right through it . What is going on? Well, what is happening here is that my chair has collision on it. My rock does not. How can I tell this? Well, you can tell this by double clicking on a static mesh like this static mess chair here in the concept rouser. And then along the top you have this green collision button. Go ahead and click this and check simple collision. And what you see with this green wire frame is the collision volume that is surrounding this chair. However, if you check out our rock here, which you can double, click on and check on the collision Simple collision. You will see that there is no Corinne wire frame around our rock. So how can we apply it? Well, if you come up here in this little collision option up in the top, you've got several different shapes of collision that you can include around your rock. You can can you can include a sphere shaped, capsule shaped box shape and the further you go on down the list, the more precise the collision is going to be. I'm gonna choose something like add 26 d o P. Simplified collision. And this isn't going to be perfect to every contour of the rock, but it's pretty good. So now if I say this and jump back in and play, I'll just right click play. From here you will see that I will now collide with the rock as well. My projectiles note that you can change collision properties by channel. What do I mean by that? That means I could make it so that I passed through this rock, but my projectiles would bounce off of it. I can do that by simply selecting a rock mesh. And then in the details panel, I can come find the collision settings by default. I've got collision presets set to my default. What does it mean? Default? Collision? Well, if I go back into my static mesh rock, you can see I've also got some collision settings. And for every rock I currently placed in my level, my collision presets are to block all. And if I click this little triangle right here, it will show me how it will react to all different kinds of collision. If my pond tries to go through it Nah, it will be blocked if my projectile tries to go through it. Nah, it will be blocked. So if I go back into my level here, I can change my collision preset to be custom. And in doing so, I now have access to customize my act my interactions between all these different object types and this particular rock I could say upon which is us. I would like to be ignored when I when I try to go through that rock, Where's projectiles? I want you to be blocked by that rock. So let's try this right Click play from here. Projectiles bounce, but I go right through it. Now note that you can change is here on an instance level. By that, I mean any copy I place out here. I could make it so that one rock has collision where my projectile will go through it. But my pawn will not like this one. Where is this one? My pawn will go through it. But my projectile will not Let's give that a try. And of course, I spawned myself the beginning of the level, but no big deal so that one projectile balances I go through this one projectile goes through, but not my character. Okay, so know that you can change your collision presets. Per instance, if you customize that collision preset. Alternatively, you can also change your collision responses right here in the static mesh editor by customizing them from here. So that is good to know as well discussed, save and close out of here. One more cool thing I wanted to talk about here with static measures before we wrap this up is that you can turn any static mesh that has collision on it into a physics actor. What do I mean by that? That means that this chair right here doesn't have to stay glued to the ground. I can knock into it and bump it all around. I can shoot it and have it react and fly off. How do we do that? Well, to demonstrate this, I'm going to select my chair. Hold down, Ault. Left, click and drag out a copy. This one, I'm gonna leave glued to the floor. This one, however, I've got selected. And in the details panel, I'm going to check this box that says simulate physics. That's all you got to do to make this an object that you can bump into and shooting around . Now, there are a whole lot of other properties down here that you can fiddle with that will determine what it responds to and how it will tumble around etcetera. That's a whole another series of videos I'm not gonna cover, but I'm going to right. Click right here. Pull a from here to demonstrate that this one is glued to the ground. Shoot it. Not gonna move this one. I can bum into it. I can shoot it and it will go flying off pretty cool. All right, guys, that is going to do it for this discussion on static meshes. At this point, you should feel free to start populating your entire level with all kinds of static meshes . Maybe you want to turn a few of them into physics actors as well. Um, it's up to you to decide how craze you want to get. You can decide to replace all of your geometric brushes along the side here with static meshes. Or maybe you could do a combination. Some you want to replace with static meshes, maybe some you want to place, um, so attractive brushes into the sides to create some windows and doorways, etcetera. I'll leave that up to you anyways. That's gonna do it off of this one. Guys, we will see you in the next one
22. Particles : All right. Welcome one. Welcome. All in this video, we're going to be talking about particles as they pertain to the level dressing process. Now, this video is not going to get into how to create particles. That would be a whole another course, Rather just some goods and nose when placing these around your level. Firstly, where can you find various particle effects in your content browser? Well, just like we did with static meshes, you can select your route content folder and then selecting your filters. Drop down, select to filter by particle systems. This is just this just has the starter content in Seoul City packs. We've got some fire, some explosions, some rain type stuff, etcetera. So what are some things you need to know about when working with particles? Well, one is that they kind of come in two distinct flavors. They've got this sort of looping particle effect like we've got with this flame and steam as well. There are also what I like to call fire and forget particles like this explosion. If I drag this into the editor, you can see it go off right away. And when I released it and If I right click and play from here you will see that it just plays one time and then goes away. Whereas my flame persists with any particle, you can scale the size of it. So I grabbed my flame here my p underscore fire and I'm just going to increase it to say five times the size. Now, to me, that looks horrendous. But maybe that's what you want. Maybe not just a good to know that you can scale them up. You have that a power, that ability, other good things to note about working with particles is that you can decide how fast they play what I mean. Over in the details panel, there is a field called custom time dilation and by default, it's set to one point. Oh, I could make this flame sort of move in slow motion here by setting it to something like point to dramatic right. I could also go the opposite end of the spectrum and set it to something like five. And now you've got hair raging fire right now, something to note with particles like this fire here, the steam does it as well is that it's really easy to inadvertently select this particle with something like this explosion. You just click on the icon, right, and you can move it left and right up and down, etcetera. However, I can select my flame here not only by selecting this little icon here, but sometimes you can select it by clicking on the actual what we want to say. The smoke or the steam coming off It is, Well, why is that? It's because we have something called translucent selection on. If you are not able to do what I just did right now, it's because you might have pressed the tee Tee's and Tom Key to toggle honor off translucent selection. So if I tap the tiki, I've turned it off. And now if I select my smoke, I won't actually select my particle, but rather my box brush instead. I personally don't like having translucent selection on, so I like to leave that off. But know that if you are accidentally doing one of these and you are trying to select the wall when you accidentally select the particle, it's because you have translucent selection on that is the T key again? Other good things to know about the particles, like many other actors, that you can attach them to other actors. So if I was to right, click right here on my flame particle I could choose attached to and then over in the upper right of this fly. All men, you have got this eye dropper icon that allows me to pick a parent actor too attached to I will choose that. And then my icon will allow me to select something like my garbage can hear. So now if I select my garbage can, my flame will come along for the ride. However, if I select my flame, I could move that independently of the garbage can. And you can see that relationship up here in the world outline. Er, any time you see this indentation right here that shows that this actor is attached to this actor. If one wanted to detach them, all I would need to do here is select dragon on top of the parents and that would de select that. That's good to know. I said I was not going to show you how to go about creating particles in this one, but if you really must know how you can edit properties with your particle. I'm going to give you the 12th primer here. If you double click on any particle and I will double click on my p underscore fire here. This is an intimidating looking editor. But long story short, a particle system such as flame is made up of many emitters. All these things that I am swiping down our emitters. You got any minute for flames? Any minute for smoke embers, etcetera. And in any given emitter, you can change properties about it like its color, its initial size, how long it lasts, how long it lives, etcetera. And with any of these modules that you select within an emitter, there are details about it that you can change. So again, I'm not going to dig deep into this again. That would be a whole another course. But that is good to know is Well, all right, guys, that is going to wrap up this discussion on particles. Feel free to look for opportunities to play some particles around your level. Flaming garbage can is maybe one example. Maybe you want to play some steam coming out of sewers. That sort of thing. Maybe you could have some sparks raining out of, ah, broken light bulbs. Something like that. Just some ideas to keep in mind That is going to do it all for this one. Guys, we will see you in the next one.
23. Sound: All right. Welcome back, everyone. In this video, we're going to be talking about sounds in the level dressing process. We're gonna be talking about how to import sounds and use sounds in your game. Firstly, I want to direct your attention down to the content browser where I am in the Content Browser Starter Constant audio folder. And in this folder, there are some sound that you have to pick from to place around your level. We'll talk about these different colored thumbnails in just a moment. Now you can see there's not that big of a selection here. So how do you add your own audio to a project? Well, first thing to know is that if you're looking to import sounds, they need to be a dot wave file dot w a V. Once you have located some dot wave files that you want to import into the editor, there are a few ways you can import them. One. You can click on this import button right over here. Locate the directory that your sound files in and then simply click open and that will bring it in. However, I like to go this route. I like to go into my folder directories beforehand. Find the wave file. There it is a dot w a V file that I want to bring in and simply left Click on it dragged down into the folder in the content browser that I want to. Once you see that plus bind that plus button released the left click and it will start the import process. That was Ah ah, musical track here. So it's gonna take a little bit longer. I'm just gonna exit out of here really quick, and now you can see that it is in my content browser. The asterisk here means it needs to be safe so you can right click on it and click Save, and that will get rid of the asterisk. So next let's talk about these different colored thumbnails. What are the differences here? Well, any thumbnail that is in black and you see that sort of ah wave form in the background that is known as a sound wave file. As you can see for my tool tip here, that is essentially the raw sound file that has been unedited. Contrast that with these blue icons. If I mouse over this you can see in the tool tip that it listed as a sound cue file. Now, these air edited sound files that can mix and mash match sounds that can alter pitch randomize between sounds, etcetera. In fact, I'll show you an example of one of these. We're not gonna dig into this too deep, because again, this is a a black hole that we could go down that I don't want to get too deep into. But we're gonna double click on this explosion Q. And this is something known as the sound cute editor. Just as a very high level speaking point here, How this works is it takes in is a couple of sound wave files that which these guys are sound waves. In this case, it is random izing between the two modulating the sound that is altering the pitch and volume in some fashion and then out putting that sound. So there's a whole bunch of different knows that you can link together to create different audio results. So again, we're not gonna dig too deep into that at the moment. Okay, so now you've got some sounds in your content browser. How do you add them to your level. Well, it's a simple as simply dragging and dropping either a sound wave or a sound cue into your level piggybacking off of our last video, where I've got this dumpster fire of sorts going on here. It's pretty cool that we've got this visual of a flaming garbage can, but I can't hear anything. So how about we change that? What I can do here is find Where is it? The fire Q. GONNA left Click and drag that right above my garbage can, and you'll notice a couple things when I did. That one is that I have this sort of orange spherical shape around my little speaker icon here that represents an ambient sound actor. Number two. Thing to note here is that there's actually not just one of these orange spheres. There are to unify kind of pan back here. You can see it one way up here. Why are there two spheres surrounding this sound? Well, the way it works is this in side of this inner sphere. You are hearing that sound, which is sort of a fire crackling at 100% is volume. As you get further and further and further away from it it'll get quieter and quieter and quieter until you reach this outer edge, at which point you will no longer hear it. So how do you adjust those radi? I well, with that actor selected over in the details panel, there is a parameter called Override Attenuation. And if you select that suddenly some properties down here illuminate this inner radius. Is this inner orange Ah, spherical wire frame right here. I'm going to set that down to be, like, 200 and because ah, fire is a pretty subtle effect. In fact, I'm going to set that to be 100 kind of tight around that garbage can this fall off distance determines the distance between this sphere and this outer edge way out here So we could actually hear this flame crackling from way out here, which is crazy town. I'm gonna set that to be something like, I don't know, 500. That might even be too much. So now if I was to right click in play from here should not be able to hear it should not be able to hear it as I get closer. Can start to hear it. And as I get closer still, you hear it at full volume. Okay, that's kind of cool. What are some other things that I could do with sounds? Well, if you select that sound actor again this Ambien sound, you can modify things like the volume multiplier or the pitch multiplier. So let me just change the volume multiplier to say three. And then I'm going to right click in play from here, and you get a sense as to how that increases the volume. Let's select that again. Change that volume multiplier back to one, and I'm gonna change my pitch multiplier to Let's go to right Click play from here, and you can hear how that modifies the sound. Another thing to note with sounds is that you can attach them just like we attach this particle so I could right click on it attached to choose that I drop her icon and say, I want to attach it to that. Their garbage can also another thing that you can do with sounds and you could do with particles and a variety of other things, for that matter is you can select those actors and in the details panel, there is a property called auto activates that is checked on. If I was to unchecked this, you would not hear that sound at all through scripting, which we will cover later on in the course you can then make it so that if you were getting close to this here flame or this flaming garbage can by the way, you could say, Hey, I want to turn it on. So just know that this is something you can toggle on and off. And this is often times also toggled on and off through scripting. Anyways, with that knowledge of sounds done, guys, I would say you have the green light to go ahead, placing some ambient sound actors throughout your level that is going to do it all for this one. Guys, we will see you in the next one.
24. Lighting: Welcome back, everybody. In this video, we will be talking about lighting in unreal engine. For now, the goal in this one is simply to impart a basic level of understanding with lighting. This could be a very, very, very deep rabbit hole that we're not going to go down. We're going to try to keep things relatively basic. With that, I'd like to direct your attention to the modes panel in the upper left hand portion of the editor, where we have a light stabbed with five different types of lights contained within it. I'm gonna bring out a point light, which is probably one of the more common lights and as you saw, just dragged and dropped it in the level. Alternatively, the point light is so popular it has ah hot key associated with it. Just holding down the Elke and left clicking will put a point light into your level. Now, let's just look at this guy here a little bit and talk about some of the properties contained on its over in the details panel. You have an intensity parameter that you can adjust up and down, which is pretty obvious what that does light color. You can pick a color. You want your light to be by either punching in an RGB value or selecting this color picker wheel right here. And all I did was I clicked on this white bar and I could choose any color from the color picker. Ah, hot tip here. If you like giving color here like this nice shade of green, you can simply left Click right here A drag it up here and it will save that color for later. You can also just the attenuation radius for the light That is how far is this lights? Sphere of influence you can see you can adjust that up and down, etcetera. You can also determine if your light cast shadows or not. Right here is a check box. If I turn it off, you can see that some shadows are cast, some are not It's pretty subtle over here on the left hand side. Why would you ever want to check that off? Because you know shadows are sweet. Well, shadows are also a little bit expensive. So if you are finding your game lacking in performance frame right starts to drop etcetera you can consider turning off some shadows, especially if you had movable lights, which I'm not gonna get too deep into now. Okay, I'm gonna delete that guy out, and we're gonna bring in the next type of light. Here is the wrecked light, which is short for rectangle. Um, this is a new lights, and what I like about it is it has some advantages over the point light. Like the point let you can specify things like intensity. And let me get a little bit closer to the wall. There, little bit away. Okay. Like intensity and attenuation radius. You can turn that up and down, etcetera. Also shadows or not like color. What? Why now? That sweet shade of green. See, what's good about this one is fine. Moving away from the wall, you can see it basically is good for a flat surface. So it's good for if you've got, like, fluorescent ball that you kind of want to punch up in your scene, what can happen sometimes when you have point lights out in your level? Did you get this sort of a weird effect where, especially if it's in a corner, you kind of get some shine off one side and another. But with these flat sort of lights, these can work really nice in hallways in one. Not so, consider using some of those. Next let I'm gonna bring in is the spotlight spot, not the skylight. The spotlight should be pretty obvious what? This one conduce. Oh, but there are some things worth talking about. I'm gonna changes to a hot shade of pink right now, and I'm going to crank up the intensity. One thing to note about this particular light that the others do not have is an inter cone angle in an outer cone angle. What I can do is if I change my inter cone angle to be something other than zero, you're going to see another wire frame cone appear in the center There. Now, if I was to make this inter cone angle match, I'll set this to 30. My outer cone angle, which I will also set to 30. You can have a hard spotlight if I adjust this inter cone angle down to something like, I don't know, 10 ish in my outer cone angle to something like I don't know, 60 ish. You can see how the spotlight is very, very harsh in the middle, but it gets progressively. It falls off from this inter cone angle to the outer cone angle, so that's the way you can. Makes some harsh or not harsh spotlights. Okay, delete that guy out of there. Next, let's talk about the directional light now. I don't have to place a directional light in my scene because this level already has one. Any time you create a new level by going file new level. In choosing this default level, a directional light actor is there in your level by default. Now, one thing to note about this particular light actor. It also has a light color intensity, etcetera. It's also got this white arrow kind of pointing off from its icon. What does that mean? Think of the directional light actor as the sun, and this white arrow indicates which direction the sun is shining. So if I kind of bringing this actor over here a little bit, So Aiken sort of look down our our alleyway here, and I'm going to bring on the rotational tool. Watch what happens as I kind of move this left and right. You can see, I'm changing the angle of my son there and the shadows are moving as well. Now, you also notice that the word preview is showing up everywhere. Don't worry about that. We'll get rid of that in just a little bit. But know that that is what the directional light actors meant to do. Replicate sunlight in your level. It does not matter at all where you place your directional light actor in your level it could be 1000 feet up in the air or it can be underground. It will still have this same effect that I just showed you. Also, as I mentioned, When you create a new level default and the directional light actor comes in by default, so does this guy. This skylight, which is this guy right here? What is the skylight do? Well, the skylight is essentially meant to capture all the colors of your outer surroundings. In this case, are blues in whites of the sky and essentially project that on down to our level so that our level reflects that kind of lighting from the sky. What can we use this for? Well, like the other light actors, this also has a light color and in intensity. I find that this one is pretty good to modify if I just want to punch up the overall intensity and or color off the lighting in my level, for example, let's say I have an ice level and I wanted to be some sort of light, ice blue sort of color like that. That's probably not a perfect color, but will say something like that or maybe, like a little bit of a lava level. So I want something a little bit reddish like that. Sure, we'll go something like that and maybe I want to crank up the intensity a little bit. Okay, that's kind of how I let me just go five. Right now, you notice that no changes have taken place yet. Where is with my other actors? It did weaken changes by coming under our build option of along the top. And there is a right. There's ah, little triangle right to the right of the bill button, and we can build our lighting. What this will do is it will pre compute all the lighting in our level. Well, that means it'll calculate where all the shadows should be for what are known as static and stationary lights. In fact, let me go ahead and do that. Now it's gonna take a little bit of time, but I'll pause the video while it's going on. And then I will return when it is finished. All right, so we are back. My lighting has finished building, and you can see now we've got this sweet shade of kind of reddish pink overtaking our level because of what we set in our skylight. Also, that preview text that you saw everywhere is now gone A few things to cover. Yet as it pertains to lighting before we wrap this up, some goods knows you might run into this situation where you are placing lights throughout your level. One spotlight to spotlight three spotlight. And actually, it happens when there are four or Mawr. It's because I got this guy back here. You're gonna start to notice. Some Red X is appearing. What is going on? Well, any time you've got too many lights in one area, you're going to see some with a red X or it. That just means you've got too many lights that are overlapping. One another and unreal engine is going to yell. Yeah. So how do you get rid of that problem of these Red Xs? Well, few ways to get rid of them. Probably the easiest way to get rid of them is to simply either, Well, the easiest ways to just delete it out. Right. But if you had have that light in there and you need it in there, no matter what, what you can do is you can change the lights mobility setting to static, which is essentially a more simplified version of the lighting that is less computer intensive. So that is a good handy trick to know. Just gonna delete some of these out of here right now. Another lighting efficiency tip is over. In the volumes tab, there is something known as a light mass importance volume. Now, what you're supposed to do is place this around your entire level and I'm just gonna left, click and drag it in here comes in as a yellow box, going to go to an Ortho graphic top view frame up on it by tapping that F key and this one I'm just gonna use my scale tool and make it super big in this direction and super big in this direction. And it's poster wrap your entire level, like so kind of tightly. Sort of like what I've done here and now It's pretty good from a top down view. We should do it from one of our side views. Let's go a front view as well. Now what does this volume do? Well, essentially, what it does is it gives you quality lighting where you need it when you need it. Otherwise, our entire level here is giant or miss. I mean, it stretches on the sky Sphere is way off in the distance. It would try to calculate some of that lighting by having this light mass importance volume around your levels. You're basically saying, Hey, I want quality lighting within this confined space. Okay, so now we have a basic understanding of light. What can we do at this point? Well, you can start placing some lights around your level to punch up certain areas, and now this is not an easy task. Even professional developers struggle with getting their lighting just right. Be warned if you start placing too many lights around your level of your performance may take a hit, so use them sparingly and Onley where needed some ideas is the things you could do. You could have a wall sconce like this with a spotlight kind of shooting out a shooting out of it, Right. You could place some point lights near pickups in your level because as moss are drawn to it flame, so too are gamers drawn to light in level. So consider punching up some of those areas. Another example I have is a spotlight kind of raining down from my directional or sorry from my a lamp post right here. You could also consider punching up some wall signs here. What I did here is I just simply place the point light on either side of this static mesh that I have hanging off the wall and you can see what it looks like without it. And then with it, it just kind of illuminated a little bit more and gives it a little bit more of ah, neon type of look. Maybe you want to have some spotlights hanging in your little tunnel areas here. There's just a small static mesh of a lamp right there with the spotlight hanging out of it . All right, so there are some ideas. Last but not least, you will note that as you are building out your level, this message in the upper left hand portion of your editor lighting needs to be rebuilt will be there all the time. The reason is there all the time is because any time you got some lighting going on your level and you move something in your level that that lighting is touch, it's going to say, Hey, something has changed. You need to rebuild your legs. So know that to get that message to disappear, you can simply build your lighting. Or there is something called a council command that you can put in to get rid of it. If you press the tilde key, that is the one right next to your one key, you're gonna bring up this Consul command bar along the bottom. You can just type in, disable all screen messages and hit enter messages, and that annoying message will go away and you'll feel happy. All right with that, go ahead and populate your level. Wisam Lighting. We will see you guys in the next video
25. Day Night Scene: Welcome back, everybody in this video I want to show you guys how you can make your daytime scene here be night time if you so choose. Now, this isn't going to be talking about how to make a day or night cycle that's a little bit more complicated. Rather how you can just simply change your day seen here to be nighttime instead. To make this work, we need to make use of our directional light actor that we were talking about in the last video. Mine is located right here. But if you don't know where to find yours, you can come under the world outline er and simply type in directional light and it will whittle it down. You could select it, tap the F key to frame up on it, and that will find it right away for you. Okay, so we talked about how the directional light actor represents the sun last video. But the directional light actors also used in conjunction with something known as the sky sphere, which is our sky up here to create a day or night scene. I can actually select the sky back here by clicking on it and if I get rid of my filter right here and you can see I have now selected the sky sphere. If I was to tap the F key right now to frame up on this guy sphere, you can see how I've instantly teleported our camera outside of our snow globe. Right here. Yes. Essentially, we're playing a level inside of a giant snow globe. Let's get back to the inside of our snow globe here by typing in players start here in the world out liner, selecting it, tapping the F key f isn't Frank to jump right back in. Okay, Gonna go ahead and select our skies. Fear again and down to the details panel. There is a slot for us to associate a directional light actor with our sky sphere so you can come under this check box or this drop down air right here to choose our loan light source our loan directional light actor. Or you could choose this little eye dropper icon and selected in your level like So now nothing has changed yet. Other than you see that our light source is slotted in right? But if I was to take our directional light actor tap that space bar and make it so that our white arrow is pointing straight up into the sky Doesn't have to be perfect here, but it does have to be pointing away from the ground something straight up into the air like So Now if I selected the skies here again and I tap this property right here called refresh material watch this Suddenly it becomes set tonight. Now there's a few fun properties that you can set here. You've got this cloud speed that you can I change it to be something like 100. You can just have clouds whirling all around you Cloud opacity is how strongly can you see those clouds? Bigger values mean mawr clouds and then star brightness is a fun one Teoh, you can make the stars shine oh so bright by setting it to ah, bigger or smaller value as you see fit. All right. I think I'm going to go a value of cloud speed. Maybe like 10. Maybe that's fast. Five star brightness. I usually like something like two. That's pretty good. Cloud speed. I went 50 instead of five. That's pretty good. I'm gonna roll with that. Anyways, guys, that is how you can go about creating a nighttime scene in your level. That's gonna do it all for this one. Guys, we will see you in the next one.
26. Blueprint Overview: welcome everybody. And in this series of videos, we are going to be constructing a whole lot of different blueprints. Now, before we get rolling into that, I just wanted to take a time out to talk a little bit about what blueprints are in Unreal engine for. So hopefully this becomes a little bit more clear as we go along. So, first of all, what are blueprints? Well, blueprints are the visual coding system in unreal engine for, and it enables non coders such as myself, a designer by trade to quote unquote code by using a visual know based system to create gain play elements. What you see here in this screenshot is an example of blueprint scripting some functional gameplay made by wiring together a bunch of different nodes now in Unreal Engine. For there are several different types of blueprints, but the two most common category core common categories that I like to put them in our level blueprints that contains certain code, certain scripts specific to a level. Then there's class blueprints that contains script that is code specific to a certain class , like a character or even a moving door. That sort of thing So let's talk about the anatomy of a class blueprints, a blueprint classes often shortened to just blueprint. And it consists of components and then graphs. Well, we're gonna be doing when we construct a lot of these blueprints. We are going to be adding all of the necessary components for the blueprints. So, for example, we're gonna be creating a spinning fan. And in this first past, we're just gonna be adding all the necessary components for that blueprint class things like fan blades in a central point at which the fans spins around that sort of thing. And then, later on, we're gonna move from this component to section of the blueprint to the graph portion of the blueprint where we actually wired together some nodes to create some functionality. What you are seeing here is a screenshot from an example blueprint. This is what is known as a character blueprint. So up in the left hand portion of the blueprints editor are the components panel. This is where you combine together things like a character, maybe some text, maybe some. I don't know. Collision volumes such as this capsule around him, etcetera to all comprise your one blueprint. These are some different tabs in your blueprint, Editor. Right here. This is the View port tab with which you can see all the different components of your blueprint. And then over in the right hand side of your blueprint editor, you see a details panel, and depending on what you have selected over here is one of your components. You're going to see a lot of properties, and you can alter about it. The event graph tab right here is the View Port Tab. This is the event Craft tab. This is where all the blueprint scripting takes place. Where we wired together all those nodes and over in the left hand side in something called the My Blueprints panel is where we contain things called functions and variables, which there will be a lot more discussion on that to come. Now the event graph, which is where all that quote unquote scripting takes place. This is where we make blueprints do something and this is done by connecting nodes together . Notes consist of all different types of pans. Thes triangle shaped pins are considered execution pins. They're the things that actually say, Hey, if this event happens, then do this. It's kind of like a flow of electricity that just flows from left to right. They're also color coded pins known as data input and output pins. Their inputs, if there on the left hand side of a note and their outputs if they are on the right side of a node. Now, each note each node has a specific purpose. For example, there are notes to print text out to the screen. There are nodes to add in subtracts, multiply and divide numbers there nodes to play a sound or spawn a particle effect. That sort of thing. Here are some more examples of some of those blueprint notes I was just talking about This is what they look like again. These triangle shapes are where called execution pins, and these round color courted pins are known as data input if there on the left hand side or data output if they are on the right hand side of a node. So game events in order for some bit of script to work, it must be triggered by some kind of event, and again, we're not gonna be doing any of this scripting stuff in this construction section, but this is worth talking about now. Some examples of game events are event begin play. What do we do when the game first fires up? Event tick fires Every frame event overlap fires when some object has been overlap by another object and event hit. Make something happening when something hits a given object. Event notes are red. There are different types of nodes you can place Intergraph and each has a specific color associated with it. Events are red, functions are blue, something known as flow control nodes are gray, and again we will talk a lot more about that later. Also note that data pins are color coded to We will talk a lot more about this in our blueprint visual scripting section. But this is enough of a primer just to get some things percolating in your brain without further ado, that is a very brief ah summary, if you will, on what blueprints scripting is all about. Now we're going to actually get onto creating, constructing, putting together some of the components for some blueprints. We'll see you guys in the next video
27. BP Construction - Moving Platform: All right. Welcome, everyone. In this video, we are going to create a blueprint asset, And this one is going to be for creating a moving platform. Now, in this series of videos, we're just gonna be focusing on the construction of the actual blueprint assets that were about to create. We're not going to do any of the scripting side of it. This is just gonna be combining all the components we need, and then we'll take care of the scripting the functional side of it later on. Okay, so with that, all out of the way, Come under your content browser. Find your first project folder under here, find the blueprints folder, and then select the actors folder. We are going to create a new asset within this folder. So come under this area of the content browser right here, right click in some empty space. And the new asset we want to create is a blueprint. Class go heads like that, and then you will get this window asking you to select a parent class. Most of these for us are going to be based on the actor class. And actor is an object that can be placed in the world. This moving platform will be manually placed by us in the world to go ahead and select that . And then you will be asked to give this a name. I'm gonna call this BP short for Blueprint. Underscore moving platform. And this asterisk you're obviously means we need to save it so you can right click and save it or you've got this little save all button right here that will go ahead and say that for you. Let's double click on this to open it up. I like to doctors across the top. So what we see here is our view Port tap and the Onley thing, You see, interview port Right here. Is this default seen route? Now, if I was to drag and drop this asset into our level like so all you would see is this little white sort of ball. Ah, that's not actually a static mesh of sorts. That's just an icon. So if I was to right click and play from here, you wouldn't actually see anything. But I'm just gonna leave my BP moving platform out there for the time being okay? Going to jump back into my moving platform blueprint here. And what I want to do is I want to add a component to this. I want to have a platform that my character can stand on. So what we're gonna do is in the components tab up here in the upper left. I'm going to click on this green add component button and we want to add a static mesh component. I'm going to just name this platform. And with the platform selected over in the details panel, we can choose which static mesh we would like to add to our blueprint. I've got one in mind from the soul City pack, so I'm just gonna click this drop down and search for Oh, what is the one I'm looking for? It's called slums Underscore Ceiling underscore 02 D, That one right there. It looks like this And the reason I chose this one is cause it's got some sides to it. So when our character stands on it, they won't fall off quite so easily. Now I do want to scale this up inside. It's it's a little small. I'm gonna go ahead and come under the details panel put a three into either the X Y or the Z And because these air all scaled uniformly If I tap three and hit the enter key, it will make it three times as big in the X The why in the Z. So now I'm just going to compile and save. And if I jump back to my level here, you can see now that my blueprint that I had placed in the level has updated. So this begs the question. Why are blueprints awesome to make? Well, the idea here is that we make one blueprint in this case, a moving platform. And then any copies that we drag out into level will respect any changes that we make inside of this one asset. So this one asset just has one static mesh, and eventually we're going to scripted to move back and forth. And this way we don't have to make it so that we create all of these moving platforms individually, we create just one asset that we can reuse again and again and again throughout the level. Anyways, that's gonna do it all for this one. Guys, we will see you in the next one
28. BP Construction - Door: Welcome back, everyone In this video we are going to create the blueprint for an interactive door. So coming under the same folder that we were in before content first project blueprints and actors, right click in some empty space and we are going to create a new blueprint class. This 12 will be based on actor. Let's go ahead and call this BP. Underscore, er door Simple enough. And let's double click on this guy to open him up. Doc, come across the top here. There are three different components that we are going to add to this one. 1st 1 we're going to add clicking on the green add components button is going to be if we scroll on down, it is going to be box collision. And I'm gonna give this a name right away and just simply call it collision. And over in the details panel, I want to set rz location to be 100. So up a little bit off the ground, the box extents themselves. I want to customize as well I want the X to be 100. The why I want that to be 300 and Z. I want to be 100. The idea here is that we're going to make a door that we can interact with this collision volume is going to detect when our player is close enough to the door where they where they can interact with it. Okay, we're not done yet with this collision components here, we're going to scroll down and find the collision section, and we want to change our collision preset here to be custom and in our collision presets, we want to make sure that we can overlap everything. Right now. This would block our projectiles, which we do not want. So make sure that you check right here so your projectiles don't bounce off this invisible collision box. Okay, Next one, we want to adhere. Turning my page of notes. Let's select our default seen route component. So the way this works is any any sorts of components that you add will be attached to whatever you have selected in your components panel. So by selecting our default seen route component, we then are going to add another component, a static mesh component which we will call door and you can see the relationship here. The door is attached to this invisible default seen route, as is our collision. Okay, what kind of settings do we want to set for our door? Here? I have some written down. Firstly, with that door selected, we should slot in a static mesh. I am going to click the drop down and I have one in mind. It is called slums underscore. Would wall underscore 01 e underscore O P zero p. It's this guy right here. Looks like that zero. Yeah. No, in Oh, Oh, that's an O. Not a not a zero. It looks like that. Okay. And I do have some transform settings. I want to change for this as well. I want to set the location for this to be negative. 70. And I do want to adjust the scale. I'm gonna unlock the scale here, and I'm going to set the X to be 1.4. The why 1.2 and the Z to be 1.2 is Well, now, if you're wondering how I just came up with those values off the top my head it was a lot of fine tuning off camera. So saving you all some time right here. Okay, so that's all we want to do for that component. Let's add one more component here, and I'm going to select my default seen route add component. And the next one we're going to add is something called a text render component. And I'm just going to search for it up here in my search bar text render. Go ahead and select that guy. And you can see that is attached to our default seen route as well. And I'm gonna leave the text, uh, render actor simply named as text render. That's fine. And with that guy selected over in the details panel, we got some things we want to set for it. Let's do the text itself first. You can see this thing is always kind of facing the wrong direction. It seems like there it is right down there. I'm gonna set the text to read F to open. Okay. I'm gonna change the horizontal alignment here to be center the vertical alignment to be text top and along the upper portion here of the details panel in the transform area. I'm going to set the location to be 10 in the why 1 45 in the Z up off the ground and the rotation, I'm going to set the Z rotation to be 90. So the idea here is is that the player is going to overlap this collision volume and eventually through scripting that message to open is going to show. And then a player is going to be able to tap the F key to actually make that open. Last thing I want to do here is I don't want this text to be seen right away. So I'm just gonna come under my text render component here and where it says visible. I'm going to uncheck that I do not want that to be visible right away. But actually, you know, I'm gonna make it visible for just a second cause I want to scale with world size here. That's a little small. Let's scale that up to be I don't know, something like 35 and you can fiddle with that to liking. Now I will uncheck the visibility here to make it not visible. Let's go ahead and compile and save. We can exit out of here and you could just drag and drop one of these into your level to get a rough idea as to what that's gonna look like. And again, I'm gonna place he's kind of right about at the ends of my pipes here to have the player manually enter them and exit them. All right, that's going to do it all for this one. Guys, we will see you in the next one.
29. BP Construction - Steam Jet: welcome. Once again, everyone in this one we are going to construct a blueprint for our steam jet. This steam jet is meant to hurt the players, so let's get all of our components together for that in the same folder that we were in before content, First project blueprints and actors, right click again, Blueprint Class based on actor and this one we will name a BP underscore Steam jet double click on this guy to open him up. Let me get rid of my door right here and let's add Let's add all the components straight away, and then we will focus on the details. So let's add a component. This 1st 1 will be a static mesh, and I am going to call this steam hub. Next, make sure you are selecting your default seen route because we want to attach everything to that at another component. This one is going to be some capsule collision, and I will name this damage area and you'll see why in just a moment, select your default seen route once again, adding another component. This one will be a particle system, and we will call this vfx steam. Select your default seen route once again at another component. And this one is going to be an audio component. SFX steam will be its name. All right, then, with all of those added, we just need to set the details for all of them. So let's start with our steam hope here. This is a static mesh. So first things first, let's slot in a static mesh. And I do have one in mind here if we look for slums Underscore vents underscore. Oh, that 01 01 b underscore to I'm looking for that guy right there. Okay. And it is giant enormous. So if you don't see it right away like I didn't, you might have to score wheel back. The thing is huge, so I'm obviously going to scale it down quite a lot. Lock your scale icon right here. Click on that. And then we want to set 0.1 1/10 of the size. We're gonna make that really small, not super small, but pretty small. And then for the location, I'm going to set the wide to be negative 19 and the Z to be negative. 25. Something like that. Okay, Next. Let's select are damaged area component. I'm gonna set its location right away. This is gonna be set to a Z location of 1 83 It's gonna raise it up in the air. And I'm going to change our capsule half height here to 1 50 and our capsule radius right below it to be 50. So the idea here is that there's going to be some steam kind of shooting up out of this steam hub. And this capsule area is going to be the area that's going to detect if our player overlapped that steam. And if the players overlapping that, we're going to damage them. Okay, so that's all we need to do for that one. Next, let's select our VFX steam. Oh, I'm sorry. We did miss something in our damage area. Go ahead and select that guy. We forgot to change some of the collision settings. Come under your collision area with your damage area components elected. We want to change our collision presets. Not to be overlap all but we want to say custom. And the reason we want to say custom is because here too your projectile would collide with that. They're invisible capsules will change that to overlap as well. And that should be all we need to do with that one. Let's go on to the FX steam and we want to set in a particle for this to go ahead and click over here in the details panel. And if we look for P underscore steam, the one we are looking for is jet e missive lit. Okay, it's getting kind of ugly while is compiling the shade. Er's don't worry about that. Next. Let's come on under the transform section. We're going to set the Z location here to be 32. The why rotation to be 90 and the scale of this all we're going to set to be, too, in the X y end the Z. So the particles just the visual right, this damage area, this capsule collision here is what's going to actually detect if our player is overlapping it and should be damaged. All right, so that's good. Next, let's select our SFX steam. We got some details to set for this. We do want to slot in a sound over here in the details panel. That's kind of important. And as you may expect I have something in mind. Let's look for steam. 01 Q Now this sound can be heard by default from a long ways away. So what we want to do is check this override Attenuation check box and then down below, down below. Hold on just a moment while I flip over my page of notes. There is Attenuation distance that I want to set. Where is it? Attenuation? Distance, distance, distance, distance, distance, Distance. Let's just search for a shall we? Let's look for inner radius. That's the property I'm looking for integrated. I must be blind. The inner radius we want to see set for this is going to be 100. So when we're within that inner radius, we're going to hear this steam sound at it. 100% is full volume. The other parameter we want to set here is the fall off distance and that fall off distance is huge. I'm gonna set that to be Let's go 500 something like that. So now you should Onley start to hear that sound when you start getting somewhat close to it. All right, that there were those properties right in front of me. I couldn't see them all right with that. All done. Let's compile in Stave. And we are done with our BP construction for a steam jet. We will see you guys in the next video.
30. BP Construction - Fan: welcome back. Once again in this video, our goal is to get together all the components for a blueprint that is gonna be a spinning fan that can damage our character. Let's get right to it. We are in the same folder that we have been for our other blueprints. Right Click down here in the content browser blueprint class based on actor parent class. Let's name this guy BP fan Double click to open him up. And let's add a components. The 1st 1 we're going to add is a static mesh component, and I'm gonna name it, dear, and I am going to set some details with it right away. So with that component selected, come in your details panel and in the static mesh area, do a search for deer and we're looking for this gear old 101 and you don't see it right away because we are inside, events will scroll back. This is a giant giant mesh, and I do want to scale it down quite a lot. I am going to make sure I've got my skill here unlocked, and I'm gonna set my ex to be point 15 My Why to be 0.5 in my Z will be 0.5 as well, so that's going to make it a lot smaller. Okay, Next thing I want to add is is another static mesh component. But I want to select my default seen route first, and this one is going to be a static mesh. And I'm gonna call this blade. Underscore 01 This is gonna be one of the fan blades. So over in the details panel, let's set a static mesh right away and the static mesh we're going to slot in for this one is Well, if you just type in the word pillar, it's this guy right here s m pillar frame. And as you may expect, I've got some transformed settings I want to set. Let's do location of X value of negative five for the scale. I'm going to do X scale of 0.5. Why scale? We will do 0.5 in the Z. I'm going to do as what's not. 0.5 I'm looking at my dear for the why. Right there. So the why I want to be 1.5 rather and the Z I want to be one, so that's pretty good right there. Okay, so next thing we're gonna do is select your default. Seen route one more time, and I'm going to add another component. This one is going to be box collision. And I'm just gonna call this collision underscore 01 And, of course, got some settings I want for this one is Well, let me set the box. Extends First, I'm gonna go x value of 20 A. Why? Value of 20 in a Z value of 200. You can kind of see how it's shaping up here in the view port. I'm then going to change the location up here, the Z location to be 200 as well. Okay, so this is gonna be some collision that surrounds our our fan blade here, And that's going to be the thing that we're going to detect if it hits our player. All right. Um, I could thin this up a little bit, but I'm pretty happy with it. As is. We'll leave that alone. Okay, So with that in place, let me just scroll down, see if there's anything else here. I want to change overlap all that's all well and get okay. So with that in place, I'm actually going to left click on my collision here, drag and drop it on top of my blade. I do want it to be attached. Okay, so that's one of the fan blades. We can take a little shortcut here to add a family here, here and here. And this is what we got to dio select your blade a one. Hold down control and select your collision. No one as well you can, then right click here. Copy, then come to your default. Seen roots. Select that right click. And we're going to paste once we're going Teoh paste twice and we're going to paste 1/3 time. All right, so now we've got four of these blades, actually overlapping one another. What? I'm gonna dio. So I'm gonna bring out my rotational tool here and let me just get the names for all these right before we do anything, I'm just gonna hit two on this and I will call this blade two f two blade 03 have to blade 04 And as you may imagine, I'm going to do F two collision underscore 02 F two collision underscore 03 And here you can change the name F two right here. But just to show something else you can do, you can change the name up here is well in the upper right. So I will call this Collision four. All right, So I'm gonna select my blade 02 and I'm simply going to rotate one of these down to the side here. And you notice that I do have my rotational snap settings on in increments of five. That I'm gonna take this one and will rotate this one all the way down 1 80 And this guy, we're going to rotate like, so off to come up now. There we go. To the right. Okay. We're not done yet. There's one that mawr component we want ad. This is a special component. Do let's add another component. And this one we're gonna do a search for row attaining movement, rotating movement component. Now, this doesn't actually attached to anything here. This is just a special type of component, and what we can do here is there is a rotation rate setting over in the details panel, so make sure you've got this particular component selected and we're going to change our Z value here to zero and r X value here, we're going to change to be 80. So with all that done, let's compile and save and let's see about what this looks like in our level. Now, one thing I want to mention is this was intended to go in our pipes here. I think I've changed my mind here. These pipes are just gonna be a little bit too small to have a spinning for fan blade in because you could see if I drag this in, it's gonna be relatively large, right? And so we just position this like So I gotta make sure if this is spinning around that a character can fit underneath it, right? So I think I'm gonna change this pipe to be something more of just a flat corridor that is gonna have some spinning fan blades. And so right now, if I was to jump in and play, you can see my family is spinning now, nothing's gonna happen if it bumps into me now. But we will change that later so that it actually does kill us. right now, it's just going knocking us around. Right? So that's gonna be pretty cool now. Ah, One thing to note here is you can change the rate at which that rotates. So if you increases to something like 300 so rotating movement, rotation rate 300 you compile and say that Let's jump back in and play. And now you can see that's going much faster. So, no, that that is something you can change as well. I'm gonna set it back to 80 for the time being. Compile and save. All right, that is going to do it all for this one for creating our fan blueprint. We will see you guys in the next video.
31. BP Construction - Health Pickup: Welcome back, everyone. We're making good progress here. So in the last couple of videos, we made some blueprints for a steam jet in a van, things that can harm our player. Now we're going to create a health pick up in this one. This blueprint is meant to heal our player, so let's get right to it. Content First Project Blueprints, Actors folder, Right click in the Content Browser Blue Bring class and you guessed it based on an actor parent class BP Health pick up. Seems like a fine name. Let's double click on this guy and add some components. Showy. Let's come on over into the ad components section. Click on this plus button and the first thing we're going to add is sphere collision. And I'm just gonna name this collision Next thing we're going to add and I am going to select our default seen route once again. First at component, we're gonna add a static mesh, and I'm just gonna call this mess. You don't have a better name for it. Next, we're going to add another components. We're going to add a rotating movement component, kind of like we did with our fan And then we're gonna add one more type of special components, and this one is going to be called in terp to movement components. Or so the idea here is that we want to have a mesh that is bobbing up and down a little bit as well as twirling around. Okay, so now we got all those components in place. We need to set the details for it. So let's start with our collision. Select your collision component and let's set our sphere radius here to be 100. Something kind of big. That's gonna be the thing that we eventually check to see if the player is overlapping in order to collect the health pickup, let's come down into the collision section and under collision presets, click that little drop down triangle and once again, instead of overlap all dynamic you can change it to. You could let's change it to custom so we can make it so that our projectile does not bounce off that thing if we happen to shoot it so custom and just make sure you check projectile to overlap as well, you could set it to ignore too. But this makes me happy when I see check boxes all online. I don't know. Okay, next thing we're gonna do is select our mesh components. And in the details panel, let's find a mesh. And there's one called s m Underscore Sequencer key. This is actually in some of your engine contents. You can use whatever mesh that you want to hear. I just kind of like the look of this glowy green object here. So that's what I'm going with that you can use whatever static mesh you want that's going, Teoh, speak health to you. Right? Um I am going Teoh, go into the collision section here for this mesh instead of block all. I'm just gonna set it to be no collision. So a collision will not be enabled for that because I don't really want stuff to be bouncing off of that. Should we shoot projectiles and stuff? Next? Let's select Are rotating movement component. Ah, what do we want to set for this? Let's do a rotation rate Z 1 80 Let's give that a try, Okay? And let's select our interpreter to movement component. This is what's going to make it move up and down. So I'm gonna send a duration here for three seconds and I'll explain all this in a little bit. So we got that set to three seconds. That is going to be basically the length of our movement cycle. How many seconds, then? Under control points, we're going to click this plus symbol and we're going to click it not once, but twice. And you're gonna see this zero and one added. Go ahead and click these triangles next to each to expand their parameters for the zero position. We're going to leave this at 000 for the one position we're going to set Z to be 25. Lastly, down here in the behavior section, we're going to set the behavior type to be Ping pong. OK, so now what did we just do? Basically, what I did is I specified to control points one at this location, one at a location Z value 25 units away. So think of the initial control point at this location and the other control point at a location. 25 unreal units above it. Over the course of three seconds, it's going to go from zero toe one. Think of zero as this position One as this position and back. So up. Then down. Then up, then down. Why is it going to go up and down? Because we set this behavior type to be Ping Pong. All right, So with that done, let's compile and save. And I always like to see what this looks like in my level scaled with everything else. Let's drag and drop that in here. And if I was to right, click and play from here, you can kind of see what that looks like. That looks pretty sweet, right? I can pass right through it. Bullets are going right through it as well. Eventually we will add script to make it so that when we overlap this it feels us. All right. So that particular health pickup actor is meant to go in place. Stuck back at the beginning of my level here of my placeholder table in statue. All rights that'll make for a nice little pickup. Over There were guys that is going to do it all for this video. Hope you learned a lot. We will see you guys in the next one
32. BP Construction - Parent Target: Welcome back, everyone. In this video, our goal is to create a parent target blueprint from which all other target blueprints we create are derived from. Think of this as the master template. This is a target which are player will be able to shoot in the level. Now we're gonna have a few different types of targets. Some that give the player points, some to give them a speed boost. Some that adds more time to their level. Timer. This is going to be the master copy. So without further ado in the folder that we have been working in up until this point, let's right click do a new blueprint Class based on actor and BP. Underscore Target Parent makes for a fine name. Go ahead and double click to open that guy up. Let's add a few components starting with a box collision. I am going to name this trigger volume. Just a sneak peek as to what we're gonna be doing here way are going to make some targets be capable of getting spawned when we overlap a trigger volume like this guy right here. We're also going to be making another blueprint that is going to act as a sets water where we can spawn several targets all the same time. This one is meant for the single spawn. All right, the default seen route. Here. Select that one more time. We're gonna add another component. This is going to be sphere collision, and I will call this target collision. This is going to be the thing we're going to check to see if our player has shot the target . And if we should destroy the target with this component selected, let's add another component. And let's add a static mesh target would make a fine name for this. This will be the visual representation of a target. Select your target collision once more. Let's do add component and look for a text render component. I'm going to call this point value using PT Value as my label. For that, we are going to print out on this what the text should be. So if it's worth, you know, 500 points, this will show as a 500. Select your target collision once more. Let's add a component and this one we're going to add a spotlights. Why are we adding a spotlight? Because I want to make our targets a little bit more visible, so we're going to actually shine a spotlight on our target. Mesh spotlights a fine name for that. I'm good. All right. Selector trigger volume at the very top of the components list. Let's go ahead and set some details pertaining to that first thing I'm gonna change is the box extents over here? I'm just going to thicken it up a little bit to be fifties across the board in the X, y and Z Next, I'm going to come down into its collision settings in instead of overlap. All dynamic. I'm going to change it to custom because I do not want our projectiles being blocked by that. I want them to overlap that next I'm going to select our target collision. And while we are here in the collision section, let's change some of the collision settings for this. Let's go ahead and change the collision preset to also be custom and make it so that our projectile can overlap. This one Additionally, scroll on up because I want to change this spear radius here the sphere radius. Let's change that to 105 and then I want to change the rotation of this particular radius to be negative 90. And I know you may be saying, Hey, that's just that's just a sphere. What does it matter if we rotate it? But we rotated all the components underneath it as well, which is something we want. Um, next, select your target mesh. Well, you need to find out what type of visual representation you wanna have for a targets. You can choose anything you want. I'm gonna keep it really, really basic here. So I'm gonna go into my static mesh portion of the details panel, and I am going to do a search for a sphere. And there are all kinds of spheres. The one that I am looking for is Is that that one or is it this one? I think it's this one. And in the tool tip, it shows the path Engine engine meshes. Let me try this one. I might have the wrong one. That is the wrong one. I didn't want that big, so I wanted the one that is in this path. And if I hover over it, it will show that path Engine basic shapes, sphere with that said, I'm gonna change the scale of this, and I'm gonna change it. Uh, I'm gonna unlock this so I can make the XB two the Z I'm gonna change to be to and the why I'm going to be changing that to be 0.2. So now what you've seen I have done, I have essentially made kind of a disc ear like a flat target. And as you notice, it's no mistake that I made it so that our target collision fits nicely around it. That's why set the sphere radius to be 105 So it would be perfectly fitting around that you're a genius, Mr Wandera. Yes, I know. Okay, um, let's go to point value. So, like that one, let's go ahead down in the details panel and flipping my page of notes. I'm going to set the location for this text to be Ah, Why? Value of 10. The Z rotation. I'm going to set to be 90. You see it appear over here. I'm just gonna set the text to be some dummy value of 9999 That's just a place holder will swap that out later on I do want to change out the world size. This is way too small, So I'm gonna change that to be 100. And what else do I want to change here? The horizontal alignment. I want to be center. And the vertical alignment. I want to be text center as well. So that's gonna centered up pretty nicely. Let me see for the text render color. I'm gonna change. The are here to be zero the G two B zero and the B two B zero is Well, um black. No. Yeah, yeah. I'm gonna change that to be black, because I do believe I forgot to set a material on my target, which I did. I was like, Wait black on this black target. What am I thinking? So one thing I need to change here, go back to your target components. I forgot to set a material on it. The one I'm going to set as the default is called basic shaped material. And that will make that text pop out a little bit more. I knew there was a reason I made it black. All right. That is looking all spiffy. The next thing we need to do is change our spotlights parameters. I am going to change the location of this. The Why locations going to be 200. The rotation. I'm going to set X rotation of 1 80 and the Z rotation to be negative. 90. So is shining it on our target A few more things to do. Before we wrap this up, I'm gonna change the intensity setting of our spotlight to be 3000. I'm gonna change the outer cone angle to be simply 30. So it's kind of shining it just on our target. I'm going to change the attenuation radius. That's how far our spotlight reaches something like 2 50 So it just barely reaches that. And as for the intensity, you know, I'm not sure if that's going to be great or not. I don't want to make a too bright, Otherwise, you get that kind of effect. So I'll leave 3000 for now. Maybe will change that at some later time. Last thing I'm going to do here is I'm just gonna tick off the check shadows just to help improve performance a little bit. Other than that, I think that's going to do it Okay, so let's go ahead and compile and save. We've now made a master target blueprint that all of our blueprints will be derived from. So, guys, that's gonna do it all for this one. We will see you in the next one.
33. BP Construction - Point Targets: All right. Welcome back, everyone. In this video, we are going to be creating some point target blueprints and these air going to be derived from the target parents that we just created Last video. We did a lot of the heavy lifting in the last one. This is simply going to be making some offspring, so to speak of this target parents. So let's get started. With our BP Target parent here, selected in the content browser, we're going to right click on it. And in our right click menu, you're going to see the very top. It's an option to create a child class blueprint. Let's go ahead and do that and it's gonna add a new asset here. Let's call this BP. Underscore, Target underscore 100. This is gonna be a target that if we shoot, is going to be worth 100 points. So I do want to double click on this guy. Now. One thing I want to note here is gonna bring my parents back on as well. So take a look at this. This is our parent blueprint. Change it over to the view port and you can see are different components over here on the left hand side. Now, this is the target. We just made a child of this parent. If I selected, you can see all these different components are in blue. And that helps indicate, as also indicated in these parentheses, that these properties, these components are inherited. And who is the parent class of this particular blueprint? Well, if you look in the way upper right, it says our parent is BP Target parent. That is good to know. Okay, there is some things that we want to change about this child, just like you are a child of your parents. And if inherited some properties, there are some things that are unique unto you. Your mom may have blonde hair. You may have brown hair so we can change stuff like that here in the child blueprint, selecting my target over here in the child. I want to change out the material. I'm going to change this to a copper M metal copper material. And also, what I want to change out is the point value. This is gonna be worth 100 points. So obviously it would be silly to have the Valley of 9999 on it. So right away, let's change the text to be 100 other things. I want to change about this or because that's kind of a dark color on the background, the material. I'm gonna change the RGB value here to be straight white. That's going to be our 2 55 g to 55 B 2 55 I'm also going to change the world size here of our text to be 1 25 a little bit bigger. We can get away with a little bit bigger size and because we're changing that to be a little bit bigger, I'm going to fiddle with the location a little bit 10 and Z. Now, you know I'm no, I'm happy with that. That's gonna be pretty good. Everything else there is looking pretty good. Let's see anything else I want to change with that. No. Okay, so with this all done, we can compile and save that guy. Let's come back to our content browser. And now I want to create some siblings for this BP target 100. I say siblings because this target blueprint was a child of our parent. So if we create some duplicates of this, I would consider them siblings. All we need to do to duplicate to duplicate this is to right, click and duplicate. There's also a hot key control post W and with a duplicate created, I'm just going, going to name this BP Target 500 and then I'm going to right click. Either of these, it doesn't matter which one right click duplicate, and this one will be a BP target one 1000. Let's start by modifying our target 500 here. So double click on that guy to open him up. And if you ever see a video or not a video A view like this where it says this is a data on Lee blueprint, the only thing you need to do is click this blew open, full blueprint editor option right here. And you will then get back to your normal view. Okay, So the first thing I want to change about this is the spear radius on our target collision . This is gonna be worth more points, so I want to make it smaller. So let's change our sphere radius with our target collision components selected to be 80. All right, so that shrunk that. So because of that, I'm also going to shrink down our target. So go ahead and select that component and changes scale here to be 1.5 in the X. This is why we can leave alone and the Z we will change to 1.5 as well. Ah, the material. I am going to change out to steal something like Silver medal colored right. And now we got to change the point value component as well. So go ahead. It's like that guy. And I'm gonna change the text right away to be 500 the color we will leave at White. But I do want to change out the world size because it's kind of overlapping that entire targets. I'm gonna change the world size down here to be 85. You can fiddle with those as you see necessary yourself going to compile and say that one. That one's good. Gonna come back into my level editor here by clicking my level one tab. Lets grab BP Target 1000 open. The full blueprint editor and I want to select my view. Poor tab. So I can see what I'm doing. And here I'm going to select our target collision and set the spear radius to be 55. This one's gonna be worth 1000 points. I'm going to make the target even smaller. Next, select your target components and we're going to change the size of our target mesh to be X value of one. Why value could say it. 0.2 in the Z value will be one. I'm also going to change out the material, not copper for this. No, we're going straight for the gold. All right. And then we are going to change the point Valley. What am I doing here? Point value. Obviously the text should be 1000. Let's change the world size as well, down to 50 so that it fits on the target, and that is looking pretty good. So with that, I am going to compile and save and let's see what all these different targets look like If we place them all out into the editor one at a time. There is our 100. There is our 500 slightly smaller And there is our 1000 even smaller. Still so not too shabby. We got the makings of a shooting gallery. If I do say so myself. Alright, guys, that is going to do it all for this one. We will see when the next one.
34. BP Construction - Special Targets: welcome back. Once again in this one, we are going to create mawr sibling blueprints that will eventually grant special bonuses when shots specifically a speed up and a time bonus. So this one is all about constructing some special targets, like we did in the last video where we created some sibling blueprints were going to do the same thing here, coming down into your content browser into this directory. Find your 500 points blueprints I'm going to do select it, and then do control plus W to create a sibling of that one. And I'm gonna call this BP. Underscore, er targets underscore plus speed. And I will let me just clear out my other targets from along the top of my editor here. Okay? And then I will select that new one that I just created it and create a duplicate of that. A sibling of that control plus w. And instead of target speed Plus, I'm going to do target. Sorry. Plus speed plus time. All right. And go ahead and open up the speed as well as the time. Double click on those guys. Let's start off here in the speed blueprint and again I'm gonna jump on over to my view port tab so I could see what I'm doing. I'm just like the target component over in the components panel, and I want to change out the material here I'm going to go with. There's one called Vertex Color Color Green on Lee. That's the one. I want something kind of green. And then I'm gonna select the point value component, and I just want to change the text to be plus speed. And I'm gonna make the text. Not white, but black instead. So I'm gonna choose my color picker this time. Move this slider all the way down, and that will give us some black RGB values of zero the world size. Here. I'm gonna be happy at 85. Now I know it flows off the side of our target a little bit. That's up to you. If you want to make it fit, that's fine. I'm gonna be fine with it. Overlapping. I'm gonna compile in, save that guy and we're done with him. And then let's jump into our plus time target blueprint jumping over to the view port gonna select the target blueprint and for the material for this guy. Let's see what I got. I think I put Vertex blue Onley. Yes, I did. So coming over into the details panel, do a search for Vertex. And there is this Vertex color mode Blue Onley, something like that just to be different. You can choose whatever material you like. That is gonna be fine. Next selector. A point value change the text to be plus time, and that is going to do it all for that one. I'm gonna leave it in a black color for that is Well, actually, no. I do want to change that to be not white. Let's go straight. Black? Yeah, we'll go black on blue. I think that looks okay. All right. So compile and save. And then let's just drag and drop these out in the level to see what these look like. There is our speed, and there is our time. There's kind of a glowy nous about those materials as well. So that's kind of cool. All right, guys, that is literally all we wanted to accomplish in this one. We are getting somewhere. We will see you guys in the next video
35. BP Construction - Target Spawner: Welcome back, everyone. In this video, our goal is to create a blueprint capable of spawning in numerous targets at one time. So we will be able to spawn in any one of these given targets out here one at a time. But wouldn't it be nice if we could spawn in ah whole set at one time? Let's make our lives easier, Right? So let's create a blueprint that will enable us to do that in our same folder where we've been creating all of our other actor blueprints. That's right. Click Blueprint class based on actor BP targets underscore Set, spawn ER is what I'm gonna call this guy DoubleClick. I'm opening up. And just like we've been doing, we're gonna add some components to this one. First thing we're gonna add is a trigger volume. So let's add some box collision, and I'm just gonna name it trigger volume. And this time, let's go ahead and add. Set some details for it right away while we're at it. So the box extents I've got mine for this one are 500 in the X 500 in the why and 200 in the Z. Something kind of Big. And then let's go down into the collision section Collision presets. Let's change that to be custom. And once again, let's change our projectile to overlap. Of course we could set it. To ignore is well, overlap is going to do the trick, though. Okay, that one's gonna be good. Next, let us select our default seen route once again, and we're gonna add something called an aero component. That's something that we have not added before. So add component, you could just do a search for arrow. And what is gonna add is if I kind of click off in the view here, actually, let me select it and kind of move it up into the air. Is it is nothing more then just a red arrow out there. So what does this use for? Well, this is basically a visual indicator here in this blueprint. And when we places in the level for us to identify some point in this case, we're going to be using this arrow to determine where we want a target to spawn inet. So it's nothing more than just ah place to identify a location in our case where we want a target to spawn in. I'm gonna call this. Let me rename this to Spawn targets underscore old one. Then what I can do is hit control C on here and let's paste. Ah, few them in here below it. I'm gonna add five of these totals, So select your default Senior control V to add one more control V to add another one. And I'm selecting my default seen route every time I'm doing control V and then once more control V And I'm just going to rename these all quickly to spawn targets 02 have to spawn targets 03 I have a bad habit of saying 03 instead of 03 But that is just me. So if you ever hear me saying 0304 etcetera really mean 030 for etcetera in spawn. Target underscore 05 OK, with all those in place, I do have some locational settings where I want all the used to live by default. So let's start with spawn Target number one. The location I want to set for this is X value of negative 1000. Why? Value of negative 1000 and a Z value of 200 and I actually want to rotate this around a little bit. So in the Z, I want to rotate it 90 degrees, so it's gonna be facing in that direction. Now, these don't have to be contained inside of this trigger volume. This trigger volume is just what we're going to be overlapping. Our character is going to overlap to then determine where we want to spawn thes targets in it. Okay, so that one's good. Let's go to spawn Target number two. You know, let's do something real quick to that arrow component is really small out there. Let's change the arrow size to be three. And of course, you don't have to have a red arrow color. You can change the color here as well, but I'm fine with that. So I'm just increasing the size of my arrow there to make it a little bit easier to see out there. Okay, Spawned Target 02 Sorry. Zero to let's set some stuff for it. Let's go Locational setting of X negative 500 the Why negative 1000 and the Z I will go 200 This too. I will rotate the Z at 90 degrees. Okay, Um, also increase the aero size 23 Let's do spawned Target 03 location, ex of 500. Why negative 1000 z of 200 in that era size. I will change three times as big as well, and I forgot to change the rotation of the Z. Let's go to 90. Sorry, I got the location for this one. Wrong. I could see him like one to the 3rd 1 Supposed to write about their location for spawned target three. Let's just double back on that. The X is going to be zero. Why negative. 1000 and Z of 200. Okay. Spawned Target number four. The location is going to be 500 in the X negative 1000 in the Y Z of 200. And we're going to change the Z rotation to be 90 degrees. Increase set aero size to three times as big. Last but not least, we got spawned. Target number five with that selected X value of 1000. Why? Value of negative 1000 and Z value of 200 and obviously the Z rotation 90 and the aero size of three. All right, So that is going to do it all for this one. Let's just compile and save, and I'm just gonna drag and drop this in my level quickly. You can kind of get a rough idea. So what, this is gonna look like? So the idea here and I'm just spin this around is that we can make it so that when our character overlaps this trigger volume, we can have targets spawning up all those era locations. Boom, boom, boom, boom boom will be able to identify which targets we want. We can even move the's arrow components around as well. But that's to come later. Alright, guys, that is going to do it all for this one. We will see you in the next one.
36. BP Construction - Level Complete: Welcome back, everyone. We have one more blueprints to construct in this series of videos and this one, we are going to be putting together a level complete blueprint. This one is not going to be very visual, but it's going to be more functional. So right here I have flown our camera to the end of our level where we've got this fine looking lamp shade that I'm currently using to identify the end of our level. Well, what I need is some blueprint that is going to exist out here towards the end of our level that is going to serve to notify our game when the players actually reached this point and this blueprints gonna be really simple to construct. All we're gonna do is come down here in our content. First Project blueprints, Actors folder, right click in some empty space blueprint class, and it's going to be based on actor eggs. You would expect BP underscore level completes. Let's call it that double click on this guy. And all we need for this one is a trigger volume. So I'm just gonna add a component here. It's gonna be some box collision going to just call it trigger volume. And of course, I have got some box extents that I want to sit for this. Let's go 500 in the X 500 in the Y and Z. Let's go 500 doesn't really have to be tall. And of course, I am going to want to change some of the collision settings here as well, because I don't want my bullets to be hitting that collision right there. So let's go. Collision preset custom change our projectile to overlap. It could be ignored as well. And then let's compile and say this. Let's drag this out into our level and you can see where this is going to be occupying all that end of a level space. Now, I don't have it perfectly positioned. But you know what? Since I am here, why don't I just go ahead and place it where I need to? Let's go to a top Ortho graphic view. I'm gonna tap that f key with its selected. So I frame right up on it. Let me get my snap setting set toe 50 control plus end to snap it to the grid. And with this in place, you know what? I will leave my lamp out there for the time being just to help indicate that that is the end of level. I could jazz it up a little bit more, so that's good from a top perspective. And then from a side perspective, we're just gonna nudge that up is, well, something like that. All right, one more thing before we wrap up this video because that's all we needed to do to create that blueprint. There's gonna be some scripting involved with that later on. But down here in the content browser, you see all these icons, these thumbnail images related to your various blueprints and you can see some of them are sort of at an odd angle. Wouldn't it be cool if you could twist in turn and customize these thumbnails? Well, you can down here in the view options, you can select that choose thumbnail edit mode. And when you are in thumbnail edit mode, you can left click on any of these icons and twist and turn them around like so pretty cool , right? And when you're done with that, you can simply click done editing and then save all and you are going to be good to go. All right, guys, that is going to do it for this one. And for this whole Siris on BP Construction, we will see you guys in the next videos.
37. BP Scripting - Moving Platform: Welcome back, everyone. In this series of videos, we get to make our stuff come to life. We are going to get onto some blueprints scripting and adding some functionality to all the blueprints that we constructed earlier. We're going to start off with our BP moving platforms to go ahead and find it within this Siris of folders. Double click on opening up. And first let's talk about what we're trying to do. Well, we want a moving platform that starts in one location and ends in another location and just kind of goes back and forth between the start location and in N location. Now, you saw me do something like that when I did our health pickup, and you could create a moving platform in a similar fashion using a technique similar to how we're getting our health pick up to Bob up and down. But we're going to do a little bit different technique for this one. When I'm gonna ask you to do now is to come down to the my blueprint section down here and add a couple of variables. Let's start off with just one, and we're gonna call this one start look out. And this is going to define our starting location for a platform. Now off to the left. Here, you see this little pill shaped that is colored red. This indicates what type of variable this is. Red indicates a boolean variable, which holds true and false information. We don't want that type of data for this one. We want this to be a vector. Variable a vector Variable holds X, Y and Z Dana, In our case, that is going to be X y and Z locational data. All right, so let's over in the right hand side. You see that? It says we must compile this blueprint. So let's go ahead and compile. And then you can add a default value for the starting location. I am fine with 000 for now. Okay, so we've got a starting location variable. How about we right click on this guy duplicated, and this one will be end locale. Obviously, we want this to be a vector. Variable is well, because we want to specify in X y Z coordinates. Where is going to be the end location for this moving platform? Once again, let's compile, and we're gonna get a little bit of a warning here because this is the exact same values is our start. So let's just set rz to be 500. And now, if you are to compile and save all is well with the world. When you see that green check mark a couple other things I do want to set on this end locale over in the details panel. There is a field called instance edible. When you check this and go ahead and check in, you're going to notice that this little eyeball icon shows up down in the my blueprint. Panelas Well, so if I was to click this off, you're going to see that that instance Edible field unchecked as well, So it's kind of two ways to make this instance creditable. What does that mean? Well, check this out. If I was to Dragon, let me compile this. First must compile If I was to drag in my moving platform and look in the details panel, I can see that right here in the level editor. I can punch in what I want my end locale location to be. This basically exposes this variable right here in the level editor. However, if I was to uncheck this, make it not instance edible. Let's go ahead and compile now. I no longer see that in the details panel. This is some customization that we do want. So let's go ahead and check this on. One more thing. I want to check over in the details panel for end locale is this show three d widget. If we click this on and then I compile once again make sure you compile jump back into your level. We have just added this sort of purplish triangle right here. This currently is specifying where are moving platforms and local would be. So this isn't functional just yet. We haven't done any scripting just yet, but right now we're saying our start location is right here where it is on the ground in our end. Location is right here. Why this is awesome is with this blueprint. You can actually drag this around that purple icon and you can see how it is. Updating the end locale is well, what makes this super sweet is not only doesn't make it easy to customize where we want the end location to be, but if I was to add another moving platform and select it. I can make it so that this one has a different ending locale. So maybe that ending locale for this instances up here for this one, it's down here. That is some sweet customization that we do want. Okay, let's move on to the scripting aspect then. So I'm going to jump back into our BP moving platform here and in the event craft is where we want to add the script to make this platform move up and down. Now, there's gonna be some events in here to get you started here. We don't actually need any of these. So just for clarity's sake, I'm gonna left click drag on a marquee selection to highlight all those, and I'm gonna hit that delete key to delete those out. So what do we want to do here? We want this platform to be moving up and down, so we need to talk to our platform component. What you can do here is left click and drag directly from this components panel here, a reference to your platform into your event graph. Now what do we want to do? Let's drag aware off of our platform here so we can talk to it and off of this, we're gonna be looking for a node called set relative location. So what this function note is going to do for us is it's going to set the location of this platform relative to where is at in the level currently. Okay, that it needs a new location to go to. And we're gonna be working on that here in just a moment. Next, I'm going to be bringing in a reference to our start locale down here. We can drag and drop this into our level. And when we do it says, Do you want to get it or set it? We want to get our initial location. And we also want to do this with our end locale so you can left click, drag, and drop a reference to that. And again here, we want to get the value stored in that variable. Okay. Next thing is, you can drag a wear off of our start locale here, and we're going to look for a node called Lope vector. Now, look is short for linear inter plate, and we're going to plug our and low Cal here into this B And then I'm gonna plug the return value of this into our new location. So let me explain sort of what we got going here to learn to think of it as to go from one thing to another to go from point A to point B. That's what this slurp note is going to do for us. It is going to go from point E point A are start locale to point B R end loco. But how do we determine how we goes from point A to point B? Well, we need one other input known as an Alfa to go in here. Long story short, What I'm aiming to do here is over x amount of seconds, and I'm thinking maybe 8 to 10 seconds. I want to go from point a, then the point B, then back to point a again and just kind of loop that back and forth. So we need to change the value of this Alfa to go between a and B. When Alfa, when this elf of value is zero, we are going to be calling upon our A location, the start location When this Alfa value is one, we will be at RB location. So think of the Alfa value of zero as being at the A location in Alfa value of one being at the B location. And if you are at, say, 0.5 Alfa, you are halfway in between there. If this is a little confusing yet, let's just get on with our next step. And hopefully it'll make more sense. So we need to change the value of this Alfa over time and the no to do that is something called the Timeline knows I'm going to right click here in our graph and I'm gonna search for a timeline note right down here. Add timeline and it's gonna ask for a name right away. Let's just call it movements. And this is a special type of node because you can actually double click on this note to edit a timeline. I'll do that here in just a moment. If you double click on any of these other nodes, nothing happens. But with a timeline here, if you double click on it, you'll bring up this whole new tab along the top. So what? You hear what you see here is a timeline editor, and what we want to do is we want to add something called a float track. And that's this F plus symbol along the top. So go ahead and click that what this is going to allow us to do next is asked for name for what? We want to change over time. And I'm going to say Alfa, and you can see that after I've done this. If I jump back to my event graph, I have added a new output to our movement timeline here known as Alfa. This is eventually going to plug into right here. So I'm just going to do that straight away. Note that this is a float value and this is a float value. Hence why I chose to add a float track. Okay, so how long do we want this movement cycle to be? I'm gonna go something like 10 seconds. So what I'm gonna do here is specify along the top Ritz's length instead of five. I'm gonna go 10. And that white portion of the timeline here indicates 10 seconds. Next. I need to define what are known as some key frames along this float track, and to add a key frame, you can either right click and say add key frame. Or you can hold down the shift key and left click. I need to add three of these and this will make sense when I get all these in here in just a moment. Okay? For each of these dots on our timeline here, we can add a time value and then a value value. So for this 1st 1 I'm going to select it and you'll know you have it selected. When it's yellow, I'm going to change the time to be zero and the value to be zero as well than for our second key here. I'm going to set the time to be halfway to be towards the end, which is 10 seconds. I'm going to change that to five, and I'm going to change the value to one. And then I'm going to select our last key here, and I'm going to set the time to be 10 seconds and the value to be zero. Now, we've got a timeline that looks something like this, and if you click these buttons right here, you can zoom to fit that into your frame all the same time. Horizontal. Well, it's going to zoom to fit it all in if you have all of them highlighted. So I'm just gonna drag out a marquee selection to make sure I've got all highlighted. And now, if I click those zoom to fit, you can see that it fits very nicely in my timeline with all those selected. I'm also going to right click here on any of them. And I'm going to set this key interpolation to be auto, and it's going to create this sort of smooth sort of slope. Okay, so now it's back this up. What have we just done here? Well, over the course of 10 seconds, we are going to go from a value of zero at the very beginning of our 10 seconds up to a value of one at the five second mark and then gradually back down to a value of zero at the 12th mark. And then I want to keep looping This So it starts back over here again, then goes like that and then back again. So if I click this loop right here, it'll do this The value of our Alfa will go from zero toe one 20 than a loop back here back upto one etcetera. OK, so what we are doing here is over the course of 10 seconds in our timeline, we're going to be changing the value of our Alfa again. It's going to be going from zero, which will call upon value A. Here are start low cow, and then it will go to a value of 15 seconds in a value of one for Alfa equals the B value , which is our end locale and then back to zero again. So essentially, this is driving which one of these we are picking as our new location for a platform. So none of this is going to work just yet because I don't have our update output. You're plugged into our set relative location. When we plug this update from here to here, we're basically saying, pick a new location as this continually updates. Now we need some event. No, to trigger this timeline, do we not well again, The timeline is a special node in that this one does not need an event in order to initiate it. If I go back into my movement timeline here. Once again, there is a check box right along the top that says auto play, which will initiate this timeline right away without an event. So make sure you got auto play checked here as well as loop, and then that should be it. This should be our moving platform script. I'm just gonna left click and drag on a marquee selection. Tap the Seiki to leave a comment, and I'm gonna call this moving platform. So that's with that. Let's go ahead and compile and save. And then let's jump back into our editor and see what we've got. So we've got these two platforms again. This one's got the end location right here. This one's got the end location a little bit higher. In fact, let me set that and location even higher still, right? And it doesn't have to be straight up above. I can set it to be over here, right? So then it would start from here and go up here and kind of do this diagonal pattern so you could make this platform move up and down diagonally side side, You name it. So let me just jump in and play. See what we got. You can see we've got one platform going down, the other kind of going up at an angle right there. That is pretty cool. So we've got our scripting in place for our moving platform. Pretty sweet. So at this point, with that moving platform, all done the script as well as all the components in place. You can start looking to replace all of your placeholder platforms over this my dark river as well as places like this. Remove any of your placeholders and put in your moving platforms. Guys, that is going to do it all for this one. Hope you learned a lot. We will see you in the next video.
38. BP Scripting - Door: Welcome back, everyone. In this video. Our goal is to add variables and script necessary to shore hide an open door message as well as create the interaction for the actual opening of R B P Door. Let's jump right to it and double click on our BP door to open it up. Now, straight away, I am going to create a few variables I know we're going to be needing down the road, so let's just get those out of the way first. So down here you're my blueprints section. Under the variables, click the plus variable button, and this 1st 1 we're going to call can open door question mark. This is going to be a boolean variable, which it is by default. We're going to be asking, Can we open the door or not? I am then going to duplicate that particular variable by right clicking on it, duplicating it, and we're going to call the next one. Has door been opened? Now you could see I did not leave any underscores or spaces between words in my variable names. That's just kind of my own naming convention. You can choose to use your own and naming convention, but I want to point out something right away. You can see that I've got no spaces here, but I am capitalizing the first letter of each word. If I was to drag and drop one of these into our event graph and I get it, you can see that unreal engine is smart enough to know that I actually meant three separate words. Pretty cool. All right, that is all we need to do with these. For now. Let's go ahead and create. Let's do our initial showing and hiding of the text. Showy. Um, if a little refresher here, what we got is this door. And then we've got this trigger volume right here, and we want to make it so that our text that says F to open door appears when we overlap this trigger volume. So, with our collision selected, let's jump into the event graph, find some empty spots, an empty spot in your graph. I don't need any of these appear. I'm gonna left click drag out and delete those. And with my collision selected up here, I'm gonna right click. Add an event for collision collision and we're going to do a begin overlap and just to show you the different ways that you can add events for this, you can also right click on the component itself, appear in the components panel, add events and I want to do add on components. End overlap came Now we Onley want something to happen when it is us the character that is overlapping this collision, not something else, like a physics body or a projectile. So what we can do is drag out of our other actor pin on our on component, begin overlap and let's do something called cast to first person character. So when something overlaps this collision, it's going toe output Some information, including which actor did the did the overlapping and what we're doing here is we're basically checking. Hey was the first person character of one that overlapped this collision volume and if it waas, let's do something. And if it was not, let's do something out here. This kind of acts is a branch, in a way. Okay, Um next I am going, Teoh, bring in our has door bend opened variable. So just drag and drop it from down here. I'm gonna get them, and then I'm going to drag a wear out of it and look for a branch nude. So if our first person character was the one that did the overlapping we want to find out. Has the door been opened? Okay, Next, I want to bring any reference to our text, render drag and drop that in here. Then drag a wire out of it and do a search for a node called set Visibility. So what we want to say then, is if has the door been opened? No, it has not been open. Then we want to set our text, render visibility to be visible. So make sure you check this box and then what we want to do is drag in a reference to our can open door here and this time, instead of getting it, we want to set it by checking this box. We're going to set that to true. So let's recap. Here we begin overlapping that volume. We're going to check to see if it's the first person character. If it is, we're going to continue on. Then we're going to ask the question. Has the door been opened already? If it's not that we're going to show them the text message saying how to open it, which is left open. And then we're going to set our Boolean variable here too. Can open door. Yes, they're going to be allowed to open the door. Okay, so that's good for beginning the overlap. What about our end? Overlap here? Well, let's once again drag out of the other actor and cast to first person character. Then let's bring in our text render actor and we want to drag out of it. Do the set visibility once again and we want to leave new visibility here unchecked. Basically, when we are not overlapping that collision volume, we want to hide that message that says F to open also. What we want to do is grab a copy of this guy up here, control C Control V and we want to make sure that this is not checked because if they're not in this trigger volume, we do not want to allow them to open the door. So all this script right here is just for the showing or the hiding of the door message. So with that done, I'm going to left click drag out a marquee selection. Tap the Seiki in type show slash hide, open door message and compile and save that. Now we still can't open the door yet, but you should be able to jump back into your level here and you can see I dragged a copy of BP Door into my level. I'm just gonna right click and play from here, and you should see that message appear when I'm in the trigger volume. But when I exit out of it, it disappears. All right, so we're getting somewhere next. What we want to do is we want to actually make that door intractable. Let's do this. Find an open space below our graph right here. We're going to right click and in the search bar. Just type in input f Let's try F f inputs. If key There we go. F key is probably good search. You're looking for this input keyboard event, the F key and I always seem to struggle finding those, by the way. Okay, so we want to make it so that when we press f something is gonna happen, well, we want to see if we can open the door. So let's drag and drop a reference to our can open door bullion. We're gonna get that dragon wear out of it in bringing a branch note. So first things first, we're gonna check after we press f Can we actually open the door? We allowed to do that And remember, that is being set to either true or false, based on whether or not we're in the volume they're set to true or outside of the volume there is set to false. Okay, if we are allowed to open it, we're gonna bring in our text render component right here. Gonna drag aware out of that, and I'm going to set visibility. So if this is true, we're going to make sure that that text goes away. There's no point in showing that message anymore if they are allowed to open the door and they're in the process of doing so, Okay. So once they have gotten this far, what we want to do is drag in a reference to our heads door been opened. We're gonna left click and bring that in. And we want to set this because the door is just about to be opened here. We want to check that? Because we're saying Yep. The door has been opened. Why are we doing this? Ah, we want to make it so that we can open it once. Not just repeatedly. Open. Close, open. Close. So that's why we're doing this step right here. Next. We need to bring in a timeline note because, like we did with our moving platform, we need a timeline to enable us to open and close that door. Okay, so let's right click search for a time line. And let's just call this door for Ben. We can plug this into the play, but obviously, we've got some work we need to do with our door open timeline. So let's just double click on this to open it up right away. This should look familiar from the last video, and like we did before, we're going to add a float track, and I'm going to call this door rotation the length of this track. We're going to keep really short. We don't want to spend five seconds waiting for adored open. I'm gonna set this to be 50.3 seconds. You can use your mouse wheel here to zoom in and out right miles click to kind of slide this timeline slider left and right. We're gonna add two keys years. So holding down the shift key, I'm gonna shift left click to add one key shift left click to add a second key, let me select my first key here. And at a time of zero seconds, I want a value of zero for the second key. Select that guy at a time of 0.3 seconds. I want a value of negative 90 now. Why negative 90 here? Because we are going to be rotating the door and negative 90 degrees. So with that, it's very, very difficult to see where that other key went, because it's way, way down here. So I would like to frame up on that. So gonna left click drag around both of those keys and zoom to fit like I did before I did that auto interpellation. I've got both of these keys selected, and I'm going to right click on either one, and I'm going to do this auto interpolate. What this means is that we're going too smoothly transition from one number to the other. This makes it so that it's not a harsh opening is going to sort of slowly accelerate, open and then slowly decelerate towards in okay. And so with that done, we can come back into our event graph, and you can see we now have this door rotation float Output, when we need to do next, is ringing a reference to our door because that's the guy we want to rotate open and let's drag off of our door. And we're gonna be looking for a node called set relative rotation because we're going to be rotating this open and right away. We can go ahead and take our update from out of our timeline employed that into our set relative rotation. Over the course of 0.3 seconds, we're going to be rotating our door open. So now how do we plug in our new door rotation here? Because this is a float value, and this is looking for a rotator. What we can do here is I can let our left click and drag on a wire from our new rotation, and when I release, there is a node called Make Rotator. You want to bring that guy in. We only want to rotate along one axes and that is our Z, the one that's straight up and down. So if I take our door rotation and plug this into RZ were essentially saying that over the course of 0.3 seconds, we want our door to rotate Negative 90 in the Z axes. All right, let's compile and save this and then let's jump in and play and see what we've got. I'm starting my level. My door is over here. There's my test door to open tap the F key and it does not work Awesome. I if I have for gotten one step and I know what I missed here is that I needed to do something here in this blueprints class defaults. This is kind of a good to know, but these keyboard events, typically unless these are in either a player blueprint or something else known as the controller blueprint which we're going to be talking about later on, these events are not gonna work. We need to do something special. In this case. I need to come on over to the class defaults tab and down in the details panel there is an auto receive input which is currently disabled. I need to set this to be player zero, which is us, the lone player of the game. So now if we compile and save gonna jump back over to my level, I will right click play from here. So now we see that message appear. And if I tap the f key, it will now open relatively fast. And if I tap it again, nothing happens. Just like I'm intending. So that is working, just like I was hoping. Now, obviously modifications you can make to yours are you can increase the length of time with which your door opens. You don't have to have it be 0.3 seconds. But there is a last look at our door open script. So if you want a pause and kind of take a gander that let me try to fit this all on screen one more time while I drag out a marquee selection. Left click Drag Tap that Seiki. And I'm gonna call this open door. That's a look at the open door script and one more look at the show hide open door script for anyone that would like to pause the video here. Actually, before we wrap this video up. I am looking over my notes and I forgot one more thing that we still need to fix up. Come on down to your F key events. Let's make sure you select this guy. And over in the details panel, we need to uncheck this consume input, okay. By uncheck ing this This will make it so that for every door we place out in our level, we can we can open them all independently. If you have that checked, you will be able to open up one of your doors, but none other. So make sure that with your f key selected here, you have unchecked your consume input check box. All right with that, let's compile and save. That will do it all for this one. Guys, we will see you in the next one.
39. BP Scripting - Character Health: Welcome back, everyone in this video, we're going to be taking a little time out from scripting our blueprint. Actors here, I'm going to jump on over to our first person BP blueprints, first person, character blueprint. Find your way on over here. The reason we're gonna be working in here is because the goal of this video is to add some variables and a function necessary for creating the backbone for the health system. In our simple game, we got thes steam jet and the spinning fan coming up in just a little bit that we want to have damaged our player. But before we can damage the player, we kind of need to have some sort of a concept of health on our character, which is why we are starting here. All right, so find your way on down to the my blueprints panel, and we're gonna add some variable. So click this plus variable button. 1st 1 we're going to add is gonna be called health Max, and I'm gonna changes on over to a float variable. Then I am going to duplicate that one selecting it selected controlled W. And this one is gonna be called health current. I also want it to be a float variable and actually something I should have done before I duplicated that. I wanted to show you that you can actually create categories for your variables here. So starting back at my health, Max, over in the details panel, I'm going to create a category to put these in by simply clicking over here. And let's call this attributes and you can see how we now have a category called attributes down in the my blueprints area. And then I'm going to select my health currents. And I am going to put that into the attributes. Why don't have to actually put in the value attributes. I can click from this drop down box and choose attributes. Ha ha. All right, we need one more variable here. So I will right click in duplicate, and this one is gonna be called health percentage. All right, well, so with that, let's compile and save so we can set some default values for all these. Starting with health. Max, we're gonna set that to be 100 health currents. I will set that to be 100 will start out at full health and then health percentage. I'm gonna set to be 1.0 because 1.0 equals 100%. Okay, Next, we are going to create a function to do some health updating calculations, like what to do eventually if we get hurt or healed. All right. So come on over to the Functions section of your my blueprint tab, and we are going to create a brand new function. And when we do, that's going to create a whole new graph over here, and we need to give our function a name. I'm gonna call this up dates health, like so. And I do wanna have an input here. So with this update, health node selected right here gonna click this plus button and we're gonna add a new parameter. And this is going to be called health modifier. Make this be not able in, but a float And what we're gonna do straight away is we're going to bring in our health currents variable added to our graph. We're gonna get it, and we're going to add these together. So it doesn't matter which one of these you drag out of just gonna drag out a health modifier. Add plus symbol and we want to float plus float. Okay. And then what we want to do is we need to set our health current a little shortcut here that you can take instead of dragging and dropping and then deciding whether you want to set it or get it. If you hold down the altar key while you left, click and drag, you will automatically bring in a center. Okay, I'm just gonna jump out of this function really quickly because this may all look a little confusing. We are creating a function here. In this, we added an input called health modifier. Now, I thought you said inputs were on the left hand side of a node. Mr Wandera. Well, they are actually. So if I jump into our event graph and I was to bring in this function know that we are creating you can see that our function puts this health modifier on the left hand side of this function know that we are creating. So it's a little un intuitive to me anyway, is in a little confusing that back in our update health function that we're creating, we added in input that is currently on the right hand side. So just know that when you're creating these functions, it's almost like it goes like this and creates a function out of that with that health modifier input right there being on the left hand side. Anyways, I'm gonna get rid of this for the time being. In our event graph, let's jump back to our update health function. You double click on that if you're lost. Okay. Next thing I want to do is I want to drag out of our current our health currents, and I want to look for a node called clamp float. I want to make sure that this value never gets below zero or above 100 so this will ensure that it never does. Okay, out out of this, we're gonna get some value. I'm going to drag out of this and look for a divides symbol so you can do float divided by float. Now, what are we gonna divide by here? We're gonna divide by the health max, and you can drag and drop this right onto the pin to automatically link it up. That's pretty cool. Okay, Next, we are going to clamp that float one more time, drag out of here, do a clamp float. And here we want to make sure that the value is going to be between zero and one. And this we are going to set into our health percentage. So I'm gonna hold out. Ault left, click and drag to bring in the center for that. And that's why we want to clamp this value between zero and one, right? So just kind of backing things up here. Let's say we are current health is 100 our health modifier is actually negative. 50. Maybe we get hit by something. Suddenly our health current is going to be 50. So we'll come into here and it will say yes. Health 50 is valid between zero and 100 so it outputs 50 and then we'd want to divide that by our health. Max 50. Divided by our health, Max, which is 100 would be 0.5, which is 50%. So 0.5 would be input into here, and that is a valid number between zero and 10.5 would be set as our health percentage. And this number right here we are eventually going to output to some HUD on the screen to drive a health meter of sorts. That will be pretty cool. Something else I want to put in between this wire right here to make sure that all this stuff happens is I wanna drag out a wire and type in print string cause I want to see this value output into the screen so that everything is looking good. So let's continue this by bringing this into here and let's drag out of here. This is essentially our updated health value and plug it into our in string right here. What that's going to do is it's going to convert this float variable into a string. That's what. This guy is right here because the Prince string only takes in a string variable right there that just converts it. Okay, so then what do we want to do here? We're almost getting done with this. We're gonna drag out of our health percentage right here, and we are going to do a search for less than sorry. Less than or equal to float less than or equal to float now, in courses passed, I always have a lot of students kind of mess up their less than or greater than sign. So make sure the alligator mouth there for the lesson sign is pointed off to the right. Okay, we want to check if it is less than or equal to zero. And if it is drag off, the here of will do a branch and hook that up. If that is true, our health is less center equal to zero again. This should clamp it so it never gets below zero. But if it zero we are going to drag out of here and destroy actor, that means we're going to destroy ourselves our first person character. Because Target is self first person character. All right, if in fact is not true, we're gonna drag aware off and we're going to play a sound. We're gonna do play sound to D, which is basically like a menu sound. It's not gonna be located anywhere in the world and have you no depth to it. We're then going to slot in the sound here, and I like v r underscore teleport que So this is just gonna be like a damage sound like, Boom, you got hit, right? Okay. So let me just back this up here so you can see everything that we have created here in our function. Hey, guys. Just wanted to interrupt the original recording of this video for one quick update amid a mistaking the original recording. And I am going back in fixing this. So I am recording this at a later date to fix my wrong. One thing I did wrong in the original recording is this Very first clamp float, node. This guy right here, we need to move this before are setting of our health current variable. So note this change, and please make this updated change. Or you may find some problems with your health system as you get rolling on. So make this change right here where we're gonna take our health current. We're gonna add it to a health modifier, and we're going to clamp that between zero and 100 that I'm just gonna break some wires here. The result of this is going to be plugged into our setting of the health current. So we want to make sure that our health current is originally clamped between zero and 100 before it's even set. Okay, so then the output of this, we want to go into this dividing of the health, Max, this whole print string, you don't really need it. But if you want to keep seeing it, you can plug your health current into this as well. And that will keep showing you what your health your current health value is when you are damaged. But that is one change that we wanted to make here. So note this rewiring, and I'll try to fit this all on screen here. So this clamp float this 1st 1 we have to clamp this before we set it into our health current. And then out of this health current. This is where we're going to divide by our health, max to then determine what our health percentage value should be. So let me just see if I could squeeze this on screen really quickly here. So in case you need to pause the video, you can make sure that this is all corrected. Okay, So with that, I am going to compile and save, and then I'm gonna hand it back off to the original video to finish this video off and then I'm just gonna finish this off by compiling in saving Now note. In the next videos, we're gonna worry about hurting our character. And also, we're not worrying about responding after destroying the actor at this time. This is all just prep work. For our next lesson, we'll worry about responding later. All right, that's gonna do it off for this one. Guys, we will see you in the next one.
40. BP Scripting - Steam Jet: All right. Welcome back, everyone. Now we have some of our character health system groundwork in place. We can go about trying to damage our player, and it's going to start with our BP steam jets will find your way on over to the blueprints Actors folder and double click on your BP steam jets. Right? First thing we want to do is create a variable and this one we're going to call player health to subtract. And I am going to check right over here and turn this into a float variable. And I'm also going to check this box right over here that says instance creditable. And again I could either check here or click this little eyeball here, this closed eyeball. And the reason for that is, after I compile and savior, we can now make it so that no matter which steam jet we place around level, we can customize how much each individual seem. Jet should subtract in terms of health by default. I'm gonna change this to 20 but just a sorry negative 20 not 20. I don't want to add help their negative 20. And I'm gonna compile and say this once again. And if I'm to jump back to my level editor here, I've already got a steam jet out there. If I select it, you can see down in the details panel. I now have that parameter player healthy. Subtract that I can customize on a case by case basis. Maybe I want this steam jet to subtract the full 100 that is deadly. Where is this one? Subtracts just 20. You see how they've got different values there? That is a cool level of customization. All right, let's jump back to our BP steam jet. This script will be relatively simple. I'm gonna clear out thes three event nodes that are in here by default. What we want to do is we want to do something when our player overlaps this steam hub. So I'm just going to right click on our steam hub. Not the steam Hope are damaged. Area that is this volume right here. The steam of is that down there? That's my bad when they overlap the damage area. So let's right. Click right here. We will add an event on beginning overlap and we want to check that it is the player that is overlapping that volume. So let's drag out of our other actor. Because it'll give us that information as to who is overlapping it, and we will do a cast to first person character. Okay, Next, What I'm gonna do is I am going to drag out a wire if this is true and we're gonna look for a do once node, What this note allows us to do is to do it one time and never again if you so choose, or you can reset it so that this damaging can happen again. The reason I'm putting this in the place is because without this, what could happen is your player starts overlapping that volume and they'll just get damaged again and again, again, relatively quickly. I'm going to damage him one time, then set a little bit of a delay and then make it so that that steam condemn Ege them again . Okay, so after this, let's drag out of our completed. And actually, let's not drag out of our completed. Let's drag a wire out of our as first person character and look for update health. This is a function that we just created in the last video And the only way you're going to access this is to drag this wire out of his first person character because it lives in our first person character blueprint. If I was to simply right click into some empty space here and look for updates. Health, it is not there. But if I am referring to our first person character, you can left click drag, and find that update health function that exists in your first person character. Okay, I'm just gonna bring this over here, and you can double click in these wires to bring in reroute nodes, which allows you to add some bends in your routes. And we are going to plug in like this. Now, how much health do we want to update by? Well, we've got our player health to subtract, right? Here's weaken, drag, and drop that right onto there. And remember, that's going to subtract, at least in this default case. 20 health. Okay, after this, what I want to do is drag out a wire and I'm gonna be looking for E delay node. And by default, it's got a duration of 0.2 seconds. I'm gonna change this to half a second. So 0.5 and then I'm gonna wire this back around to reset. So I've got a set up that looks something like this. So I'm essentially saying when our first person character overlaps that damage area volume one time update, our health essentially damaged them. Do 20 points of damage here. And then we're gonna wait another half second before this damage area volume is allowed to be damaged. The character once again All right. With that, we can compile and save. And let's go ahead and try this out. If you look in the upper left portion of my play window, you should see some health values being spit out to the screen when I overlap that steam. Okay, there is my steam. Look in the upper left of my pill. A window. You see the number 80? I jumped through it again. 60 I get Close it again. 40 20 And let me go through one more time. Zero I am dead. You can see I no longer have control of my window. My character is destroyed. I have no more control. Let me just escape to exit out of here. So, guys that is going to do it for this one. We have added the scripting for our steam jet. Great job. Let's get onto adding some scripting to our fan. Next, we will see you in the next one.
41. BP Scripting - Fan: welcome everyone in this video, we're going to add the variables and create the script needed to make a fan obstacle that can damage our player. This one is gonna be really similar to our BP steam jets. So let's hop right to it. Come into your blueprint Actress folder Double click on your BP fan and right off the bat here, we're going to be adding a couple of variables. Variable number one is going to be called player health to subtract, just like in our steam jet. We're gonna changes to a float variable. Then we're gonna add another variable, and this one is going to be called rotation rate. This one I am going to change to a rotator. Let's compile and save right away so we can set some default values for my rotation rate. I'm going to set my rotation rate in the X to be 80 Now you may be thinking back and saying Hey, Mr Wandera, I thought we set this rotation movement component on here so that we can have our rotation rate be 80 here. Why are we adding this variable will come back to that in just a moment? Let's select our player health to subtract variable Next and here we're gonna set our player health to subtract to negative 20 just like we did on our steam jet. I want offers much customization to the creator as possible. So if we check each of these eyeball icons on so that their yellow you will notice that we've made each off these variables instance creditable Well, that means again is if you compile and save and come back into the editor with your fans selected over in the details panel, these two variables have been exposed right here in the level editor for you to change. That's pretty cool, right? This is gonna offer really simple means of changing the rotation rate of your fan. But notice that if we actually were to change the rotation rate of our fan right now, nothing would happen. And the reason for that is because we need to talk directly to our rotating movement component. This is what's actually determining the rotation of our fan. So this is what we need to do. Firstly, let's bring in an event. Begin play note. You can right click, do events, begin play, and then bring in a reference to your rotating movement component by dragging and dropping , and also bring in a reference to your rotation rate left click Drag that in. We want to get that. Now remember, in a rotating movement component within here exists a parameter called rotation rates. We want to talk to that, be able to change that. So if I were to drag a wear out of my rotating movement component, I can say set row tape T rotation rate. So this is what we're looking to set. And now if I plug this variable this rotation rate right into here, this will make it so that any value here in the editor we change for our rotation rate that upon beginning play, it'll set it as our new rotating movements. Rotation rate Pretty sweet. Okay, so now at this point, the scripting is gonna be really, really similar to our steam jet in our event graph and just going to come on over to the right. Actually, I should put a comment box left, click and drag around that Let's do set rotation rates of fan and let's start by making it so if our user collides with one of these collision boxes that we get hurt. So I'm just gonna right click here on collision. 01 We're going to add an event for beginning overlap. I'm gonna bring that down over to the side, and again, we're going to check if the other actor was our cast to first person character, and then we are going to do once and then we're going to drag aware out of as first person character and do the update Health, like, so plugging this guy in how much health to modify. Well, we have a variable for that. That we could just drag and drop right on this input pin. And then after this update, health, we can drag out aware, do that delay. And I will leave this one at 10.2 seconds. That will be just fine. And then plug this back into whips the resets. Okay, so this is all well in. Good. I am actually going to take this bit of script right here. Left click. Highlight these nodes right here, Control. See? And then we're going to come down, paste it once, pasted twice and paste it three times because the only thing I need to change. It's gonna be different. Is which of these collision boxes is going to kick off the rest of the script. So right here, I got collision 02 I'm going to right click add event for begin, overlap. And of course, it puts that node way over there. So if we were to overlap that box, that would damage us, that I'm going to select Collision 03 and another way you can add an event is to scroll down in the details panel. I'm just breaking out all the tricks for you all is. You have some events down here that you can click on so I could do on component begin overlap from here to add another begin overlap node. Lots of ways to add the on component begin overlaps super common. By the way, Plug in like so plug in like so and then last but not least, we got collision. 04 I will, right click. Add events on component begin overlap Plug in and Le Guin And that is a pretty good look. Let's just review this all one time. That's what the collision code looks like there and we do this again for each of our four collision boxes and then over to the right. Here is our setting. The rotation rate of the fan. This should work. So let's compile and save. And I am going to jump in and play. Right Click play from here. Look at that dangerous looking fan, right? Notice. My health value in the upper left is down to 60. I got hit twice. You hear that sound effect to one more hitting on the Gagner and gone. All right, guys. We now have the scripting in for our blueprint Fan. Great job that is going to do it all for this one where you will see you in the next one.
42. BP Scripting - Health Pickup: Welcome back, everyone. In this video we will be adding a variable and creating a script needed to make our health pickup. He'll the player. Now I've done a little work between videos here shaping up my level, and I actually do have a BP health pickup in my level. Now if I just tapped the two key on my keyboard, I am going to fly right toe where it is in my level. And I have a kind of in the back of this corner over here. And you may be saying initially, how did I just snap to where that was immediately? Well, something I should mention, and I should have mentioned in the gray boxing process is you can set some locational bookmarks throughout your level if you hit control plus a number key wherever your cameras located. That will set a bookmark for your camera to, so you can fly to that location immediately. For example, right over here, I said control plus two as my bookmark with my camera place right about here so I could be anywhere else in my level, like way over here. Tap the two key and it'll fly me right to it. So you've got up to 10 bookmarks control plus one control plus to control plus three etcetera. And then after you set those bookmarks, all you need to do is just tap the corresponding number key to fly right to it. All right, let's get back on topic here. What do we need to do? First thing? Come in your blueprint Actors folder. Double click on your BP health pick up and right away we will create a new variable. This one will be called Player Health to add, finally adding some health. Let's change the variable type here to a float right away, and then I will compile so that we can add in a default value. I'll go 20 and we will also make this instance creditable to so in the event. You do want to make it so that some of your health pickups give you more health and others . You can do that, you know, maybe you can scale some down and they'll give you 10 points of health. And maybe you scale some to be a little bit bigger in the Avia. You know, 30 points of help, that kind of thing. So again just to reiterate what this does. If I compile and save and I select my health pickup in my level, you can see right there is my player health Add that I can customize for every one of these I drag out into my level. Okay, so with that done, we just need to do the scripting end of it. I'm gonna left click in, delete these default event nodes and what I'm gonna do is find my collision up here in the components panel. Right click. Add an event for on component. Begin overlap. Now we Onley want this to trigger if it is us, the first person character that is overlapping it. So let's drag out of this other actor and do a cast to first person character again. When you overlap this volume, when something does, it will output some information and I'll put it through this other actor and right here we're doing a check to see it. It is the first person character will do something right here. If it's not, you can do something out of the cast. Failed. All right. Next, let's drag out of the as first person character because we want to call this function the update health function that we created within our first person character blueprint. How much health do we want to add or subtract? Well, that is simple enough. We'll grab our player. Health adds this dragon. Drop it under there like that. And then let's drag aware out of here and let's play a sound. So let's look for a place sound to D node and I do have a sound in mind. It is called the Are Underscore Open Que And of course you can slot in whatever sound you were happy with then. Lastly, I'm gonna drag aware off of this and say Destroy actor And the target here is self So basically what this is saying kind back in things up here. It's saying that once we overlap this collision volume with our first person character, we're going to update our target, our first person characters health by how much? By 20. Then we're gonna play a sound, and then we're going to destroy who are sells. The target here is self. So with that, I'm just gonna drag a marquee selection by left clicking and dragging tap that Seiki and I'll call this restore health. Let's compile and save. I'm just going to jump into my level. Let's back up a little bit. I have added some hazards since the last video. So let's play from here. I added some steam right over here. Actually, let me jump in from the getting of the level so you could see what I have all created so far between video's gonna jump in and play. So this is a very beginning of my level. A little bit more work to be done for sure. But there's my F to open. Uh huh. It is doing right there. I didn't get hit by that fan twice after open. This is some steams little damage. Me. So look in the upper left of my view ports and you can see I now have 40 health. I have this conveniently placed elevator to hoist me on up to that health pickup. I'll jump on over and you can see I now have 60 health. So that did in fact work. And you heard the sound effect as well. All right, guys, we now have our health pickup scripted. That is going to do it all for this one. We will see you in the next one
43. BP Scripting - Parent Target #1: Welcome back, everyone. We are onto the good stuff. In this one, we will be doing some BP scripting in our parent target. The goal in this one will be to create some variables and functions that all Children targets are going to inherit. And we'll start by creating the script for a child target who is labeled as a stand alone target. Now we have some targets that we are intending to spawn up as either part of a set or individually. So this first part, we're going to be dealing with what we want to do, how we're going to spawn up a single target if that's all we want is one standalone target . So let's find your way over to the Blueprints Actors folder and double click on your BP Target parent and right away we're going to create three variables in here. The 1st 1 will be called Points that we want to change to be an integer cause we want to score some points when we shoot this. Let's create another variable. This one will be called Lifetime. How long is our target going to stay alive, active out there in the world before just disappears. I'm gonna change this to a float variable one with the decimal point. We'll add another variable, and this one will be called is stand alone Target Question mark and we will change that to a Boolean type. We want to flag any of our targets as either a standalone target or not. Go ahead and compile from here, and we want to change a few more things about our variables. Here is stand a little target that is selected first by default. Let's leave this inject, but we do want to make this instance creditable. So go ahead and check that. Then select your lifetime. Let's set a default lifetime of 10 seconds and let's make this instance creditable to so we have fine control over how long each target stays alive. Lastly, select your points. Let's that a default point value of 100 let's also make this instance creditable. Okay, with that in place, we can now do some scripting and by default you should have an event right here in your event graph called Event. Begin play. I deleted mine out before I started this video, so I'm going to manually add it back in. And I can do that by right clicking, doing a search for begin play. And right there, that's the guy I want. So, upon beginning play, what do we want to do? Well, I want to do a check for our standalone target. So let's bring in a reference to our standalone target. We want to get it and off of this. I'm gonna drag out of wire and do a search for a branch note, and I want to find out if any of our targets here are labeled as a standalone target. Now, remember, this is our parent target. All Children will inherit these properties down here. So is it a standalone target? Um, next, I want to bring in references to our target. That is the actual disc shaped thing that represents what we want to shoot our point value and our spotlight and out of any three. These it doesn't matter. You can drag out a wire and type in set visibility, and we can plug all three of these into the target. And what we want to do here is out of the true branch. We want to set our visibility to not be visible. So what we've got is a upon beginning play we're going to check. Is the target labeled as a standalone target? If it's true, we want to hide the target, the point value in the spotlight. Also, what we want to do is ring in a reference to our target collision Drag aware out of its and type in set collision enabled that guy and we want this to be labeled as no collision. So here's a look at that script for you. So here's the deal. If it is labeled as a stand alone target, I'm just gonna jump on over to our view port. We don't want this disc shaped thing visible. We don't want our numerical point value visible. We don't want the spotlight to be shining. We don't want that visible it all and our target collision this thing, encapsulating our entire target. We don't that want that to have any collision either, because this target is actually going to exist out in the world for just the player to overlap the trigger volume, which will then tell it to spawn. We don't want the player to accidentally see this trigger this target rather or even to be able to shoot it. So that is why we're saying if this target is labeled as a standalone target, we don't even want to see it. And we don't even want the collision to be enabled. We will deal with the rest of it in just a little bit here, so that's all well and good.
44. BP Scripting - Parent Target #2: Okay, so now we do want this trigger volume to do something when we overlap it. So let's right. Click on this trigger volume, add an event for on component begin overlap. And the first thing as we've been doing for a lot of these is we want to check what was the thing that is overlapping this trigger volume this box shaped right there. We're going to drag aware out of the other actor and do that cast to first person to ensure that it was the first person character that overlapped it. Then we're going to do is drag in another reference to our standalone target. I'm just gonna hold down control in left click to bring in a getter right away and out of it. I will drag out, aware, find a branch. And if this is labeled as a standalone target, I want to do once right there. And what do I want to do? I want to basically find our targets, our point value and our spotlight. And I want to drag aware out of any one of those. And I want to set visibility, plug all three of these into the target and make sure that you check this new visibility box. So again, what we're saying here is as soon as we do overlap this trigger volume, we do want to show the target the point, value the spotlight. Now, one thing I want to make clear is I know there right now this trigger volume that we're asking the player toe overlap is kind of overlapping our target here. Isn't that a little weird, Mr Wanderer? I mean, like, what if this targets way up in the air House? The player ever gonna overlap that? Well, once we places in the level, we will be able to move this trigger volume independently of the rest of this blueprint. So just know that we can move this box down into the right any place we want to put it. Okay, so let's continue on here. So we're setting that visibility to be true. Next, let's get our target collision. Talk to that guy and let's do set collision enabled. And for the collision type. Let's set it to be Queary on Lee. That'll enable some collision and continuing on. What do we want to do next? We are going to bring out a something called a sequin snowed drag aware out here sequence because we're going to have to things that we want to do. And I'm gonna bray I'm gonna branch off this top, then one first and then we'll deal with this a little later. So the first thing I want to do is I want to Let's play its sound place sound to D in the sound that I want is called Possess possess player to you That's a nice sort of spawn e sound effect. And then I'm gonna want to plug this into a timeline. So go ahead and find a timeline node. And let's call this timeline Spawn animation. We're gonna play a really short spawn animation for when the target pops into existence. We will deal with this in just a little bit. Actually, you don't want Let's deal with it now. So let's back this up again real quickly. Player overlaps that trigger volume. We're checking again. Is it labeled as a standalone target? If it is, we want to one time set the visibility of our target point value and spotlight to be true. Turn our target collision on so we can now shoot the target. Then we're gonna play that spawning sound effect, and we want to do a spawn animation. Let's double click on this guy and create a spawn animation. Okay, we're gonna have a relatively short animation here. Let's go with the length of 0.3 seconds, we will be creating a float track. Let's name it rotation and let's add Let's add three keys in here. So I'm going to hold down the shift key in left click. Once left, click twice and left. Click 1/3 time and note that I don't really care where I place these keys here to begin with, because I am going to be manually setting them. So I'm gonna select this first key, and I'm going to give it a time of zero and a value of zero. Selecting our second key, I will give it a time of 0.15 seconds and a value of 1.5, and then I will select our third tea here, set the time to be hoops set the time to be 0.3 in the value to be one, and let me just hold down control and use my mouth's wheel to scroll way back and I'm gonna left click drag on a marquee selection to select all those keys and click on these two arrows to frame that into view. Then with all those selected, I'm also going to right click on any of these keys and set my key interpolation to be auto . That's going to create this sort of smooth animation of a target kind of spinning into existence that I will demo for you when, uh, we're just about done here. Okay, so let's hop on back to Arvin graph. And now we've got this rotational float value that we can pull out of. But first, before we even deal with that, let's talk to the thing that we actually want to animate here. And that's gonna be our target collision. And why do we want to animate this thing? Because all of these guys are attached to it. So if we animate this kind of spin it into in the existence, all these air gonna come along for the ride. So I'm just gonna left click and drag this out here, and then I am going to drag out a wire here and do set ah, set relative you know what? Let's scale the size of this target. Let's make that the animation. I was gonna kind of rotate it into existence. But you know what? I think I'm going to scale it into existence instead. So let's come back in our spawn animation and let's change this instead of saying rotation , let's right. Click this and rename this to skill. I think that's what I was intending all along. But I messed up in my notes here, So bear with me, we're gonna scale that. So then, out of our target collision, let's just left click and drag and let's do a search for a set relative scale, three D and what? We could plug this in right away, but I don't want to do that just yet. There is a safety check I want to do there. Let's just take our scale and plug this right into our new scale. Three D. So it's gonna bring this little conversion note, and basically that scale is going to get applied to the X. Why NZ of the new scale three D so we're going to essentially scale are a collision or our target from a point of nothing to something a little bit bigger and then shrink it back down again between these two. What I want to do is I want to drag out. Or actually, it's right Click and bringing a reference to self. We want to talk to ourselves, don't we? Always out of this, I'm gonna drag out, aware and do a search for is valid and there's two different notes here. You want to choose the one with the question mark and the way we're gonna hook this up is on our update. We're gonna plug this into here and out of the is valid. We are going to plug this into here. Let's understand what we're doing. We have this spawn animation that is going to take 0.3 seconds, and it's going to essentially scale the size of our target from basically infinitely small point to a target 1.5 times its normal size and back to a relatively normal size. During that time, a player could technically shoot the target. If this is not in here, you're going to get some warnings yelling at you, saying, Hey, we could not find the target collision because you have already destroyed this target. So note that this is a safety check to save you from some errors later on. Okay, so that's all we want to do out of this top sequence branch. Let's pull out of the bottom portion of the sequence. Branch and I want to start by bringing a wire out of the then one and let's do a search for a delay, node. And I want to set our delay to be the time that is contained within our lifetime variable. Because what we're gonna do here is drag out another wear, bringing another sequence node and out of the top, then zero. I'm gonna plug this into the reverse of our spawn animation. And don't worry, I'll come back and explain that in just a moment. And then I was out of the then one. I'm gonna drag aware out said another delay for 0.3 seconds. 0.3 seconds. And then we're going to destroy the actor, which is the target now, a few things. I want to point out what we're doing here. Let's In fact, let's back this all the way up upon overlapping a trigger volume. We're gonna check if it's the first person character we're then going to ask. Was this a standalone target? Was that Target labeled as a standalone target? If it was one time, we want to set the visibility of our target, our point value in our spotlight to show to be visible. We're also going to make it so that we can actually shoot the target by enabling some collision. Then we're going to play a sound effect, a spawning sound effect. The Spawn animation, which is 0.3 seconds, will play first. We'll check to make sure that the target has not already been destroyed because it spawned animation is 0.3 seconds, and over the course of 0.3 seconds, we're going to scale the size of our target collision, which is the parent of everything else here. So it will scale it from basically a scale size of zero up to 1.5 times its size, and then down to its 100%. It's normal size. And while we are playing this spawn animation were then beginning a countdown, a 12th countdown in this case, our lifetime. And after this delay of 10 seconds happens, what we're going to do is reverse our spawn animation. And after this same time of reversing our spawn animation 0.3 seconds, we're going to destroy the actor. Hopefully that all makes sense. Let's compile and save. And then let's come over into the level editor and give this world. Now, I should be able to drag in any one of our targets here because remember, they're all Children off our BP Target parent, I'll start with BP. Target 100 dragged that guy in and notice with its selected over in the details panel, you see fields to customize how many points it's worth the lifetime that it will stay on active or alive. And if it is a standalone target, I do want to check this by checking this. Remember our script, Issing. It will not be visible at the outset of a level. Let me just drag this up into the air a little bit. I'm gonna pivot this around. We're gonna put this to the test right away. Kind of up in the air over here. Now, notice with this selected in the details panel. If you kind of drag this portion of the details panel down. It's a little hidden. You can reveal all of the components of that blueprint, and this is where the magic really happens. You can select your trigger volume. And just with the trigger volume selected, you can move that one component around into your level wherever you want it. So I'm going to set this down on the ground. I'm going to scale it a little bit to make it easy for our players. Overlap it. And then I'm gonna pull it way back here right about there so that when our player starts in the beginning of the level, he's gonna come down this alleyway. It's gonna overlap this and as soon as he overlaps. Is this volume look right in this area? Because this should spawn in. Now, remember, I've got this set to spawn. Let me just select my target here. It's supposed to stay alive for 10 seconds and go away now. I can't actually shoot it and destroy it just yet. That script is to come, but let me set my lifetime here to be five seconds because that's all we need to see it go away. All right, let's jump in and play. See what we got after open F to open a little damage. Now watch right about there. Boom. Target comes into existence. Five seconds pass cannot shoot it yet. That boom it goes away. Everything is working superbly. Awesome. In the next one, we will actually script some more functionality for our parent targets so that all the Children can inherit from it so that target can be destroyed. We will see you guys in at the next video.
45. BP Scripting - Parent Target #3: awry. Welcome back, everyone. In this video, we're going to continue scripting our parent target. There is still more work to do. We created some script to spawn a target. If it's labeled as a standalone target, we still need to add some script to still spawn the target if it's not a standalone target , and we also need to add some script to destroy the target when shot, because currently our projectiles do nothing. So, without further ado, come back into your content. First Project Blueprints Actors folder and if you don't already have it opened up, double click on your BP Target parents. Just some quick notes from what I have done since the last video. This is a script that we created in the last videos, and all I did here is I added some common box around certain sections just to make it a little bit more clear as to what each section does. So just to recap here, this is a script off of the event. Begin play, and I just added a little comment box, and you can get one of these by left clicking and dragging around a series of notes and then tapping the Seiki after you drag out a marquee selection season, Charlie. So I just added a comment box right here saying that this standalone target is to hide, target and remove the collision. If it is a standalone target, then coming back down here little ways. We've got our spawning of a standalone target. And I've just commented this section of the script right here and then off to the right. I added another comment box for the actual spawning of the target. This is where the Spawn animation happens. And I created these common boxes specifically for certain purposes because later on in this video, I'm actually going to hook in a wire off of this false branch. Okay, so I just kind of wanted to make clear what each section of our script was doing. Okay, Firstly, Ah, we did make it so that if it is a standalone target, we are actually spawning in the target. Well, what if it is not a standalone target? What if this is false? Well, we actually still need to spawn in the target, so I'm going to drag aware off of this and plug it into our sequence node down here so that we can still spawn in our target. Remember off the true branch up here we were just setting the visibility of our target and disabling the collision. And if it wasn't standalone target, then we were doing this bit of script which was making it visible and enabling its collision again. So up here we're basically saying, Hey, if it's not a stand alone target, we don't really care about thes setting of the visibility and the setting of the collision enabled. Just go ahead and spawn that target. And this is all gonna make a little bit more sense when we get the additional set Sponder blueprint scripted as well. We'll come back here and just to recap and get all the pieces sort of in line so you can see how it's all working. So make sure off this event begin. Play is stand alone. Target out of the false branch were saying, even if it's not a stand alone target, we want to spawn in that target with this bit of script down here. So that's simple enough, right? Let's go ahead and create the scripting of destroying our target. So this is going to involve us interacting with this target collision, not the trigger volume. So come under your target collision component. Let's right, click and let's add an event in the event we want to add is on component Begin, overlap can. The first thing we're going to do is out of this other actor we want to detect if our projectile is the thing that is overlapping that target collision. So drag aware out of here, and we will do a cast to projectile first person projectile, to be precise. And if I jump out of this blueprint for just a moment and go back to my editor in our first person BP folder, we've got a blueprint folder inside of there. You can see we've got a first person character blueprint and we've also got a first person projectile blueprint. This is a thing we want to check. If that is overlapping our target collision, which is this circular bit of collision right here. So in the projectiles over overlapping that we want something to happen. And this is where we are checking. Was it the first person projectile? And if it was, we want to do something and If not, you could do something out of here. But what we want to do next is drag aware out of the s first person projectile and simply type in destroy actor Here we are saying if it was the first person projectile that was overlapping the target collision, we want to destroy the first person projectile. You don't want that to just cut right on through. We want to destroy it once that overlaps. Next thing we want to do is spawn any mirror. So drag aware off of here and do a search for spawn emitter at location. What team it or do we want to spawn in? You can choose which ever one you like. But there is a handy dandy explosion P under explosion that is found in this started content. That is great for that. And I'm going to scale this explosion up a little bit in the X y and Z. I'm gonna make it a little bit bigger by changing this to be 1.5 in the X y in Z. And now I need to specify what location do we want to play this explosion at? Well, I'm going to drag out a reference to my target collision here. Drag and drop that and then out of this and want to drag out, aware and say, Get world location and we can plug this into the location. So then we're seeing when the first person projectile overlaps that target collision. We want to destroy the target, our first person projectile, and we want to spawn an explosion at our target collisions location, and we're going to scale it up a little bit in size Now. Any time you have an emitter, you probably want to have a sound to go with it. So let's drag aware out of here to keep our execution going and type in. Let's do a place down at location and we've got an explosion emitter. So let's do an explosion. Que sound. And it's also asking for where should this sound be located? Well, we've got our target collision location right here, so let's just drag aware out here and plug that into the location up here as well. Double clicking on this wire will add a little reroute notes. You can kind of bend your way around like this and keep your script looking nice and clean . They're almost finished up here. Next thing I want to do is drag a wire out of here, and I'm going to do a short delay, Riel, short delay. And this delay is going to be I'm gonna send it to be 0.5 seconds. And then after that, I am going to say dry, got a wire, destroy actor. So the reason I am bringing out a little delay here before we destroy the actor, which is this target? Because our target itself is because if we don't add this delay and we shoot a target almost immediately upon its spawning, you will get some warnings. And through some testing that I've done this DeLay will get rid of that warning. So this is a little bit of a safety check. Prevents an error if shooting a target before the animation is finished. So with that, been a script right there. Let me just try to frame it up for you. We can put a marquee selection around this guy Left click drag cap that Seiki. And around this, I will just make a comment to call this. Let's see. Destroy projectile and targets when pits I'll go ahead and compile and say this. And then moment of truth. Let's just jump in and play this left open. Have to open a little damage. And my target should be able to shoot and destroy this now. And boom, it is gone. So we know this is all working right here. Now, this part that we just did up here, where we took a wire out of this false branch and plugged it into our target spawn this we can't actually test yet until we do our our scripting for our blueprint target Sponder that will come in a couple of videos time and I will circle back to this. I promise. Anyways, that is going to do it all for this one. Guys, we will see you in the next video.
46. BP Scripting - +Speed Target: Welcome back, everyone. In this video, our goal is to add script necessary to give our first person character a speed boost if they shoot a speed boost target. Now remember, we're gonna have to quote unquote special targets in our level here one that is going to give our character a speed boost. If we shoot that target and another one that's going to give us a time bonus, we're not gonna be doing the time bonus target for now because we kind of need delay Seymour groundwork down to get that working properly. But this one we can address now and this is going to involve a couple of different blueprints. And the 1st 1 we need to work within is our first person character blueprint. So find your content. First person, BP blueprints folder and double click on your first person character here and straight away . I want to add a new variable. So click on this plus variable button speed boost additive is what I am going to choose to name this variable. And I want this to be of the float type and I want to add a default value down here, so go ahead and compile, and I'm going to change this to B 600. Now it's worth mentioning. When we talked about player metrics, we selected this character movement component that comes by default on a first person character. And within here there is a parameter called Max Walk Speed. This is what determines how fast our character goes. And basically what I'm aiming to do is I want to add on to this max walk speed. I'm essentially going to double it with this speed boost additive when we shoot that speed Reus target. Okay, so with this variable created, come to your event graph and find some empty space again. There is some existing script in here, and I'm just gonna right click, and I'm going to add something called a custom event and just do a search for custom and you will see that option to add a custom event. And I am going to call this speed boost now, a custom event is one that you create, and the way that this gets called is you need to call it from either this blueprint or another blueprint, and we'll take care of that in just a moment. So with this event created, we're going to build some script off of it. First thing we want to do is bring in a reference to our character movement. Component, like so can just drag and drop that in your graph and out of this, I need to drag out a wire, and we want to get Max walk speed. And again, that was that, Max walk speed parameter I just showed you. And also, while we're here, I'm just going to drag out another wire from our character movement component in type in set, Max, walk speed. Gonna drag us into position like this. Okay, next thing I'm going to do is drag any reference to our speed boost additive. So just left click and drag this in and say we want to get this and then off of this, I'm going to drag out, aware and type in the plus symbol, and I'm gonna be searching for float plus float. And what I want to do is plug in our max walk speed into this so that we can add our characters current Max, walk speed, which is 600 As you can see right here I have that selected are Max Walk Speed by default is 600 I want to add our speed Bruce additive to it, which is also 600. And then I want to take the result of this and plug it as our new max walk speed. So we're essentially taking one, adding it to the other and updating our characters. Max, walk speed. So let's hook this in like that and I'll actually double click on this blue wire to bring in a little reroute. No, just for organizational purposes. And actually, when I'm going to do next is bring in a node called a re trigger herbal delay. And I'm gonna set this to be five seconds, and then I am going to drag another wire out of our character movement. Actually, what we need is a copy. Off are set max walk speed. So let's actually just select that control, see, to copy it controlled V to pace, and we'll hook it in like this. And our target here is actually going to be our character movement component. And I can drag aware off of this point right here to extend from our character movement component, and I'm gonna set this back to be 600. Why? 600? Because if you remember right, our characters movement, component the fault, Max, walk speed is 600. So essentially, what I'm doing here is I am saying, whenever this a speed boost event gets called, which is not currently I want to take our characters current Max walk speed which is 600 ad 600 to it to make it B 1200. And then with this retractable re trigger herbal delay of saying after five seconds, said it back to its default 600. Now you've seen me place delay nodes and this is a re trigger Roble delay. What's the difference? Well, we could have more than one of these speed boost targets out in our level. So as soon as we shoot a speed boost target, we're going to call this custom event to happen to trigger, at which point this five second delay is going to start ticking down. Think of this is a five second timer. Now let's say this timer gets down to one second and we shoot another speed boost target. What that is then going to do is it's going to reset this back to five seconds with a delay . No, that would not happen. A re trigger herbal delay. If you happen to re trigger this event again, it will set this delay back to its default in this case of five seconds. So again we shoot a target, we start our speed boost for five seconds and this is going to slowly take down. And if we shoot another speed boosts targets before this time expires. It's going to reset our timer back to five seconds here. All right, so with that done, let's just drag out a marquee selection. Left, click and drag tap that. See key, and we'll call this speed boost. And you know what? For the time being, let's output this value our max walk speed here to our viewpoint window. So I'm just gonna drag aware out of here and do a print string and plug the output of our max walks, be here into our in string here so that we can output that value to our gameplay window. I'm just gonna compile and save here and next. We need to take care of the other end of this, which is calling this custom event when we actually shoot a speed boost target. So what? That we're going to jump back to our level editor. Come under your blueprints. Actors folder in your first person project. And let's double click on our BP target plus speed target. Now, this is gonna be some functionality that is specific to this target. We don't want to put this in the parent target because this is going to be functionality that is shared amongst all targets. Things such as destroying the target. But this is going to be specific to the speed boost targets the double click on this guy. And again, if you see this view right here, you can just click right here to open up the full blueprint editor. And what do we want to do? Well, we want to do something. If we overlap this target collision right here with a first person projectiles to go ahead and right click on this at event on component begin overlap. And the thing we want to check that is overlapping. It is a first person projectile. So out of this other actor, type in cast to first person projectile and the first thing we want to do is drag out of this as first person projectile, and we will destroy the actor now. This should all be happening anyways, but it's still find added here in our speed boost target. And then what we are going to do is we're going to right click and we're going to get player character now. Explain why in just a moment, because off of our destroy actor, I'm going to drag aware off and do a cast to first person character. Now, up until this point, we have Onley really uses cast the first person character off of this, like un component begin overlap type node, in which case we could always just kind of plug in the other actor. Well, here we are casting to our first person character, meaning we want to talk to our first person character, but we need to plug in an object. It wants to know what kind of objects are you talking to? In this case? We want to talk to our player characters, So that's what this is for. Right clicking in getting our player character. We can plug this into our objects so we fulfill that requirement. Okay, once we are able to cast to our first person character, we can then call upon all the functionality in variables that are contained within this first person character, which is what we want to do now. Just remember in our first person character, and I'm just going to jump over blueprints here we created a custom event called Speed Boost. But nothing is calling for this event to trigger jumping back over to our target blueprint , our target speed up blueprint. Here we can drag aware out of our casting to the first person and simply type in speed boost and you can already see it says call function, speed boost. So this is actually going to call. This is a function that is going to call for this event, this custom event to fire off. Okay, it's very key right there and then, Lastly, let's drag aware off this, and I want to do a place sound to D. And I do have a sound effect here in mind that I want to play and it's going to be the are underscore Open open to you. This is just kind of a special sound effect to let us know that something kind of special happened, and I do want to actually expand and bring on some more advanced properties for this note. And I could do that by clicking this little down arrow. And I actually want to amp up the volume here by a factor of two. And then I can left click and drag out a marquee selection around this bit of script Tap that Seiki and I will call this boost speed if shot by pro jek tile, enter and let me just zoom in. Zoom in on this little bits. If you want to pause the video and see what this script is, you Congrats that remember this speed boost knows you're on Lee going to find if you drag out of the s first person character pin right here. That is a context sensitive find right there. So then I'm going to compile and save and moment of truth year. Ah, we want to play this, but firstly, we need to actually bring in a speed boost target. So let's bring one of these guys in. I'm just gonna rotate it around a little bit like so I will check is stand alone target. Because currently, that is our only way to spawn in these targets. And then I want to grab the trigger volume here in our components. And you can see I've got a highlighted And I'm just gonna move this down and just expanded out a little bit to make this easy for my character to overlap. Said it kind of back here sort of back where my other trigger volume is doesn't have be too perfect. And then I'm going to jump in and play and watch my speed movement and also look in the upper left hand corner of my window when I do get the speed boost. Because, remember, I'm using a print string note, actually, output my max. Ah, walk speed. So here we go. Play Cabinet of key Open tapping that fq open. All right, speed. Now watch. I am actually zoom, zoom, zoom and right along. Keep looking the upper left and you see that number 600 returning when I get back to normal speed. Now, I've got a little bit of a new era right here, so let's check this out. And this air right here is not at all surprising because this has to do with some of the things that I was talking about in the parent blueprint when I was talking about possible air messages that could appear. What this is saying is that it wants to kill off our first person projectile, but it's already being killed off in our target parents. So let me just bring on our target parent one more time and I'll explain what's going on here. Okay, so where we are destroying our projectile were saying When we shoot a target, we're casting to our first person projectile, and then we're destroying the first person projectile, right? Because this speed target is a child of this. This should already be happening when we destroy the target. So if I jump back over to our BP target speed, I don't actually need to run this at all this destroying of the first person projectile first person projectile at all because we're already doing that in the parent. So if I was to simply eliminated this right here and simply keep this hooked in a like So now if I compile and safe, I should be able to jump in a play. Shoot that target all over again, and I should not get that error message. So let's go ahead and try that. After open, left, open faster and you can see my speed is now set back to 600 let's exit out. And now no more warning. So that is an example the types of warnings that you may be getting if you're not being careful. So I'm glad that example came up one more time. Here is these script on our target speed boost and once again on our first person character . And actually, we don't need this print string anymore. Second, go ahead and get rid of that. That was just output. Are Max walk speed turning back to 600. So there you have it. I'm gonna compile and save one more time in each of these blueprints. Compile and save That is going to do it off for this one. Guys, we will see you win the next one
47. BP Scripting - Target Spawner #1 : welcome one. Welcome. All in this video we are going to be adding the script and variables for R B P targets Set Sponder, this guy within our blueprint Actors folder. Right now, we've currently got some targets that we can overlap a volume and they can spring up individually. But wouldn't it be nice if we could have a whole set of targets? 345 Spring up at about the same time? So that's what we're gonna accomplish in this one. So if you have already done so, go ahead and double click on your BP targets that spawned her to open it up and we're going Teoh, build some script first. And as we go along, we will build out the variables needed. So let's think about what we want to have happen here. If I click on over my view Port tab. We created this trigger volume and we want to make it so that when our character is overlapping this trigger volume, we spawned us up some targets at these given spawn target locations that I have indicated by these arrow components. OK, so that's our goal here and jumping over to our event graph the first thing we are going to do is right. Click on our trigger volume and we will add an event for on component Begin overlap. And we want to do something when it is our character overlapping. That's a drag out of the other actor and do a cast to first person character. And now this next note is important. We only want something to happen the very first time we overlap this trigger volumes to drag out of here and do a search for a do one snowed because we don't want targets to spring up. If they overlap it again and again, and then off of this, I am going to drag off a wire and bring in a sequence node, and there is this plus button to add a pin. I want to add three more of these I have over in my components panel specified spots for five targets to spawn up. And with this particular set, Sponder, I am going to specify five targets to spawn in. Now note that after we're done building this out, you can choose to have three targets want in 10 targets. 20 however many you want. I think it'll become pretty obvious on how to do that. Once we build out this initial set Sponder that's going to bring in five targets. Okay, so then off of our sequence. Note here, we're going to drag out a wire, and we're gonna do a search for a delay. Node. The idea here is is that once our first person character begins to overlap the trigger volume we're going to spawn in five targets 1234 and five. And I want to have a slight delay between them. Now, note that you could spawn them all in at the same time, but I want to build this to be a super flexible system and give you the designer as much flexibility as you want when setting these up in your level and you'll see that come to fruition here in just a moment. So what kind of delayed we want on this? Well, how about we say this out to a variable? What I can do here is drag out of this pin are actually not drag out. We can right click on this pin and do something called promote to variable. When we do this, we're going to add a variable to our components panel down here. And you can see that we've already got a float variable of this variable type that lime green equals float, variable hanging and plugged into our delay note. So I'm going to give this a name and I'm gonna call it targets Underscore. 01 underscore delay. How long do I want to delay before I spawn in target number one? Just gonna nestle that down here and something else I want to do is I want to click this button right here to get that eyeball the show to make this instance creditable. And again, if you'll remember. If I drag my BP targets set Sponder into my level, let me just drag and drop it in here. And I do want to rotate this around. I think I'm gonna put this way down here kind of at the bottom of this This river area I have fiddled with the overall, lay out some of my level, and I've essentially got this sort of river of sorts and a little downhill section castle. I'll drop it down somewhere in there, right, And notice that with that selected over in the details panel. Well, I first have to compile and save once I compile and save. Then over in the details panel. With that BP set Sponder selected, we now have access to set our target Old one delay right here in the level. Editor. Okay, so we're gonna have a little bit of a delay. What are we going to do after that delay? Well, we're going to drag out a wire and type in spawn actor from class. We want to spawn in some type of actor. And, Well, if I picked from this drop down here, I could say, hey, bring in BP Target 100. We could do that. However, I want to build this system as flexible as possible. So what I'm also going to do here is right Click on this purple pin. We're going to promote this to a variable, and I'm gonna call this targets underscore 01 And if I compile here and save, of course, it's gonna complain about a spawned transform which I do need to do. And I will fix that in just a moment here. But after I compile, I convince at a target default and you can set some defaults in here. In fact, why don't we just make it so that, um, by default we spawn in BP Target 100. Remember, Our variable type here is a class. It's an actor class blueprint. Remember, we created some BP targets from the blueprint actor class. So when we right click here to promote this to a variable, we created a new variable of the type actor. So we need to give this a spawned transform. And you remember that we created all these arrow components to specify locations where weaken spawned these in. So let's bring in spawn Target old one from our components panel. Just drag it in here, then drag aware off of this and type in get world location. Rather not world location. I want to get world transform. Transform is going to give us not Onley locational data but rotational data as well. Which is part of the reason coming over to my view port that I rotated these arrows to be facing toward the direction that I'm expecting our player to be entering into this trigger volume. That is good because when they enter in there, I want those targets to spring in that location and be facing the player. Okay, so this is just one target Now, the need thing is is that we can duplicate a lot of this code here and plug it into sequence. Then one, then two, then three, then four, etcetera. And all we got to do is swap out our variables. Now, I do want to make this target. 01 instance creditable as well. So let me just check this instance. Creditable box, which is the same thing is clicking on this eyeball down here is well and again, if I compile and save, come back into my level blueprint. Now I can see with that actor selected I can now customize this target Sponder to have the delay of my choosing and which target do I want. So now the rest of the system is pretty easy to build out. All I've got to do is duplicate all these variables several times. So let me just start with Target. 01 DeLay and I'm just going to right click duplicate. I'm gonna call this target 02 delay Right click duplicate target 03 delay. Right click duplicating target. Pull four delay and I'll try to make. This is fast as possibles. Duplicate charge, You know, five DeLay. And this is worth noting as well. You can move these variables around in your stack so I can put all the delays together by simply dragging him like, so it's kind of handy. Then I got my target. A one. Let's duplicate this several times. Now, you're not gonna be able to duplicate this one like this, So you know what? Because we need to duplicate this several times as well. This chunk of script, let me get this in the place. First, I'm gonna left click drag on a marquee selection I'm gonna control. See to copy this control V to paste once, twice, three times and four times. And you can hook in your then one to that one than to to this one, then three to this one and then four to this one. Now, what I need to do here is swap out some of the variables. Okay, so this is target. 01 which I'm gonna just left. Click drag out a marquee selection. Tamp that Seiki and just mark this as target one Here. This is gonna be target to, so I don't want the target. 01 delay. I want the target. Oh, to delay, which I can get by simply dragging and dropping. Like so instead of target old one. I'm gonna delete that right click right here. Promote this to a variable and call this Stargate Underscore 02 I'll set the defaults for these at the very end here. And I don't want spawned Target a one for my target. 02 I want spawned target location. Or rather, transform 02 left Click Drag Seiki. You know, call that target too. Just going to create a little bit more room here. This can get a little bit crowded for swapping out target. Oh, threes delay. I'm just going to show another technique that you can do here. You can right click on this guy and you can see in your right click menu You can replace with another like variable. We already have target 03 delay it created. So this is a possibility to swap out the variable like this. You can Onley do that if you have that variable already created Target old one. We don't want that one right. Click on this class. Promote to variable and I will call this target. Underscore 03 Swap out my spawn. Target no one with spawned Target three left Click Drag Seiki and we'll call this target three. Then let's come down to target four. I will. Right. Click on this delay. Replace with target. 04 Get rid of this target. Right. Click on this pin right here to promote to variable target. 04 not spawned. Target 01 but spawned. Target old four, Weaken, Drag and drop that Right on there. Left click Drag! Marquee Selection Seiki, Target four in the last one. Here. Right click. Replace with Target Old five. Delay not target No one, but rather right click Promote to variable target Underscore 05 And we want this to be at Spawn. Target 05 Let's left Click! Drag out a marquee selection Seiki and call this target five. Let's compile really quickly here, And I do want to set some default values for all these. So for Target. 01 delay. I do want this to be zero seconds. Just straight up. Zero seconds Target. Oh, to delay. I want to set this to be point to which it already is. Target. 03 I want this to be 30.4 2nd Delay. Target. 04 This is gonna be a 40.6 2nd delay. Target all five. This is going to be a 50.8 2nd delay. You may find some other values that you want for this. And the great thing is you're going to be able to customize is per blueprint target set Sponder. I just want this small delay between each target in my set that spawns up my target. 01 I do want this to set said to be target BP, target 100 target 02 I will set this to be the same for the time being. I'll set the defaults for all these to be that target old 100 points. I will make this instance edible, as I will with all the rest of these instance Edible target. 05 This will also be the 100 point targets and I will check that. Great. Let's compile and say this one more time
48. BP Scripting - Target Spawner #2: And then let's jump in and play and test the cell. So my, ah, set Sponder here is right around the bend. I don't care if I'm getting hurt, so I'm gonna overlap this trigger volume right down here. And you can see I've got some targets kind of spawning through walls, air and stuff. But there you go. You got a whole set of them spawning in at one time. Now they do have, I believe, 10 seconds before they disappear is what those 100 point targets are set to. Let me show you some of the cool things that you can do here. And I also need to point out one other thing. So with our target set Sponder in here, you can obviously fine tune each one of these tohave, which ever delay you want, which ever targets you want. Aiken said it to be I don't know, a 500 point target in slot number two. Here, Maybe a 1000 points are Get in. Slot number three. You get the idea, and it doesn't actually even have to be a target. Target number four. I could actually set to be a BP fan if I really wanted Teoh. I could spawn in a fan that way. And target number five just to be silly here. Gonna make that esteem jet? Sure, Nothing. You can set it to be none too, if you really don't want anything. So, BP fan. And now you can see some of my arrow locations here. The spots room right. Targets or ah, fans are going to be spawning in. Um, some of them are kind of clipping through the wall. So it can I move these around? Yes, you can. Under your details panel here. If you kind of pull back this portion of the details panel, you can actually select any one of your spawn target arrow components and move them around . So let's say I want to bring target. 01 right here and target or five. Let me bring that guy into view. Now, let's try this again and see what we got after open after open. And remember, we're gonna be spawning in a fan and esteem jet here as well. So 12345 There is a fan. There is my steam jets. Shoot, shoot! Shoot on! Just for the record, that fan. It will actually hurt me as well. So if you really want to create some wacky stuff in your level, you can go for it. Okay, Quick summary for you all here. So hopefully you can see how this whole system is constructed in our BP targets. Set Sponder again. We are making it so that when our first person characters overlapping that trigger volume, we are spawning an actor. That begs the question. How did these actually trigger to appear? Because wasn't that code for spawning in Or rather, you know, pulling that intro animation in our parent blueprint? I mean, right here. We are saying our target 01 is BP. Target 100. Well, let's bring both of those assets on. Here is our BP target parent. And here is our BP target 100. Now our BP target 100. I'm looking in the event graph. You can see that there is no other script in here other than these links. That automatically happened when we created a child of our parent that are basically calling upon our parents blueprint functionality toe happen. So any time we're saying Hey, spawn target, BP target 100 were basically saying. OK, BP, target 100. Who is your daddy in this case? It is BP Target Parent and NBP Target Parent. We have this event begin play, which will be called when our target is spawned. And here it is initially saying, Are you a standalone target? Well, let's see if he's a standalone target. Remember all of our child targets that we created, such as BP. Target 100. If you check in the class defaults right here. It is not set to be a standalone target. And even in our BP target parents, where we created that is stand alone target variable. We specified that by default any Children that inherit form our parent target that is going to be false. So here in the BP, target parent, once a target as respond, it doesn't matter if it's 100.500 point 1000 point etcetera were saying Is it a standalone target? No. In our case, it means it is part of a set spawn er and then we spawn the target with this bit of script down here. So hopefully that makes some sense that will do it all for this one. Guys, we will see you in the next one
49. Widget Blueprint Overview: Welcome back, everybody. In this series of videos we're going to set out to create our HUD and some menu screens. We're not gonna make them fully functional yet. Just simply create some layouts for a HUD and Semenya screens. And that means we need to turn our attention to something called widget Blueprints inside of unrelenting. For now, the goal of this initial video is just to give you an idea of what widget blueprints are, what they're used for and to give you a brief overview of the different areas of the widget blueprint interface. So with that, let's come under a new folder. By that I mean our content First project You I folder, which is currently empty and right. Click in some empty space and in your right click menu you want to find the user interface option. It is usually at the very bottom here and in your fly all menu. You confined that widget blueprint asset type that I was just talking about. Let's name this W b p short for widget blueprint Underscore overview Double click on this guy, Doc, come across the top and let's see what we've got. Firstly, I'd like to point out the two tabs over in the right hand portion of our interface. We've got a designer tab, which we are currently on, as well as a graph tab, which we will explore in just a moment here. The designer tab. This is where you can lay out in interface such as your HUD or menu screens, and the bounds in which this is done within is currently indicated by either this dash line right here or, if I'm within those bounds, that blue line the graph tab. This is where any scripting elements take place for your menu screen or your HUD things such as What Well, may be over in your designer tab. You know you're creating a main menu and you've got a start button. Well, something is meant to happen. If you click on that start button, right that functionality that script Liz over in the graph tab. Let's quickly discuss how we can navigate our way around the designer tab here. Firstly, your scroll wheel will zoom you in and out of your view here, right mouse button will pan your view around. Left mouse button will select widgets to move them around your intended screen size here. We'll talk about screen sizes in just a moment to help demonstrate this. I'm gonna bring on a widget over here from my palate panel this over here, the palate panels where you can find all your widgets and I'm gonna bring on a common one by left clicking and dragging in a button, and you can see how I can simply just left, click on it and move it around as I see fit, wherever I want it to go on to my screen. Other things to know here is up in the upper right hand portion of your view port. You can set your intended screen size by default. We are set to a screen size of 12 80 by 7 20 That is 16 by nine, as indicated right down here in the lower left. However, we all know games are made for different platforms. You can choose your intended screen size here to be an apple iPhone, a tablet of sorts, a laptop, a monitor, any of these different television dimensions as well, so that when you're laying out your screen or your HUD, you are actually designing it for the actual dimensions of that target platform that is super handy to know about. Another good button to know about up here is this. Zoom to fit button. If you ever find yourself where you're just like man, I just want to get back front and center and have that whole screen and view. You can just click on this, and that will just bring you right back front and center. I like that one a lot. You also have some snap settings here for when you are moving widgets around your layout. Here. Currently, I have this button placed on what is known as my canvas panel, and it is add to this position of X 8 48 and position why of 6 12 Notice that if I was to move it right or left, it is moving in increments of four. Look carefully at this position X button right over there, and the reason it's moving in increments of four is because up here I have it set to move in increments of 44 To me is a weird number. I prefer either 5 10 or one, so if you want to move it in increments of 10 said it to be 10 right there and then when you're moving it left or right by simply using those arrow keys, it will move it in increments of 10. Of course, you can just punch in some values over here as well, and that will set it as well. So as you saw me do earlier, I currently have a button widget out here in my canvas panel. Other ones that I really like are the text widget. That is this guy right here. This allows you to put some text out onto your screen. Um, the image which it's super useful. You can have this fill up your whole screen and I know this is just a white box right now, but over in the details panel, you can actually slot in a background image of sorts. If you want image of a character, you can make it actually pretty And not this white box Progress bar. This is super useful for things such as meters again. This just looks like a gray box, but it actually can fill up like so to indicate things like health. We will be using that later. Ah, horizontal box and I always have trouble finding this. You can search for it up here. Horizontal box. This is a container of sorts. And what you can do with this particular widget which looks empty, is you can drop things inside of it, such as text. You can drop one minute text in here and another bit of Texan here. And you could have one of these reads something like Score and the other one of these to read whatever your score value is and these can be driven by variables. So there is a horizontal widget, which is a great for formatting container of sorts. And of course, if there is a horizontal box, there is also a vertical box and I will search for that appear in my palette tab. And this would function very similar to the horizontal box on Lee. Instead of, say, my text year, going left toe left to right, it would go up and down, and it doesn't have to be text. It could be a button. And then it could be some texts. And then it could be an image. Just a way to organize your widgets. Now, if you were paying really close attention while I was dragging these widgets from my palate onto my canvas panel here. I've also been populating something known as my hierarchy tab over on the left hand side here and this shows the relationship of all the widgets to one another. And you can see here with something like my horizontal box. I've got things contained with inside of it, such as a couple of these text widgets. Let me just delete all these out really quick by selecting them and deleting him to show you a few things related to the hierarchy over here. Now you've seen me May get so that I was simply can drag and drop a button on to my canvas panel area right here. And you can see that button populates down here in the hierarchy. But I can also do this right. Just simply drag and drop my button directly down into my hierarchy. Now, all things get added to this thing known as a canvas panel, which is kind of like your blank background here. And so now you can see I've got a button option here and it's just got this weird default name. I can name it something like my button, etcetera. But I can also put something inside of its right. So I'm just gonna make my buttons super being here. I mean, a dragon. Drop this text widget on top. You see how there's that yellow outline around the my button widget on top of it like this . And so now my text block is attached to my button. So with this text block widget, Aiken simply come over the details panel, change the text, this text right here to say my button like so maybe I'll change that to I don't know, a black color to make it a little bit more legible. Like so. And so now if I move my button around the text comes along with it because that text is attached. Now, if I want to detach that text, all I would need to do here is in the hierarchy. I could select my button, the text you can see how it's highlighted here is well left, click and drag it back on top of my button like so and that will just annoy attach it like that. Now you can lock in unlock objects as well. So if I lock my button here. That is this guy. Now I just made it, so I cannot select it, nor can I move it around. And also, I've got this little eyeball icon which, if I toggle that off, it'll just make that particular widget unsuitable. There are uses for that in scripting as well, where maybe you want to hide a button. And then when a player does something useful through scripting, you can reveal that button. Note that all these different widgets when you select them And I just got a un select or unlock my my button here any time you've got a given widgets selected, there are some details associated with it. And what are the most important details associated with a lot of these different widgets is something called the anchor. So let me just draw your attention to that very quickly. If I click this anchor button drop down right here, it shows where I can quote unquote anchor a given widget to various parts of the screen. I'm just gonna choose this middle option right now. And so now these positional X and Y coordinates are going to be relative to this anchor. The sort of flower looking icon. That is my anchor point for this widget. So if I set my position X to be zero in my position, why I to be zero? You can see that the upper left hand portion of my button here, which I'll just resize, is sets to be right smack dab in the middle of my canvas panel. It is anchored to that section, so note that upper left of that particular widget with my anchor in the middle that is position X of zero position. Why of zero? Now note my alignment settings here is currently also X of zero. And why it? Zero? If I said X to be 0.5, that's basically splitting that in half right there, basically saying go halfway as well as why being 0.5 that is going to move it to the true center of my screen. There are certain types of widgets that you will find over in your palate panel. Here. Progress Bar is one of them. Let me just bring one of those guys in that will have ISS section within the details panel a little button, if you will, that it will allow you to bind something to it. What does that mean? Well, you can bind certain variable certain pieces of information about your game two widgets to make it behave in a certain way. For example, we've got this progress Bar progress Bars are often meant to indicate things like health experience, points, etcetera. On our character, we have a health percent value. Well, with this particular progress bar, we could create a binding over here in the details panel to talk to our characters Health percentage variable in order to drive how full this progress bar should be. All right, Note that with a lot of different widgets over here, the left hand side to you can also animate various aspects of them. For example, we've got this button. We could slide this in from the left. We could slide it in from the right. We could have it start out at an infinitely small size and scale it up. We could twirl it around. We could do all kinds of fun things. We could make some text flicker, that kind of thing. How do you do that in widget blueprints? Well, there's a whole area called animations down here. That's got a timeline where you can do some of that kind of stuff. Now, that's gonna be a little bit outside of the scope of this class. I've got other classes that teach how to do this kind of stuff, but I just wanted to make that known right now that you can animate certain aspects of your widgets. Okay. Lastly, before we wrap this discussion up, I just want to jump on over to the graph tab really quickly. Again, this is going to seem very familiar with all the blueprints that we've created over here along the left hand side, you've gotten area where you can create some variables. There's an area where you can create some functions all the same sorts of things that you could find when we were working with our blueprints. Anyways, that is going to do it all for this one. Guys, I just wanted to talk about what widget blueprints are and give a quick overview of the interface. I don't actually want to keep this asset, so I'm gonna jump back to my level 01 here and in my content First project view, I folder. I'm just going to selected this particular asset and delete it out, we will say yes, forced to lead it and guys, that is going to do it all for this one. In our next few videos, we are actually going to go about creating some useful which it blueprints are HUD, and some screens will see their.
50. Layout - HUD: Welcome back, everyone, into this video we are going to create the layout for our in game heads up display or HUD for short. We're not gonna worry about any of the functionality that we're gonna have on our hut Eventually, things such as a timer and score and health that kind of thing. We're just going to get the widgets into place and worry about the functionality later. So without out of the way, come under your content. First project, you I folder, right click in some empty space, come under user interface, and we want to create a new widget blueprint. We will name this guy W B p for widget blueprint underscore H u D Hud. And then let's double click on this guy to open him up. So if you remember from our earlier video, we talked about a canvas panel a little bit, The canvas panel comes in by default. There is one included with all widget blueprints, and all of our widgets are attached to this canvas panel. So again, there are two ways to add widgets to our canvas panel. We can simply drag and drop from our palate onto this visual out or we can simply drag and drop them from our palate up here, down into our hierarchy. For speed sake, I'm going to simply just drop them from our palate onto our hierarchy. So these are the widgets that we want for this one? Firstly, we want a vertical box, and I'm going to do a search for it up in the town Vertical box. There it is. And I'm going to drag and drop it on top of our canvas panel. And then I'm gonna select it here, and I'm gonna hit F two so I can rename it, and I'm gonna call this our score. Underscore Box. This is what is going to hold our score information. So step number one here is I'm just gonna get all the widgets in place that we need. And then we are going to go back through and set the details for all those. Okay, so in this vertical score box, I want to have to text widgets, not text box, but text widgets. So drag and drop a text widget onto your score box right here. So it is contained within their and I'm gonna rename this one to score underscore text that I'm going to drag another one on top of our score box. And this one is going to be called hitting two on it. Score, Underscore value. So one of these is going to actually read the word score, and the other one's going to print out whatever our score value is. Okay, So with that in place, what we can do is take a little shortcut here. If I can take our score box right here, I'm gonna right click on that. I'm gonna copy it that I'm gonna select my canvas panel and I'm going to right click on this and paste it. And the reason being is because I wanted another vertical box here with two text widgets within it. Only this one I'm going to name, time, underscore Box. And then beneath that, gonna rename that one time underscore text rename this one time underscore value and that'll do just find their next. I am going to bring on a text widget, and I'm gonna attach this straight away to my canvas panel like so. And I'm gonna call this one health underscore text and then last but not least, we got one more. I'm going to take this Progress Bar and drag this on to our canvas panel, and I will call this health underscore Progress Bar. So we've got all the widgets added that we want added, but you can see they're all clustered in the upper left hand portion of our layout here. So let's set some details for all these and I will start with our score box right here with that selected. The first thing I want to do is I want to make sure that I have this anchored to the upper left hand portion of my screen layout, and it is by default. Next, I want to set the position of my score box, and I have some values in mind. I'm gonna set position X to be 50 position. Why? To be 20. And then I actually want to size my score box. You can see there's this green outline indicating my current score box. I'm gonna set the size X to be 2 50 and the size y to be 100. And if you're wondering how I came up with those values, it was some trial and error off camera. Okay, Next I'm going to select our score. Underscore text text blocks and next one down and in the details panel. I'm going to set the horizontal alignment to be right in the middle. And you can see it moves this word text block right into the middle and then down below where it says I can put in my text. I want to change this from text block to simply score. So now you can see that it reads score. Okay, there are some other parameters that I want to set for this. So coming under the appearance section come under this font drop down. I do want the font type to be roboto right there. Typeface, Bold size. I'm gonna go 20 a little bit smaller, and I do want to add some ah, shadows settings for this. Let's add some shadow setting. So shadow offset. Here we will set to be three in three and you won't see anything just yet. Let me zoom up in on it. And that's because for a shadow color, the album of value, which is ah, how strongly we can see this one means it's opaque. Zero means it is completely see through. I need to change this. A value under shadow color to be one. And you can see now it has a black shadow. And you can change the color of that shadow right here by clicking on this bar and choosing something from your color picker. I'm gonna leave mine at black, though. Okay? So next I'm gonna slick my score value. Let's change the parameters with this. I'm also going to change the horizontal alignment for this to be in the middle. The text. I am actually going to bind this to a variable later on. But for now, I'm just gonna put in a placeholder value of a bunch of nines just to make it clear that that is going to be some sort of a score value and then coming down under the appearance section, I've got some settings I want to set. Ah, font family is gonna be fine size. We're gonna make this be 30. I will also have the shadow offset B three in the X and three in the why you can fiddle with those as you see fit. And of course, I need to make sure the shadow color here has the a value the alfalfa value set toe ones. You can actually see that shadowing. So you can see if you if you move the X to, say negative three, it'll just swap that shadow to the other side. So feel free to fiddle with those values as you see fit. Okay, I'm pretty happy with that for the time being. Now I'm gonna select my time box over here and set some values associated with that. First thing I want to do is I want to set its anchor points. So with that selected come up into the details panel and under the anchors, let's choose the upper right box, That one right there. And now you see that that anchor icon is in the upper right hand portion of the screen. So now I'm going to set some X and Y values. I'm going to set the exposition here to be negative 50 and the u Y position to be 20 like so And then I'm gonna set Ah, just fiddling with the alignment a little bit more. I'm gonna set my alarm. Actually, before I set my alignment, let me just set my position x here to be zero and zero for the X and the Y. So you can see this is my time box in the upper left hand portion of my time box is basically at position X zero and Y zero with my anchor point being in the upper right hand portion of the screen. So this position X and position, why is relative to whatever your anchor point is? Okay, so my position X here, I will set it to what I actually wanted to Bees. Negative 50 and position. Why? Which is the up and down coordinates of this gonna set it down to 20. The alignment right here. I'm gonna set my ex to be one that's gonna nudge it more over this way. And for the size. I want this to be the same size as my other one. So 2 50 in the X and 100 in the why and you could see how that changes the size of my green vertical box here. Okay, so next let's come under our time text widget Got some values to setting here. Firstly, we are going to set this to have horizontal alignment. The text we will change to read simply time I will change In the appearance section, the font size to be 20 shadow offset. I will set to be three and three. I need to make that Alfa value under shadow color be one as well and that one's going to be good. Then I will come under a time of value. As you may expect, we're going to make sure that the horizontal alignment for this is going to be centered. Ah, here too. I'm just gonna give it a dummy value for the text field. So 9999999 to indicate that that's gonna be some sort of number again. We will bind this to a variable later on Sighs here, I'm gonna set to be 30. Shadow off Said is gonna be three and three. And of course, in order to see that shadow I need to change his shadow Color Alfa value to be one like so last but not least, we got these health widgets so you can see where these things are gonna be positioned in our screen. Select your health text. The anchor point for this one is going to be this upper middle box one. So make sure that that is your anchor point right there in for a position X. I'm gonna set that to be zero, and you can see where it jumps That whole text block over the position. Why will be 60? Move that down a little bit Size X. I'm gonna change to be Oh, sorry. That is the wrong. That is not the size that I want or the position that I want. The actual text to be the text, the text. I want to be positioned X of zero position. Why of 10 and then the alignments year in the X. I want to be halfway to the left. So 0.5 to nudge that over, I'm going to change this size to be size to content. And I'm gonna change the Z order here to be one. So what is Z order it. Whereas my, uh, students like to say is order. You can have widgets stacked on top of each other. And so as a tool, tip says higher values are rendered last, so they will appear to be on top. So if you've got more than one widgets overlapping one another, you can choose which one is on top in that stack by setting a Z order value. And I want this one to be one because I'm gonna have the progress bar slightly under beneath it can. Now I need to change his text block to say, Let's go, health. I will change the text size here to be 25. Let's do We've been doing some shadowing. Let's do some outline settings. You got a click this little drop down arrow right here. Let's do outline signs of five just for something different and you can see what that does is it puts like a little outline around your text and you can change your outline color as you see fit. I am going to keep mine at black. Last but not least, we got our health progress bar Select that widget. And like we did with our health text, we're gonna change the anchor for this one to be this upper mill box like so the position X , we're going to leave at zero. Change that to zero. The position why we're going to change to be 60. And I'm gonna zoom on out here a little bit the size X. I want this to be a pretty big meters. I'm gonna change it to be 700 the size. Why? I'm gonna change to be 20 something a little bit thinner. And the alignment in the ex Im going to change to be 0.5 so that the halfway point is centered perfectly on my screen, like so. Now see, this health text right here actually did set the Z order to be one. It's not actually overlapping my meters, so that wasn't really necessary for me to do. But just just as a quick example, let me just like my health progress bar here. And I'm actually going to fiddle with the wide position, moving that up and down so he could see how the Z order of that health is actually on top of the order of my health progress bar. Because my Progress bar has a Z order of zero in my health text. Right there has a Z or of one. So just know that that is something that you can do as well. I'm gonna set my position here back to 60. Okay, So with that, let's compile and save and let's fit this all interview. Zoom to fit, and you can see roughly what our hut is going to look like. We've got some score. We got some health, and we got some time. And a lot of these, like our numerical values here. And our health bar here will be driven or bound, rather bison variables. That is going to do it off for this one. Guys, we will see you win the next one.
51. Layout - Start Menu: Welcome back, everyone in this video, we're going to be creating the layout for our start menu. So from our start menu, we want to be able to select a level and launch a game. So we're just gonna be getting the layout for that into place before we do. There is one little bit I forgot to do in our last video, which was our BP huts are Want to make sure we circle back to this before we do our start menu. Select your health Progress Bar. And there were a few things I forgot to set on this. Firstly, let's come under our style section Right down here. Click this little drop down menu. I want to set a background image for this and not really a background image, Rather a background color. So I want the tent of this to be straight black. Okay? And you can set that to be RGB value of zero to to get straight black. Okay, then if you scroll down a little bit further, there is an area called progress changes to be one point over the time being, and you can see right now we've got this blue color oration in there. Ah, we want the bar type the Barfield type to be left to right like it currently is. You can see how that will fill up or rather, deplete as we lose some health. I'm gonna change my fill color here, though from blue. I'm gonna change it to be green. So I'm just gonna building a hard value. Here are zero g is going to be one b is going to be zero. And that color green is going to represent our health. So sorry I missed that. Guys, with that. Make sure you compile and save that. Now you can close out your B p, your WPP, hud, and now we are ready to create our start menu. So first things first here in our content. First project You I folder, right Click, come under user interface widget blueprint. We will call this W b p underscores start menu and then double click on him to open him up . And we'll do like we did before, where we get all our widgets into place, and then we will set their details. So first thing I'm gonna add down here to our hierarchy is going to be an image left, click and drag this on top of your canvas panel and I'm simply going to click on it, hit F two and call this background underscore image. Next, I'm going to find a text widget and I'm gonna drag and drop this onto the canvas panel hit F two on it and call this title Underscore text. Next, I am going to drag and drop a button down onto our canvas panel and I will call this level underscore 01 underscore button. We're gonna build out our main menu here. So our start menu so that you can choose level one to play after we're finished with this entire project. It should be entirely simple for you to come back and with knowledge gained at a level to a level three, etcetera Onley, we're just going to start off with one level to click on and play. And then on this button, I want to add some text. So, Dragon, drop this text widget on top of the button, like so and hit up to on this guy and we will call it level underscore 01 underscore texts . All right, so with that, I'm gonna click this a zoom to fit button. And now let's set the details for all these. So let's start off with our background image and for the anchor here, I'm going to choose this full screen option, and you're gonna see this little flower icon indicating our anchor kind of split apart. So there's Ah, corner at each corner. Okay, Next, What I'm gonna do is I'm gonna set my offset, offset right in bottom here to be zero and zero. What this essentially does is it makes it so that we can have an image that fills up our entire screen. Now, this is where you can get really creative. If you were to import some images of your own, they could be J. Paige files. They could be PNG files, etcetera. You could then place them into this portion of your background image widget to slot in an actual image. Maybe you've got some characters in mind you've got, like, a nice scenic image. You want that sort of thing? I'm not gonna do that here, but I just wanted to point out where you could do that. Instead, I'm just gonna leave a solid color as my background quote unquote image and I'm gonna change is to be a straight color of Let's go, blacks. I'm gonna do my tent here. We'll do straight black like my soul. And that would be kind of good. Okay, Next, let's choose our text widget. Here we will change the text here to read the gallery, because this is gonna be a shooting gallery style of game. I didn't know what else to call it. The galleries just fine. Um, I do want to set the anchor for this one to be this top bar like this. And now, if I set the offset left here to be zero position y zero offset right to also be zero and for the size. Why? I'm just gonna change this to B zero as well. This is not going to matter because I'm going to click this size to content box. And what this will do is depending on the size of the content, the size of the contents for this widget, a k a. The size that I set my font type that is going to determine how big this widget needs to be . So I want this text to be fairly large since this is the title of our screen. So I'm gonna set the size to be 1 75 like that. And what else am I gonna keep? Um, the font family is gonna be fine. Let's do outline settings. Sure. I am going to change my online settings to be eight here, and the outline color I'm actually going to leave is black. And you may be saying, Hey, that's black on black. You can't even see the outline settings. You are correct on that. You cannot see the outline settings, but I'm doing this on purpose because eventually I am going to duplicate this actual widget blueprint, and I will want that outline setting. So go ahead and said it here to be outlined setting of eight and make it black. And, of course, let's make sure that ah, outline color is black. That's all good. Let's actually do a shadow offset Here is Well, I'm gonna set this to be eight in the X and eight in the Why Shadow color. Make sure that the Alfa value is one. And again, of course, you cannot see it with his black background. But this is to come later. And then for the justification for this. Let's set this to be the middle. So that text right there looks all nice and neat. Next, let's select your level. 01 button and set some parameters for this guy. So the anchor for this I want to be Let's go. This middle box. We're gonna put this somewhere in the middle of the screen here, so position X. I want to be zero position. Why? I want to be 200. The Sorry. I got that anchor wrong, didn't I? Wanted that to be the very true middle of screen. Not the top middle of the true middle. So let me try that again. Position X zero position. Why 200? Somewhere down there, the size X. I'm gonna set to be 400 and the size. Why 1 50 Next. I want to set her up this button just a little bit. So with my alignment settings here, 0.5 equals halfway depending on your positional settings. I'm gonna set my ex year to be 0.5 in my wide to be 0.5 as well. Something like that in the middle. Now for the style I do have some style settings. Um, that Ah, I do want to set for this. Mainly I got some sounds and stuff I need to slot in, but note that there's a whole bunch of things that you can set for this. You can set a button style, depending on if the button is in a normal phase. Basically, you're just looking at it. You can set a certain color or look to it. You can slot in an image for it. You can set what your buttons going to look like. If you're hovering over it, as in your mouse is hovering over it. You can slot in a color or an image. You can also set what your button looks like. If you press your button, that is, we click on it. So here, too, you can put in a color of the button or simply put in an image. I want to come down here a little bit, and I want to slot in a pressed sound and a hovered sound. So this is a really simple place to slot in some sound effects for interacting with this button, and I do have a couple in mind for this press sound. I'm going to do a search for click on button Que And for the hovered sound I'm going to search for camera Shutter That wave file right there. Okay, next. Last but not least, here. I want to select my button here for the text block. I am going to, Let's see are patting settings. I'm all well and good with that. But I do want to change our text here to simply read level one and under the appearance section, I want to change the color of that text to be a little bit more legible. I'm gonna go straight black for that. You feel free to put what you want. And I do want to change the size of this to be something a lot bigger. Let's try 75. That looks pretty good in the outline settings. I will set that to be seven. Sure. No, no, let's not do that. That's obviously going to look bad. Yeah, let's not do that. We'll just leave. It is without any outline setting, I could set an outline than given another color. I'm just gonna leave it nice and simple like that. So with that Let's compile and save. And now we have a start menu layout. Now, you could have gotten a lot more fancy with it than I have. I've only got one button that we're going to click to launch one level, but you can look to add a lot of images back here. You can look to eventually ADM or than one level button to interact with that sort of thing . Anyways, that is going to do it all for this one. Guys, we will see you win the next one.
52. Layout - Level Complete Menu: Welcome back, everyone. In this video, we will be creating the layout for a level complete menu from our level complete menu. We want to be able to quit or restart the game, and this is meant to appear when a user complete a level. So unlike our start menu, where we are just going to have one button to click on, our level, complete menu is going to have to buttons to click on. Now. We've already created this W B P start menu, and I'm gonna use this as a little bit of a shortcut for creating our level complete menu. So let's just do this. Let's right. Click on our START menu and choose to duplicate this, and I will simply call this W B P level complete menu, and then I'll double click on this guy to open him up. Now we are going to want some different widgets for this, but we can kind of recycle some of the ones that already existing in here. Let me just frame this up by clicking this zoom to fit button. So we already have this text title here. I do want that I actually do not want a background image for this. I'm going to select that and delete that out. Hit that delete key and this level button right here. We can repurpose that. So let's keep that one around as well. Okay, One widget I do want to add is gonna be called a background blur. So in your palate panel, we're going to type in the word blur. And you're gonna find this special effect here for background blur. Let's go ahead and drag that into our hierarchy onto our canvas panel. Actually, I like this one kind of at the top, so I'm gonna put it in right there is where I want to insert it. So it's gonna be attached to my canvas panel. But right down there, OK? And again, I'm gonna place all my widgets first and then worry about its details afterward. Okay, so we got a background blur. We have our text title. We've got a button here which I am going to rename this one for this screen. So click on this do f two. I'm going to call this the quit underscore button, and then I'm going to rename the text below. It's so hitting f two on this. I'm going to call this quit underscore text. Okay, so with this bud created, I'm going to right click on this. I am going to duplicate it and then I'm going to Well, actually, by duplicating instead of copying and pasting, you can see it already created that button with text right below it. So you can copy and paste it, or you can duplicate it, so duplicating it will save you. Step. Let me just hit F two right here to rename this. I'm gonna call this my restart Underscore button. And then right below that hit F two restart, underscore text, then the next, which it I want to add. And I will come under my palate section. I am also going to search for it is going to be called a uniform grid panel. I'm going to drag and drop this on top of the canvas panel is Well, so what this is gonna enable me to do is it's going to enable me to add a bunch of widgets to it, to lay out my level complete ah, menu in such a way where I'm gonna be printing off things like your time bonus score Your how many points you got for shooting the targets and then a final score. And this uniform grid panel allows me to lay out those different text widgets in a nice, neat and orderly fashion. So that's why I'm gonna be bringing this one in. Okay, Underneath this uniform grid panel, I want to place a whole bunch of text, which is so left click drag in a text widget on top of the uniformed grid panel. Like so, rename this targets underscore texts. Dragon, drop another one on top of the uniformed grid panel. If to target, underscore value another one dragon drop F two time underscore text another one two time underscore value drag and drop another one F two score Underscore text and drag and drop one mawr F to score Underscore value. All right, that was simple enough. Now let's set some details for each of these widgets, and I will start off with our background blur. Go heads like that guy under the anchors section. Let's give this a full screen anchor. Kind of like what we did with our background image, and we will zero out all the offset so it will fill up the entire screen and then down below in the appearance section, set this blur strength to be a value of five. So unlike our start menu that had a black background, this one is going to appear while we are in our level in when this level complete menu pops up, you're going to see your level in your background yet. But this background blur is going to just make it a little bit blurry, so the focus will be on your level. Complete menu. All right. Next, select your text title. We obviously do not want this to read the gallery. So change the text over here to be Let's go with level completes exclamation point, Something like that. And you remember earlier we set some shadowing in an outline around it that we could not see in our start menu. That's why we did it in our start menu. So that here, when we duplicated that widget blueprint that this step is already done for us. Kind of nice. Okay, let's see. Next widget we got is our button quits. Let me zoom to fit here. But quit has the correct anchor. As for settings, were gonna want to move this on over a little bit because we got two buttons on the screen instead of one. So let's change the position X here to be negative. 400 the position Why? Let's change that to be 400 as well, because we're gonna need to make some room for a uniform grid panel of right in the middle of the screen. Ah, size exercise. Why is fine as our alignment settings? One thing I do want to change is the text on this, um, but before I do that, let's make sure all the other settings here looking good and they should be Okay. So next select your quit text widget. And obviously we do not want this to say level one. Let's just simply have it say Quit simple change there. Okay, Next, let's go on to our restart buttons like that guy. It has the anchor that we want. As for our position X, let's go position X of 400 position. Why of 400 as well. Size is fine. However, we do want to change the text on this, so select your restart text widget and we will change the text to simply be restart. That will restart her game. Okay, Next, we are going to deal with our uniform grid panel. Select that guy the anchor for this one Since it's going to be in the middle of our screen here kind of giving us a score breakdown. Let's set that to be this middle middle box one for the position X, let's go zero position. Why? We will set that to be 25 size X is I'm gonna set that to be zero, and I'm also going to set the size. Why? To be zero. And the reason I'm going to be doing that is because I am going to let this be dynamically size according to the contents that fill it. So I'm gonna check this size to content, and then I'll make it so it'll give us the size that we want when it fills up with all these other values. Um, one thing I do want to change those my alignment here. I want the X to be 10.5 and the why to be 0.5 as well. So that is centered nicely on our screen in, down, below in our child lay out. I need to set a couple more things we've got this minimum desired slot with in this minimum desired slot height. This is something for organizational purposes that's going to make it so that our text and are is going to be, Ah, let's say space out appropriately. So I'm gonna set this to be 100 and this to be 100 and you're not going to see two months yet in the way of what that does. But trust me, what it will do is it will make it so. All for texts is quite nicely spaced. Select your target text widget next, and for this we are going to keep our horizontal alignment at left aligned, but are vertical alignment. We want to choose this. Align center options to make sure you got those set appropriately. I do want this in a row. Zero column zero Because this is a uniformed grid panel. I get to specify what row or column I wanted to be in, and the text I will choose here is going to be target points like, so I will change the font size to be 30 font colors as white, that is totally fine. We'll add some outline here. Let's go. Outline size of six, perhaps outline color black. That is all well and good can. Excellent. Let's go. With target value now coming under its details panel, I want to make sure that the horizontal alignment for this is going to be right. The vertical alignment is going to be center. But now watch this. I'm gonna set my row to be zero. That is the top most row, starting with the number zero and the column. I want to set to be one so you can see how that nudges this over. So uniformed grid panel again. You kind of see this. This icon here representing a lot of different boxes, you get to specify how many rows or columns you want. And so, for this target points, I set this to be in Row zero, column zero and for the target value. I set this to be in rose zero, the top most row and column one, which is essentially one column. Or if I set this to be like column, too, you could see how I could widen that out even more. But having just two columns, one for the Texan. One for the value is going to be just fine. Now I'm going to set a dummy value for the text here to be 9999999 Eventually, this will be bound to a variable which will determine the true value here. Um, with that let's see the size of this. I will let that be the default size for now. Maybe I'll change that a little later. But let's go with that for the time being. Um, no, actually, let's change it to be ah, size of 30. And let's do outline was are outlined. Size for the target six. So let's change the outline size for this to be six as well. Okay, time text. We're just rolling right along here. We want to set this to be left or horizontal alignment to be left aligned. Vertical alignment to be in the middle. Um, we want to set this to be row one, which is one road down. I mean, it's change the text year to, say time bonus. Gonna get some bonus points based on how quickly they finish the level. Change the size of the fund here to 30 the outline signs. Let's go. Was that five or six? I was setting it to you was six. I will go six here as well. Okay, time value. You can kind of see how this is all working out here. Going to set this to be a horizontal alignment of to the right vertical alignment in the middle. We want this to be row one column one here too. I will set the text to be some dummy value of none n and nine size of 30. Outline size of six. Now what I could've done to save myself some time, years I couldn't just created to these had all the settings, all the details good to go and then copied and pasted them so I wouldn't have to be setting these for each and every one of these. So Ah, that is an efficiency tip to know about. Then finally we got some score text. Let's select this guy. I'm gonna set the horizontal alignment for this to be along the left hand side. The vertical alignments in the middle row. I'm going to set this to be row three. No way I could have gone road to but I kind of want to leave a little space here because this is kind of going to be Mike. My score summary. So, text year, I'm gonna have be final. I won't capitalize it. Final score like that, I will change the font size here to be bigger. So I'm gonna go 50 with that, the outline size. I'll still keep it six like that. Everything else there is looking good, then for our score value. I'm simply going to change this to B, right? Justified in the middle wro What is that? 123 and column number two. Sorry Column number one, not number 21 of my thinking. The text here will be some dummy value of a bunch of nines the size I will set this to be fifties. Well, and something like that should do us just fine. So with that, we've got a level complete menu. So let's go ahead and compile and save and guys that is going to do it all for this one. We will see you win the next video
53. Layout - Game Over Menu: welcome back again and everyone in this one. We will be creating the layout for our game over menu from our game over menu. We want to be able to quit or restart the game, and this is meant to appear when our game timer runs out. Now we are gonna be implementing a basic health system, and our player will be able to die if they incur too much damage from spinning fans or or jets, that kind of thing, those steam jets that can damage us. And if that happens, we're going to be spawning them back at the beginning of the level. The only way that the player is going to quote unquote lose at this game to get the game over menu is if the timer runs out. Okay, we have done a lot of work needed for this menu. In our previous video are level complete menu. So this one is gonna be really simple. All we need to do is come under R. U Y folder. Let's right click on her level complete menu and let's duplicate this And let's just call this W B p underscore game over menu now because it's game over Double click on this guy to open up because it's going to be game over. I'm gonna zoom to fit here. We do not need any sort of scoring summary. The player failed so we can select this uniform grid panel and just delete that out. Go. Bye bye. Note that we've already got quit and restart button down here. So that is all well and good. The Onley thing we need to change your is the title of our screens to go ahead and select on your text title widget. And instead of it being a level complete, we can just have this read game over. And, of course, you can take some time to jazz up this screen however you want with any image widgets, etcetera. I'm not gonna do anything fancy for it for the time being. So I'm just going to compile and save and guys that is literally going to do it all for this one. We will see you win the next one
54. Layout - Pause Menu: Welcome back. Once again, everyone in this video we will be creating the layout for our pause menu from our pause menu. We want to be able to either quit or resume the game. And just like our last video, this is gonna be a quick one, because we can re use a lot of what we have already done with a previous widget blueprints . So to make our lives nice and easy let's come under are you I folder. I'm going to right click on our game over menu widget. We're going to duplicate this guy. I will call it W B P. Underscore er pause menu, double click on them to open it up and just a few modifications here. Firstly, let me zoom to fit this. Obviously, we don't want the screen to say Game over, so I'm going to select our title text and change this to read, pause, pause, menu pause menu. Let's go pause menu like that's and then we do not want to be able to quit and restart. What we want to be able to do is quit or resumes. I'm just going to rename this widget hitting F two here to be resume. That doesn't change the actual text of this yet. This is just the widget itself. Here, too, Resume. And then I'm going to actually change the name of the text on the button from restart to resume. And guys, that's literally all I wanted to do on this one. Either we can keep the same formatting, so compile and save this. And boom! We've got another widget blueprint down that is gonna do it off for this one. Guys, we'll see you in the next one.
55. Framework Blueprints: Welcome back, everyone. In this series of videos, we're going to be putting together the framework for our entire game. At this point, we have a bunch of game like components. Put together things such as a level layout. We've got some actor class blueprints. We've got things such as some menu screen layout to put together, but we don't really have a full end to end game. We need to put all those components together so that we can have an actual beginning to the game from the start menu all the way through an end of game sequence as well. And in order to make this all happen, we need to utilize some things within Unreal known as framework blueprints. Now un be no, See you up at this point. There are some framework blueprints that we have not really talked about yet that determined things about our game. What are these framework blueprints and what are some of the things that they determined? Well, if I may direct your attention to the settings button up here and you select project settings now, I'd like to direct your attention over to the left hand portion of the project. settings and select US maps and modes options. What you see in this area of maps and modes are what are referred to as game mode blueprints that are determining certain aspects about your game. This is our project settings. So these are the current framework blueprints slotted in for our project. Also, there is another framework blueprint down below, known as a game instance. Framework blueprint will be utilizing that later on. But for now, I want to just focus on these up at the top. We've got this game mode blueprint. This ax is a sort of master blueprint that determines the rest of these framework blueprints down below. If I click on this little magnifying glass icon, I can browse to our first person game mode blueprint, and it's located right here in our content. First person BP Blueprints folder right next to our first person character. If I double click on this guy and open him up, you can see that currently, there is no script that exists in the event graph. But the purpose of a game Oh, blueprint is this is the place you want to keep any script related to the rules of your games thinks such as if my character dies, does he respond? Where does he respond things of that nature? The rules are usually contained within the game mode blueprint. Other things that the game a blueprint determines are all the other blueprints with our class defaults button selected here are gay molds blueprint In the details panel, you can see that all of our other framework blueprints are slotted in within the game. A blueprint. Things such as What character we play as by default are pawn class. That is, the character that we are controlling is our first person character. You also see a cross hair appear on the screen when we are playing. That is determined in our HUD class framework blueprint, our first person Hud. And if I click on this right here, browse to the asset in the content browser. You can see that our first person hut is also located in this same directory. If I double click on this guy to open him up, you can see here is a script for drawing. Our hooker are cross hair to the center of the screen. Now, where did these blueprints come from? How did they magically appear? Can I create them? They do not magically appear. Yes, you can create them and the place you can create. The Met is right down here in your content browser by right clicking, going to blueprint class And up until now, we've only selected the actor parent class. But you can create other framework blueprints such as a game mode blueprint which we will be creating in this course a player controller blueprint, which we will be utilising to call upon some pause menu functionality and down below you may have in all classes section down here. This is where you can find things such as a HUD blueprints which we will be utilising as well as a game instance blueprints. Those are all considered framework blueprints. Anyways, that's a very high level discussion regarding framework blueprints in unreal engine, For we will be utilising them going forward. So that is going to do it off for this one. Guys, we will see you in the next videos where we will begin to make use of some of these framework blueprints. We'll see you there
56. Start Menu: Welcome back, everyone. Time for us to start putting all the pieces together for our game, and I want to start right in the beginning and our star menu. The goal in this video is to start off our game by presenting a start menu to the player. Now this is going to involve us creating a new start menu level as well as a game old blueprint specific to our start menu. Since our Start menu level is not going to share the rules that are game itself will have. For example, we're gonna want this level. I'm using air quotes there to have its own music playing in the background as well as to not show HUD on the screen. So this is how we're going to do it. And this is a very common approach that games made in really use to launch a game. Come under your file menu way up in the left hand portion of the level editor. We want to create a brand new level, and for this one, we wanted to be an empty level. So go ahead. It's like that guy and right away let's click this save button and it's gonna ask us where you want to save this. Let's save this to our first Project Levels folder. And I'm gonna call this simply start menu and click save right there. And now you can see with this tab right here are level is named start menu. Now, obviously, we can't see anything in this level. There's nothing here, and that's okay. This is sort of an empty level in which we are going to be going into when we first start up our project. And then from here, we're going to show our actual start menu screen and then on that screen, we're going to be able to click that level old one button to launch our game and actually transfer over to our Level one level. Before we do any of that, we need to create a new game mode blueprint. So let's come under our first project Blueprints Framework folder. Note that path, then let's right. Click in some empty space new blueprint class. And here we want to create, not an actor Blueprint, A game mode base blueprint. We're gonna name this one BP underscore game mode. Underscore. Start menu. Okay, so with that created, let's go ahead and double click on them to open it up. And currently, in our view port, you see nothing, which is fine. We don't want to see anything yet. We want to hop on over to our event graph tab, and we need to script some functionality to actually make our start menu screen appear on. We're gonna do this off of event begin. Play this note, which is here by default. But if you don't see it, you can right click and search for it. I'm gonna get rid of this event. Tick right below, because that is not needed. Okay, I'm gonna do one thing off of our event. Begin play here. I'm gonna look for a sequence nude and the reason I'm going to look for a sequence notice because upon beginning play, I want to do two things. I want Teoh. Firstly, search for a create widget. We want to create a widget. Which widget do we want to create? Well, we created something called w B P Start menu. Ah, And then out of this return value, I want to drag out, aware and type in ad to view port. So what we're saying here is that when we begin play, we want to add our Start menu screen to our view view port to accompany that. Wouldn't it be nice? We had a little background music playing? I think so. So drag off of this then one pin. Let's search for a place sound to D and here I'm going to slot in starter music. Que This one is located within your star content. Just a nice little song to play in the background. So with that, let's go ahead and compile and save. And now let's go ahead and play. Let's see if we Steve's see that start menu. And lo and behold, we still see our cross here. We don't see a start menu at all from what could be the problem. Well, you may notice that we are creating this BP game mode start menu. That's the new game mode we just created, but we're not actually using this yet. We're in our start menu here, and we can actually override what the game mode is for this specific level. Remember currently our project settings. Let me just bring that back on maps and modes. Stab currently, our project settings determines that we are using this first person game mode. Blueprints. That's why when I click play there I was seeing the first person Hud, that cross hair appear in the center of the screen. Now I don't want to do that. That's why I created a new game. Oh, Blueprint start menu. Okay, so with my start menu selected here, we're in our start menu level. You confined your world settings over on the right hand side. And if you don't see this particular tab, you can click it on by coming under window world settings. And if you look in your world settings, there is a game mode override that is currently set to none because it is set to none. We are using our default game. Oh, determined in the project, settings are first person game own. But here in your world settings, you can override what is going to be the game mode for this specific level. I'm going to change this on over to my BP gay mode start menu like so and down below. For my selected game mode, you can see my default pawn classes currently default pawn. My HUD glasses currently set to HUD, my player controllers currently set to player controller, and this may be a little difference than what you see in your project settings. For example, in your project settings, when you have the first person game mode slotted in your default pawn class is the first person character here were overriding it with our BP game mode start menu and that is not the case. These all got slotted in by default, and you can see if we double click on your BP start menu if I was to go in my class default . That is where all these settings come from. These air here by default. These are the exact same framework blueprints that you are seeing over here in your world settings. When you slide in your BP gay mode, start menu. Okay, so now let's go ahead and try clicking play and you will see that we now see our start menu , which is all well and good. But I click on Level one and nothing is happening now. The reason nothing is happening yet is because we have not yet hooked up any functionality . Saul just escaped to jump out of here. So now Where do I need to go to actually hook up our button for level ones? When I click on that, how do I actually make it? So I go into our level. Well, let's jump on over to our you I folder down here and let's double click on RB Piece W B P Start menu, and up until this point we've on. Lee worked in the designer tab. Now let's work over in the graph tab to hook up some functionality for this screen jumping on over to the graph tab. We want to do something when we click on our level old one button over in the left hand side in the my blueprints section, you can see you've got a level a one button. And if you select that down in the details panel, there are several events that you can add your graph associated with that button. We want to do something when we click on that button. So let's add an event for on clicked right here that will add that event to your event graph. And this is going to be a real simple scripts simply drag out, aware and type in open level there's a function to open a level and it's going to say what level? Name? Well, if I jump back into our levels Fuller our level name that we want to jump into his level underscore old one. Make sure you put it in exactly like that. In fact, I recommend clicking on it, doing F to control sea to copy that, then jump back to your W B P start menu, select right here and then do control V to pay sets so you don't make any mistakes. Make sure you compile and save. And now, if you jump in and play you see your start menu here, and if you click on level one, you will be transported to level number one where you can begin playing. And now you see, we've got our cross here back on the screen because we're in a different level that is, using a different game mode blueprints. Okay, so that is all well and good. So we have a separate game mode in our start menu. Then we do in level 01 which is pretty cool because in our start menu are BP gay mode. Start menu does not use the HUD class off first personhood. We don't want to see that cross there. We don't want to be controlling a character all either. We only want to be interacting with that screen. Now. One more thing. I want to point out here, Do you want This is also in the project setting So hot back gun over there. Here, in your maps and modes section, you will see right below all your framework blueprints right here. An option called default maps Editor Startup map. And it says if set, this map will be loaded when the editor starts up. And currently I've got it set to level one. Now, if you were to close out this project this entire unreal engine, close it all out and then bring it back up. You would start unlevel 01 Well, let's changes on back to start menu like so what this will do is after we close on are unrelenting in the next time we open unrelenting back up. This will be the level that will be loaded up by default. So just know about that with that, I'm just gonna do control shift and s to save everything that I have just done guys that is going to do it all for this one. We now have a functioning start menu. We'll see you guys in the next video.
57. Game HUD: Welcome back, everyone. We now have a functioning start menu. Wouldn't it be nice if we actually had our HUD showing on screen while we were playing our game? Well, that's gonna be it. The goal in this one. So come in your framework folder right here. And we are going to right click create a new blueprint class, and we're actually going to be creating a new game mode blueprint. You remember in the last video, we created a game mode blueprint specific for our start menu level and on Lee are start menu level one that was devoid of stuff like our Crossair being present on the screen. We also did not have our first person character president in there because we don't want to control anything. We just wanted to see and interact with the start menu. Let's create a new game own base for this. We will call this BP underscore game mode underscored gameplay like so, And we can double click on this guy to open him up. And this is going to be the game. Oh, that we want to associate with our level or one when we're actually playing our game. Now, this is also going to be the blueprint. The game Oh, that we want to set for any level that we are playing. So if we create a level 0203 etcetera so we can actually slot this in our project settings as well. But I want to demonstrate something for you now within our game mode. Gameplay. Brute blueprint. First with your class defaults button selected over along the right hand side, where we can slot in various other framework blueprints, come under your default pawn class, and let's changes to be our first person character. Now, you may see two options for first person character. Choose this bottom one with kind of this person icon right there. Okay, then go ahead and compile and save this. Now, if I jump back to our level editor here and bring on our project settings, I'm gonna come under the maps in modes option. And now we do not want this first person game mode anymore. We want to use our own game mode blueprints. So click on this little drop down and there you can see our BP game mode Gameplay option. If you don't see it, make sure you compiled and saved previously. So let's select this. And as soon as I select this, you can see that it already respects that. I had first person character slotted in as my default upon class. Okay, so let me just jump in and play quickly here again. I'm starting off on my start menu, so I click play. We don't see anything just yet, but I can interact with this button. Okay, so now I am actually in my level, right? But I don't see a cross here. I do have the first person character, but I don't see across here. Well, that's kind of problematic, right? So what we can Dio is either in our game mode gameplay, Aiken slot in the HUD class we want to use or in my project settings Honestly, does not matter where you set this. Either in your game own itself or in the project settings just to be different. I will set this in my project setting. So my hud class here, I will still use my first person hud, for the time being. Okay, So now if I click play and I click level one, we're now in and you can see that my Red Cross hair is there is. Well, now, this is all well and good, but we still don't see our hood on the screen, Mr Wandera. So what do we do? Will come back into your BP a game old gameplay blueprint and jump to your event graph tab . We want to do some stuff off of event begin play event begin. Play is going to be called as soon as level one kicks on. Okay, that is going to be the beginning of our play off of this. We're gonna drag off aware, and I'm gonna bring in a sequence note. And the reason I'm gonna be bringing in a sequence note is because over the course of the next few videos, I am going to be scripting Cem or functionality off of this sequence, node. But for now, I'm just gonna be building off of this. Then no one branch drag out a wire type in, create widget, the widget we want to create when we're within our game mode. Gameplay is R w b p hud, and it's not enough just to create this. We need to take that created widget dragon off of our return value here and type in ad to view port. That is what's actually going to add it to our screen. I'm gonna left click and drag around this tap that Seiki to create a comment and just type in show Hud like so you can see that bit of script right there. I will compile and save knowledge. Jump in and play. So again, here we are on our START menu using our game mode start menu. And as soon as I click on this, we now see that we've got some HUD on the screen. Pretty sweet because we are using our game mode gameplay for anything. That is not our start menu. I will exit on here by hitting escape guys, that is going to do it all for this one. We will see you in the next video
58. HUD Bindings: Welcome back, everyone. Well, we now have our hut being present on the screen. However, we don't actually have anything on our hood hooked up in this video. We want to create the necessary variables and functions to bind our HUD widgets to relevant data such as score, health and time. Now, note that by the end of this video, we won't have everything hooked up yet. Not everything is gonna work, but we're gonna be laying the groundwork to get our scoring system working as well as our timer working. So what we need to do is firstly jump into our BP game mode game play. Make sure you are within the right game mode blueprint. And what we're gonna do is add a couple of variables in the my blueprints panel. Click this plus variable button. 1st 1 we will create will be called game Points. I will change this on over to an integer because I just wanna have whole numbers for points , not decimal points at all. And then I'm going to create another variable, and this one will be called game time limit. And I also want this to be an imager. This is meant to represent the number of seconds in our game. Okay. With that, I'm gonna compile, and I want to set a default value here for our game time limit. I don't want our game time limit to be zero seconds. I don't know what the right number is for this. I'm just gonna set this to be 120 seconds for the time being. Two minutes, their trial and error. We can actually figure out what is a good time limit, but I'm just going to set that as a placeholder value. Okay, so with that, all well and done, make sure you have compiled and save one more time, and we need to jump on over to our you I folder w B P Hud, open that guy up. Now. We've got this score option right up over along the left. Make sure you've got your score value. Selected that 9999999 value over in the details panel. If you come on over to the right, you can see where that value is punched in. There is a buying option. We want to click on this button right over here and create a new finding. Now that's gonna jump us over to the graph tab, and it's going to prompt us to create a function. Okay, you can see Here is our function. Neymar, dummy. Default name. Get score. Value text zero. I'm going to change is to be something a little bit more memorable than that's. In fact, I will just click over on the function to have right here and hit two. And I'm just going to shorten that to yet scorer. And you can see how that name right there updates the name of our function tunnel entry node right there. Okay, the first thing I want to do is I want to right click in some empty space, and I'm gonna do a search for a node called get game mode. Okay, No, Next I'm going to drag a wear out of this, and I'm going to do a cast to our game mode Game play. I'm gonna hook it up like this. I'll explain what all this is doing after I have this all together. Next, I'm going to drag aware out of our SBP game own gameplay and type in get game points. We just created this variable in our game mode gameplay. And next, I'm going to plug this directly this integer directly into this text input for the return node that's gonna bring in this little conversion where it's going to convert this image or value to a text value and finish the hook up. Like so. All right, so what is this function doing? Well, we wanted to access our game points that are present within our B P game mode. This variable right here now, in order to fulfill the requirements of casting to that, is talking to this game mode gameplay We needed to plug in an object. And the object we plugged in was a game mode. This is basically hey, which game own do you want to talk, Teoh? Okay, so any time you see you want to cast to a game mode, it is good to get a game mode right here to fulfill this object requirement. You can just right click and type and get game own. So which game? Oh, do you want to talk to what we want to talk to our game mode gameplay within our game own gameplay. We want to extract how many game points currently exists in there. And then we want to output that value. So that is essentially what this function is doing. Okay, so that is going to bind our score right there to our actual HUD. How about we bind our time as well? Actually, let's dio let's do our health next, shall we? Let's just go across the top. So I got my health Progress Bar selected next Health Progress Bar and over in the details panel You're going to scroll on down until you find your progress percent. We want to bind this progress bar by something. So click on this bind button created, binding and right away I'm going to change the name of this. This is jumpy. Back on over to the graph tab where we can create function. I'm gonna hit aft to on this and just type in yet Health. Okay, so let's think where does our health values live? Our help. Variables? Well, they live on our first person character, So the way we can extract those health variables is firstly to right click. We want to get our player character and we need this node right here in order to cast to first person character. This is a thing that must be plugged into our object here in order to fulfill this object input requirement. Okay, so then, out of our as first person character, we can now extract any variables or functions etcetera within our first person character. So I'm gonna grab out of this and type in get health and the value that we want to get out of this is our health percentage. If I jumped back on over to our first person BP blueprints, first person character, we've got our attributes right here. Health percentage. And this is currently a value that will go from 0 to 1. And we're actually updating this value any time we are adding or subtracting some health with our update health function. This is a function that is updating our health value. And whenever this function gets called by either, you know, getting damaged by a fan or picking up the health blueprint or the health pickup etcetera, we're updating. We are setting this health percentage variable, so this will always be between zero and one. So jumping back to our WPP, Hud, I could just take this now in plug this directly into our return node that is afloat. This is afloat. So no conversion note is needed. Just make sure that that is hooked in Azaz. Well, and so that is the function for binding our health to that progress bar on our designer tab right there. Okay, we got one more to go here. We've got our time limit, So click on your time limit right here. That is time value and over on the right hand side. Let's bind to this. Create a binding that will jump us on over to the graph tab. And immediately I am going to rename this function, hitting F two on it. Get time limits like so. And here, too. I want to. Right click. We want to get the game mode. Which game mode do we want to talk to? Well, let's cast too. Our game mode gameplay and the reason we're going to cast to our game mode gameplay is because in our game mode gameplay, we created a variable called game time limit. We want to get our game time limit. Now. This is an imager. So if we plug this into a text input, it's going to bring in a conversion node like so. And then we finished up hooking this up by placing that execution wire into the return note . Okay, So with that, let's compile and save. Let's jump in and play click level one here and now you can see we've got a score of zero. A health that won't move just yet. We've got our, ah, 1 20 time limit again. Those aren't going to work just yet. We've still got some more work to be done. But you can see my health actually decreasing a zai get hit by fan for the steam jet. What about if I pick up our health pick up? You can see it increase that So health is working. Our score in time does not. But that functionality to finish out rounding that out and making it all work is still to come. Anyways. That is going to do it all for this one. Guys, we're getting somewhere. We'll see you in the next video.
59. Game Music: Welcome back, everyone in this video. I want to get some game music going in our background right now is rather boring playing our game because we don't have any acoustical ambience. So wouldn't it be nice we had a nice musical track backing our gameplay? I think so. So that's the goal in this one. And to make this happen, I'm going to do this all within our BP game mode, gameplay, blueprints. So make sure you double click on this guy to open him up, and this is gonna be pretty simple to do. Currently in our event graph for our game mode gameplay, we are just showing the hut, recalling for our HUD to show now again the game Oh, blueprint is good for the rules of your gameplay, including, like what? To show on the screen. In this case, we want to show the HUD we could have done this through a specific HUD blueprint, but I chose not to. I'm also going to be utilizing this game mode blueprint to determine what musical track I want to play during my gameplay. And there are many ways I could actually go about doing this, but I'm gonna go this route to make this happen over in the components panel of our game mode. We can click this ad component and I'm gonna add an audio component. And I'm just going to call this music underscored game. And with that component selected over in the details panel, we can slot in what musical track we would like to play now. I actually did import one off camera that I will actually play. I'm not gonna actually get that one to you for free, though, because it's not free to use. You can use whatever musical track that you may have available available to you. The one I am going to use is one that I like a lot called mind heist. But one that is available within the Soul City pack is called Soul Music. Fly up. I don't think it really fits the feel of this level too much, but it is there to use just toe have any musical track. But anyways, I'm gonna be using mind Heist. I like this track a lot Quite excellent. And then what I'm gonna do is I want to actually quiet the sound a little bit. So under the volume multiplier. I'm gonna change that to be 0.5. I don't want it to be to overwhelming, and that's gonna do it for that. Next. I need to actually add the script to make this happen. This is gonna be simple. I'm just gonna drag out a reference to my audio component here. And then I'm just gonna drag aware off of it in type in play, then off of the event. Begin play. I just want to say, play the music. Now, you do have the option here of specifying this start time for this, but I actually want it to be 0.0. Let me just check one more setting here with my audio component. Did that the auto activate? I actually don't want this to auto activate. So I'm just gonna uncheck this because, right, he actually yeah, I do want to check that. So make sure that that is checked. Never mind. Let's compile this. Let's play this or compile and say this and then play this end. We've got our menu music than level one, thinking, thinking, thinking. There we go. You hear that music in the background? Pretty sweet. I say It's a nice track. So again, that's all we need to do to get some music playing in background. Let me just left Click drag out a marquee selection and I will type that Seiki to start game music. Let's compile and save one more time, guys, that is going to do it for this one. So feel free to slot in some background music of your choosing. We will see you in the next video.
60. Game Score: Welcome back, everyone. In this video, our goal is to create a function to add points to our score and then call that function when a target is shot so that we can actually have some score incremental on our hut. Now, before we get to that one thing I forgot to mention in the last video that I wanted to make sure I covered. Just in case any of you come across this now, this is a relatively short game, and your musical tracks should cover the entire length of your game. But in case you need your music to loop, I'm going to show you where you can do that. Currently, in my audio component, I have this set, as is sound wave file. If I click right over here, this will access that file in my content browser. And if I double click on this, you can actually set your sounds to loop within a sound wave file. And where can you do that? Right here? There is a check box to make it looping for a sound wave file. So I just wanted to point that out. If you are using a sound wave file for your musical track. All right with that, let's get on to creating are scoring function. And we're going to do this within our BP game mode. Game place will make sure you open that guy up and what we're gonna do is create a function , and the place to do this is over in the my blueprints panel under functions, there's this plus function button. So go ahead and click on that guy, and we're going to simply call this ad points. This is going to be a real simple function to create. So, like your entry tunnel tunnel note here, over in the details panel for inputs for this function. We want to create one of these, and we're going to call this input points to add. And we're gonna make sure that this is an into juror and then what we're gonna do is bring in our game points variable like so we want to get that. And we're simply going to add these two numbers together so drag out of points to add click the plus button. We want to do integer plus integer plug these both in like, so that so that we add those together And then what we want to do is set our game points. So I'm gonna hold down the old key left, click and drag in our game points to set it like so. So with that, I'm going to just compile and save here. If I was to jump over to the event graph in this game mode, game, game play blueprint. If I'll sue, then drag out our ad points function, you can see what this function note is going to look like. It's gonna take in some points toe ad, which is right there that is going to add it by our existing game points, which starts off zero, and then it's going to set it as our new total. So I don't really need this function node within our event graph of game mode, game place. I'm just gonna delete it out there. I just wanted to show you what that function note is going to look like when it is used. Okay, so and with that now created and again, make sure you've compiled and save, we're gonna jump into our BP Target parent blueprint. Double click on this guy, open him up, and we're gonna be looking for where we destroy our actor here. So you want to come under where we're destroying our projectile and target win hit. And towards the very end of this, you see this destroy actor, which is going to destroy which ever target We shoot with a projectile. Now we wanna build off of this. And the reason we want to build off of this is because we want to call our points to add function. So this is what we're gonna do. We're going to right click. We're going to get game mode. Which game mode we want to get. Well, we've just been working in our game mode gameplay. So let's drag aware off of this and type in game mode. And there's my cast to BP game mode gameplay. I'm just going to extend this execution wire right in, like so and now with our SBP game mode gameplay, I can drag off of this and access that function I just created so drag off of this and type in ad points. Now, how many points do I add? Well, right here in our target parent, we have created a points variable that I will plug in like so that's how many points we want to add. Now, remember, all of our all of our other target blueprints inherit from this one. So in our parent, we default are points to be 100. However, if you look in, say BP Target 500 which inherits which inherits from our BP Target parent. We also have a place within here under the class defaults where weaken set. How many points this is worth. So right now my target 500 blueprint is worth 100. Why is it worth 100? Well, because it still is inheriting that default value from my target parent. Let me set this to be 500 like some. Okay, so now my BP target 500 should actually be worth 500 points. Compile in safe. Okay, so now I'm just going to jump in and play. I know I've got some 500 point targets out there, so let's see if this actually works. Let me just make sure I have compiled and save my target parent right here is Well, before I do, let me just actually left click drag tap that Seiki ad points to total stored in game mode . Gameplay blueprint. Compile and say that one more time and then let's jump in and play damage. Be adults. Music in the background, More damage being dealt. Now I know I've got some targets spawning down here. You can see I've been building out my level slowly between videos down here, I will have some targets spawning in. There is a 500 pointer you can see in the upper left. It is obscured by a lot of debug text. But you could see that if I shoot the targets by 100 point targets are worth 100. My 500 point targets air with 500. And my score is currently 1200 it is obstructed by a whole lot of debug tactics. But you can see that that is actually functioning, I swear is actually functioning. All right, guys, that is going to do it. Offer this one. We've got a functioning game score. Something you may want to do now is go through your target blueprints here. And with each of these selected, you can go into the class defaults and set. How many points is air all gonna be wear. So my 1000.1 should actually be worth 1000 points, etcetera. Anyway, is that is going to do it all for this one? Guys, we will see you in the next one.
61. Game Instance Blueprint: Welcome back, everyone. In this video, we will be creating a game instance. Blueprint. Now this is a special blueprint type that can store information about our game over an entire session and will not have its variables reset when transitioning to a new level. Now we'll need this in order to set up our game timer properly. First, let's just focus on creating the necessary assets to make our timer work as intended. Remember those game mode blueprints? The variables contained within a game mode blueprint revert back to their default values whenever you enter in a new level with a game instance. Blueprint. That is not the case. Okay, you will see why this is important for our timer as we go on. So without further ado in our framework folder, let's create a game instance blueprint by right clicking blueprint class. You will not see it in the common classes, so you have to search for it in the all classes section down here. Just type in game instance, and we want to select this game. Instance. Not platform game instance. Just game instance and select, and we'll name this BP underscore game instance like so now We are also going to create an E newme variable within this framework folder as well, and you'll see what this is used for in just a moment. An E noon is short for an enumerated list, and when I'm going to use this for is to list out some possible level names. So I'm going to right click, come under my blueprints option right here and over in this fly. Oh, menu is an Innu Marais shin. So we can left click on this guy, and I'm gonna call this e underscore level selected. Now, I am only going to create one playable level in this project. But with this timer system set up, you should be able to extend this to set How much time you want to have available Is your time limit for a level one the level to a level three etcetera. Okay, so with this asset created, I'm gonna go ahead and double click on this, and it's gonna look rather empty. Currently, we have nothing in our e numerator list of what I want to do here is list out some level names, so I'm gonna click this new button on the far right, And I'm gonna type in for our display name level underscore 01 Click new again. I'm gonna list this as level underscore 02 and then once more, I'm only going to go up to level. Underscore. 03 If you eventually build out this project to have 10 levels, you're gonna want to add to this. But I'm just going to do three as a quick example. I'm gonna say this and then I'm going to close this out, and then I'm going to jump into my BP game instance. Double click on this guy, open him up, and I'm going to create a new variable inside of here. And this variable is going to be simply be called level selected. Now for the variable type. I'm going to come over to the details panel under variable type Click this drop down and I'm gonna search for this. We're gonna be searching for the enumeration we just created. So if I type a level selected, we can see there is an e newme level selected. That is the enumeration that we just created. So go ahead and click on this. You can compile, and you can see you can set a default level. We want this to be level 01 And you can set this to be any level that you select right here . But I wanted to be 01 again. We're just setting the groundwork for our timer system in this one. This is all gonna come together in becoming videos. Okay, So with that, make sure again, you have compiled and saved one more thing. I need to make sure that we do. We have created this game instance Blueprint, but this is not currently been set in our project. Settings to come back to your main level editor come under settings, project settings and in our maps and modes over on on the left hand side, down at the very bottom for our game. Instance class. We need to swap out this default game instance with our newly created BP game. Instance. Now note that there is no, like, save button here or anything like that. As soon as you slot that in, you are good to go. That is literally going to do it all for this one. We just needed to set the groundwork for our timer system by creating a game. Instance classle Mission accomplished. Guys, we will see you in the next videos
62. Game Timer #1: Welcome back, everyone. In the last video, we set out to create a game instance Blueprint for the purposes of setting up our game timer in this one. Our goal is to set up our levels time limit depending on which level was selected. Now note we only have one level to select right now, but we'll show you how you could set this up for multiple levels. I'm gonna start out working in our widget blueprints here, so I'm going to jump into my you I folder and I'm gonna access my W B P start menu. Double click on that guy to open him up, and I'm going to jump on over to the graph tab now. Currently, we have this strip where once we click on the button that says level one, we're going to open up a level one. Simple enough. Well, I'm gonna do something a little bit more fancy here. I'm going to create some separation between these two nodes, cause I'm gonna put in a little bit of script between here. First thing I'm gonna do is I'm going to right click, and I am going to type in, get game instance. You have seen me do this before for getting a game mode. But I'm going to do a get game instance because I want to cast to my BP game instance. And why am I doing this? Well, the reason I'm doing this is because I want to set some variable in my BP game Instance. Remember, when we cast is something we can talk to any variables functions, etcetera that live within that blueprint. Now, if you remember back from last video inside our BP game instance we created this variable called level selected, and it's got a default value of level or one, but it could be set to two or three jumping back to my W B P start menu. I now want to talk to that. So I'm gonna drag aware off of this and type in set level selected. I want to talk to that variable. Make sure you hook in your execution wire like this and because we selected level old one, I want to make sure that in my game instance, I'm saying we have selected level 01 You can click this drop down to change that, and then I'm just gonna keep the flow execution here by hooking this into my open level one and let me just left click marquee selection Tap that Seiki and type in level one selected like so make sure we have compiled and save this. Now I want to jump on over into my game mode game play blueprint. So coming back to your framework folder, jump into game mode gameplay and I want to add three new variables. Come under the variable section, Click this plus variable and I'm gonna make one called level Underscore 01 underscore time limit I will change is to be an integer. And with that, I can simply select it right click and duplicate it. And I'm gonna call this level 02 time limit, then right? Click on that duplicates level, 03 time limits. And I'm gonna compile here so I can set some default values. So I'm gonna change my level 01 time limit. My first level time limit to be 1 20 I'm gonna change my level 02 time limit to be 150 seconds. I'm just coming up with some numbers at random here. Level 03 Sure. Let's make it be 180 seconds. Okay. With that, we've got this event begin play node, where we are currently showing the hut and starting the game music. Let's add some more functionality. Showy. So let's do this. Let's right click type in, Get game instance and you guessed it. We're going to drag aware off of this and we're going to cast to our BP game instance. We want to talk to that in some way. Let's make sure we hook in this flow of execution like so Okay, next, I'm going to drag aware out of our as BP game instance and simply type in get level selected whoops. And then when I'm going to do is drag a wire out of our level selected here, and I am going to bring in a node called a select node. It's this guy right here. Now it's really cool about this Note is depending on which option is selected right here in our game instance. Whatever is set here is our level selected. We can change the return value. What do I mean by that? Firstly, I'm just gonna plug in my level 01 time limit to here. That's 120 seconds level Oh, to time limited here. Remember that 150 seconds and my level old three time limit into here. Remember, that is 180 seconds. And then I'm going to bring in my time limit here, my game time limit. Gonna click that And I want to set that. And I'm gonna plug this in, like so. So let's understand what we're doing here. We want to say here in our game old gameplay that upon beginning play, we want to cast to our BP game instance and we want our games time limit to be either 120 seconds. 150 seconds or 180 seconds. Well, how do we determine that? Well, we're going to determine which one of these it is whenever we select a level here in our BP start menu. So currently, in my BP start menu, I am saying that when we click on the level or one button we're going to cast to our game instance and we're going to set our level select variable to be level or one. So, upon selecting level one here that is going to inform our game mode blueprint. That level no one has been selected. So that is the time limit that we should set our game time limit to be. Let me just bring a marquee selection around this bit of script. Right here. Left, click and drag tap that Seiki set game time limits based on level selected. Okay, I'm gonna compile and save really quickly. And now I'm just going to jump in and play. And the time displayed should be accurate to what we have. It's set to Ah, so right now, it should be because we click on this level one button. It should be set to level 01 which in our game mode gameplay is going to then select this 120 seconds as our time limits. Let me just jump in and play. Select a level one. You can see our time limit is currently 120. Now we don't have a deck amending at all. Yet that is still to come. But you can see that that is working. Okay, But we also had it said toe 1 20 before. So is it really working? Well, let's test out even further. Let me jump back to W B P start menu. And let's say that when I click on level 01 button, I am actually going to set our level selected to level 02 Okay, so what that's gonna do, let me just compile and save. This is over in my game mode blueprint Upon beginning play year, we're going to be casting to our game instance Blueprint and it's going to say, Hey, which level was selected? What is this variable currently set to? Well, it's currently set to be level two, because that is what we selected here in our BP start menu level 02 we set this variable this level selected variable to be the level 02 option. So now here it should respect. It should select the value set in this variable, which is 150 seconds. And that should be centers are time limit. So let me just jump in and play now and see if that is true. And now you can see in the upper right. 150 is set so you can see how this system can be extended. Now I'm going to jump back into my BP start menu and changed us back to be level one. But in the future, if you were to create a level two and a Level three, you could do a lot of copying and pasting of this bit of script right here. But swapping out the level selected set right here to be whatever level you've linked that button, too. All right, let's compile and say that one more time again. The time doesn't deck Ament just yet. We'll get to that. But that is going to do it all for this one. Guys, this is kind of a handy trick to make it so your time limit is specific to whichever level you selected. We'll see you guys in the next video.
63. Game Timer #2: hello and welcome once again in this video, our goal is to add a function and write some script to get our game timer decker minting that is counting down. So one thing I wanted to point out from our last video that I missed is why did we keep our level selected variable in our game instance Blueprint. Why not a game mode blueprint? The reason I put that variable level selected in a game instance Blueprint is because our game instance blueprint lives across levels. By that, I mean, we're starting our game, our project here in a start menu level. And remember, in our start menu level where we're bringing on our BP Start menu widget, we are currently setting this level selected variable in the BP game instance to level A one and then we're transitioning to a new level by transitioning to this new level. This said Variable in our game instance, will still remain because it's the same game session. If this was a game mode blueprint, that variable would reset back to its default. So very important to understand that. Anyways, let's get onto a decker menting timer, shall we? This is going to be done within our BP game mode, gameplay, blueprints. So jump on over into that. You can see all the script we've got living in here so far. First thing I want to do is create a function click on that plus function button. This one is going to be called deck Remittance timer. And this is going to be a relatively simple function. I'm just gonna bring in my game time limit, like, so we're gonna get them that I'm just gonna drag aware out of this type in the minus key. This is going to be integer minus integer. I'm gonna leave this hard coded to one. So we're gonna take our game time limits subtracted by one, and then we are going to set our game time limits. So I'm gonna hold down cult left, click and drag. And we're gonna hook this in, like, so relatively simple, Right? Okay, so then jump on over to your event graph, and we're going to be building some more off of this event. Begin place sequence notes. So let me just bring this on down a little bit and I'm gonna drag off of this. Then three output pin and type in set timer by function name. Now, this is a really cool function that takes in a function in our case, it's going to take in the function deck, Ament timer. So I'm just gonna hit f two on this. Copy that exact name in, Plug it in right here, Decker Mintimer. And then I'm going to set the time to be how long and again this says, How long to wait before executing the delegate in seconds. So I'm gonna set this to be 1.0 seconds, and I am going to set this to loop. So what this note is going to do is call upon our function here every second to take our time limit, subtract one and update our time limit. That's it. Because this is set to looping. This is just going to continue every second. All right. One thing I do want to do in this is for future purposes. I am going to right click on this return value here, and I'm going to promote this to a variable and call it timer. Now, the reason I am promoting this to Variable is because I'm going to reference this to pause our timer when we complete a level so that that timer does not continue Decker minting kind of important for later on purpose. Anyways, that should be all we need to actually get our timer Decker minting. Let me just left click and drag out a marquee selection here. Lips rather big. Except that Seiki run level timer. Compile in save. Let's play Click level one and you can see we now have a decker minting timer that is Decca Menting every second. So, guys, that is going to do it all for this one. We now have a working timer will see win the next one.
64. BP Scripting - +Time Target : Welcome back, everybody. Well, now that we have a functioning timer in our game, it would actually make sense for us to go back and script our time bonus targets so that when we shoot our time bonus target, weaken, See time added to our timer. So let's find our time bonus timer under the actors blueprint. There it is, BP, target plus time. And what I want to do is I want to add a variable in here, and I'm gonna call this bonus time. I'm gonna make it an inter juror. I'm going to compile so I can set a default value. And I'm gonna say, any time we shoot one of these, we're gonna get I will say five seconds. Obviously changed that to whatever you would like it to be. Now again, this particular target blueprint inherits all the functionality, including the behavior as to what to do when you shoot it from our BP target Parent, Just a quick sanity check here. Make sure you've gone into the class defaults and set your points here to be zero for your target plus times. So you don't actually get any points when you shoot this and also make sure you've checked whether or not the lifetime for this particular target is one second 10 seconds however many seconds you wanted to be before it disappears. Okay, So make sure you've done that anyways. Jumping back into my event graph. What I want to do is I want to do something when we overlap the target collision. So left click on your target collision to select it, right click on it to add an event. And we want to do something on begin overlap and not just when anything overlaps it, but when the other actor is our first person projectile. So when our first person projectile has been the thing that is overlapping our targets collision here, I want to get the game mode. And from here I want to cast to our game mode game play because I want to talk to that. Hook that in like so And I want to get time limits, get the game time limit, and I'm also since I'm right here, I'm gonna drag a wire off of this and I'm going to set game time a limit like so And now the reason I'm getting our game time limit is because I want to get however much time we currently have left in our game and I am going to add So drag a wire and plus we want to do integer plus integer. How much time do do we want to add to our time limit? Well, we're gonna add our bonus time, which is currently five seconds, and then we are going to set that as our new time limit. Now, remember, our time limit is Decker menting every second. Make sure you hook this in as well, and let's also, while we're here, let's play a sound showy because it would be good to have a little special sound effect when we shoot this thing. So let's keep this flow of execution going. I'm gonna type in place sound. Let's do a place sound to D. It's going to kind of like a special like, Hey, you got a special target sound and I'm gonna just slot in v r. Confirm that is a gnawed eo asset that comes with your content packs Here is well, the are confirmed. That's in the engine content, by the way. Okay, it's with that. Let me kind of frame upon that. Scripts. You can see what I've done here. I'm just gonna left click and drag out a marquee selection. Tap that, Seiki. Add time gift player destroys with pro Jek tile. Okay, I want to compile in. Save this. Now, I do need to test this. So I'm currently in my level. 01 I've jumped out of my start menu level. I'm gonna find a BP target time plus drag that out here. And that's really kind of right, huh? Gonna spin it around here. 90 degrees. I am also going to be sure that with this target selected, go back into my details panel. I want to set this as a stand alone target. Just a one off. And I want to take the trigger volume here, select that component and move it so that I can overlap that trigger volume and have it actually spawned in. Let me just make it a little bit bigger. Like so. Set that down here. Move it back here. Okay, So when I jump in and play here, I'm gonna overlap this trigger volume. Pay special attention to my timer to make sure that that is working properly. So here we go. Okay. I've got 113 112. Note my time. Note my time. 108 107. And you saw it. Add five seconds to my timer when I shot it. And you heard that little special sound effect as well. So it is working as intended, guys, that is going to do it all for this video. We're onto player. Respond next. We'll see there.
65. Player Respawn: Welcome back, everyone. In this video, we will be creating the script to respond our player back to the start of the level whenever they die. Now, this will be one of the more difficult videos we're going to get through. But we will get through it together, taking it step by step. First thing we need to define after our player dies is where are they going to respond? And to do this, we're going to be accessing our BP game mode. Gameplay. Double click on that guy to open him up. And within here we're going to create a variable, and this variable is going to be called Respond, Transform. And I'm gonna change the variable type here to be a transform. Now, if I compile over in the details panel, we can see that a transform is made up of location, rotation and scale data. Now, we don't really need scale data, but we are concerned about the location of our player being respond as well as the rotation . We're not gonna actually set any defaults here just yet because we're gonna be doing something a little bit more intricate. What we're gonna do is set this variable from our first person character blueprints. So jump on over to your first person BP folder blueprints and access your first person character. And in here we need to find our event. Begin play. And if you can't find that you can simply right click type in events begin play and they're mine is mine is currently hooked up to some motion controller VR type stuff. And what I'm gonna do is drag this out like this because I want to use my event, begin play form or than just this little bit of script that it's already hooked into. So pulling it back like this, I can drag out a liar and bring in a sequence note like so. And I'm actually going to hold down control and left click to place this wire into the bottom, Most then one output pin. Okay, so with that done, I'm just gonna move this up a little bit. And what I'm gonna do is I'm going to right click and do a search for get game mode, and we were just within our game mode gameplay. So I am going to drag out of this into a cast to our BP game old gameplay, and I'm going to hook in the then zero pan into that and out of our game old gameplay. I'm going to say, Let's set, respond transform again. When we cast, we can access any of the functions and variables that live within that particular blueprint . So we're gonna set our respond transform like so and now we've just got to determine what do we want to set our respond transformed to be Well, if I just right click down here, I can get actor transform. And the target for this is ourself, meaning the first person character. I'm just gonna plug this in, so let's understand what we're doing here were saying on event Begin play. We're going to set our respond transform that exists within our BP game. Old gameplay to our actor. First person characters transform location, so the location and rotation of our character when they spawn in that is what we want to spend set our respond transform to be that's gonna be really handy because no matter where we have our players start located in the level, that is where we're basically saying, we want our BP game mode gameplay respond Transform variable to be okay. So with that bit of script, I'm gonna left click drag out, chap that Seiki and say sets character, character re spawn sets with the apostrophe. I know, Nina. Possibly there sets character, respond, transform in our game mode gameplay, and I'm gonna compile and save that right away. Next, we're going to come under this area of the my blueprint panel in your first person character. Click next to this little eyeball icon here, and we want to show inherited variables. When we do that, come down to this area at the very bottom known as event dispatchers in under your game event Dispatchers under damaged expand. That out is well, you are going to find an on wax. We don't need to expand. That damaged out right here is the one we're looking for. There is an event dispatcher on our first person character known as on destroyed. Now, what is this? We haven't talked about event dispatchers yet. Basically, event dispatchers are way to communicate from one blueprint to another. Now you're all familiar with Twitter and how that works. Basically, an event dispatcher, as I've heard it explained by Zach perish from epic games, he said. It's a lot like Twitter, and I agree. Great comparison. Essentially, when our first person character dies, they can send out a quote unquote tweet, a k a dispatch, an event to inform another blueprint that they have been destroyed. In this case, they have died. Now we want to commute this information ultimately over into our BP gay mode gameplay and in order for our BP game old gameplay. To understand that that has happened. This BP game mode gameplay needs to quote unquote subscribed to that tweet that first person character is sending out, and we'll get to that in just a moment. But I wanted to point out here that there are some event dispatchers, a k a tweets that a first person character can send out, and these are currently here by default. We did not have to do anything to create thes event dispatchers. Okay, so with that understood, let's jump on over to our BP game. Old gameplay. Now we've been doing a lot of stuff off of our event. Begin playing our sequence node right here. I'm going to add yet another pin. Let's bring this down a little bit further so we can keep this all in view. And what I'm gonna do is I'm gonna right click in some empty space and I'm going to say yet player character than out of this. I am going to cast to our first person character so we can talk to our first person character. Hook this in off of the then four I'll put okay, and then we want What we want to do is drag a wire out of our first person character. And I'm going to do a search for a sign on destroyed. This is one you are looking for right here. It says a sign on destroyed. If we click on this, it's gonna bring in two nodes. There is his bind event node as well as a custom event that already has a name. We can leave that name by default, but essentially what we are saying here and I must hook in this execution wire as well is that upon beginning play, we are going to subscribe to this on destroyed event that exists within our first person character, so that when our first person character is destroyed, a k a they die, then this event will fire off. Note that without this binding right here to this custom event, none of this can happen. There's no way for our game mode gameplay to understand that our first person character has died. Okay, so next, what we want to do is off of this aun destroyed event zero. I'm gonna drag out aware, and I'm gonna add a short delay, because before we we we respond them. We want to have a little bit of a delay, so they don't just respond immediately. The user actually has a moment to understand that they have died, right? So I'm gonna set that to be two seconds. Okay. Then down below, I'm going to bring in our respond transform. We're gonna get that. And the reason I'm going to get that is because off of this delay note, I'm gonna drag off a wire and say Spawn, actor from class. Which actor do we want to spawn after we have died? Well, we want to spawn our first person character, so I'm gonna type in first person now. Nope. That I've got to him here. There is ah, two options. We want this 1st 1 with the character type icon. And then, of course, we got us specify. Where is the spawn Transform like, where do we want to spawn him in? That's where our respond transform comes in. Okay, next, what we want to do is right. Click and we're going to do something called getting a player controller. Now, the player controller is this thing that exists as a framework blueprint. We're gonna be dealing with it a little bit later, actually. But it is the blueprint that determines us controlling having some control over our pawn. And the reason we are going to get this is because off of this and want to drag out, aware and say, possess I want to possess a pawn. So after our first person character has been spawned after dying, I want to possess a new pond which pawn our first person character so we can take out this spawned actor, a spawned first person character. And that is a spawn that we want to control. Lastly, let's just add a sound effect in here, so I'm gonna drag out aware, Do you play sound to D and we will slot in the sound How about start simulates? Start simulate que All right with all that done, let's just add a comment block around all this bit of script and actually, let me frame it up here so you can see what we have all done. And I will tap that Seiki and we will call this respond player once more. I'm going to compile and save. Let's just jump in and play now and see if this works. Now, I am currently on my level 01 I have switched off of my start menu. So if I click play directly from here, I'm not going to go through my start menu. I'm simply going to play immediately from the start of my level. So let me just go through this door and I've got some work to do with my lighting. And I'm just gonna let this fan kill me. 1234 five I am dead 12 seconds. There we are, right back in. But you will notice that there is currently a problem. I'm gonna kill myself one more time. 1234 512 Uh oh, no, Respond. What happened? Well, there is more work to be done dumping back into our BP game mode gameplay. What is currently going on here is upon beginning play, we're casting to our first person character. In out of that, we are subscribing to our on destroyed event for when our first person character dies. That's what this does. And once our character dies, this event is triggered. We then wait two seconds respond. Our first person character are giving control over him. Possess him in that sound place. So that happens one time. But what happens if we were to die again? While essentially we need to re subscribe to this on destroyed. So this is gonna be pretty simple to do. If we come right back towards the beginning of this particular script, we could right click and create a custom event. So just right, click type in custom event, we will call this respond, plug this in like so and now we created this custom event, but there's nothing calling it. So what we're gonna do is come to the very end of our response script here after our place sound to d. And now because we have created that custom event, I can drag off the wire in type in respond. And there is the call function for respond that is going to call for this custom event to then go off and re subscribe to that on destroyed events so that this can fire off again. So it doesn't matter how many times we die at the very end of us dying and being respond. This will link back to here. Cool, right? I actually could have skipped this whole custom event thing and dragged this where? All the way from here back into here. But I don't like to have lines crisscrossing. Don't criss cross the wires. So now let's try this one more time. Compile and save. Let's play. I'm going to open that. Let's die, Okay? Died respond. Let's try this one more time. Died respond and you'll notice my time is not resetting either, which is what I want. It continues to tick down. Let's try dying 1/3 time, died and respond. Time is continuing. To tick down is well, so that is working is intended guys, that is going to do it off for this one. We now have a response system in place. Let's just recap one more time Exactly how this is all working, because I understand this convey be a little confusing. So here in our game mode gameplay, we did create a respond transform variable. We created it to live in our game old gameplay. But we are not setting the location and the rotation here instead in our first person character, upon beginning play upon the very beginning of our game we are setting are spawned, transformed to be the exact location where our first person character spawns in. That's pretty cool than jumping back to our BP game. Old gameplay. We're saying that upon beginning play, we're going Teoh, ask our first person character. We would like to subscribe to his on destroyed tweets, that event dispatcher again, and a first person character here is an event dispatcher that lived here automatically called on destroyed. That will happen will send out a tweet when whenever our character dies so once our character does die, this event will fire off will wait two seconds. We will spawn a new first person character at that respond transformation and then we will be able to possess it. We play a sound and then we say trigger that respond Custom event right here so that we can subscribe to any more on destroyed tweets. Event dispatchers that happen again? Guys, that is going to do it all for this one. We'll see you in the next one.
66. Level Complete Menu #1: Hello and welcome again, everyone in this video, Our goal is to make it so. Our level complete menu appears whenever our player reaches the designated area of the level. Currently, I am at the very beginning of my level. So I'm just gonna fly over to my uncompleted end of level area, which is right over here. You might remember had that sweet lamp going on over here, and I actually have placed a level complete actor where I want to end my level. It's rather dark in here at the moment, so I'm just gonna change my view Port here from lit to unlit just to brighten that up a little bit. So wherever the end of your level is going to be, make sure that you have come into your actors folder and you have placed a B P level complete actor into your level and you can see that my trigger volume here this yellow line that's probably pretty tough for you. All to see is pretty much perfectly lap overlapping the area where I want to trigger that level complete menu to appear. If you need to resize this, you can come under your details panel with your BP level complete selected. Select your trigger volume. And then from here, you can bring on your scale tool and resize it as you need. So obviously, this is an invisible actor. If you want to make this visible in game, something you can do with your BP level complete Selected has come under the details panel and scrolling down in your rendering section. There is an option for Hidden in Game that is checked by default. If you uncheck this, it'll make it so that you can see the bounds of your level. Complete actor here, this yellow wire frame. Also, because mine is relatively dark at the moment. If I go back to lit mode, I'm just going to left hold on the Elke and left click just to add a temporary point laid out here to make it a little bit easier to see. Okay, so with that done, I need to now jump into my BP game mode gameplay. So come under the framework folder. Make sure that you double click on this guy to open him up now. Earlier, we added a an audio component to our BP game. Old gameplay for our game music. We're going to do something similar for when we complete the level. We're gonna have a little fanfare music. So just gonna add another component, an audio component, And I'm gonna call this music underscore level complete. And then over in the details panel. With that selected, I can decide which music or sound I would like to play. Now, I did import some fanfare type music to play off camera between videos. I'm not gonna share this one with you because it is not one that is share a bill by me. So slot in which ever sound you would like. But with one I have imported is called Victory Fanfare, and I'm sure it will sound familiar to a lot of you. Okay. And then with that done, I need to actually create the script where this can possibly trigger. So I'm just gonna come down here in my BP game, old gameplay, find some empty space, and I'm gonna right click, and I'm going to create a custom custom event, and I'm gonna call this level finished now. The first thing I want to do when we finish the level is I want to stop our timer. Now you may remember from earlier we created our level timer up here, and I did this thing where I promoted our timer here to a variable called timer. I did that for this purpose right here so I can stop that timer. So here is that variable down in my variables panel. I'm gonna left click and drag this in and get it. And then I'm gonna drag off of this and say, Pause, timer by handle. So that is going to stop our timer from continuing on. Next thing I want to do is right Click and I want to type in, get player, character, several things we wanted to hear on finishing the level. Then I'm gonna drag out aware, and I'm gonna say disable input because we don't want to be able to control our player anymore. Now our target here is our player character. But I also need to fill in the player controller. So let's right click and get player controller again. The player controller is a framework blueprint that allows us to control our first person character. It's plug that in like that next out of our player controller. I'm going to drag out a wire and I'm gonna do a search for set input mode view I only The idea here is that we want to have our level complete menu appear on screen and that we can Onley interact with our level complete menu. Now, this one, we're not going to actually go the full 10 yards yet to make it interactive just yet, but this is going to give us control to have a mouse cursor and stuff on the level complete screen. So make sure you plug in your execution wear like so and continuing on here. I am going to drag a wire off of our player controller yet and I'd been show mouse cursor. We're going to set show mouse cursor in the player controller blueprint. There is an option to show the mouse cursor this property lives on the player controller blueprint. And what we want to make sure that we do is when we sit set our input mode to you. I only meeting We can Onley interact with our our level complete menu. We want to make sure that we can see our mouse cursor. Okay, Next thing I want to do is drag aware off of this. And let's create widget. And the widget we would like to create is our level complete menu. And then, of course, off of this. We need to drag off this and say Add to view port not enough to create it. You must add it to the view port. I'm flipping my page notes here. Okay, so that is now added to the view port. So next thing I want to do is I want to take our game music, your drag, this guy in that we're gonna drag aware off it, and we're going to say, fade out. We want a fade out or game music, and I'm going to set the fade out duration to be 0.5 or half a second. And then what I'm gonna do is drag in our music level complete, move the silver a bit, drag out a wire and just say play. So we're gonna be fading out the game music and playing our level complete music. Okay, So with all that done, I'm going to drag out a marquee selection left click, and let me try to frame this in view too. So you can see the script in its entirety. There we go. Left, click, drag out a marquee selection. Gonna tap that Seiki level completed. And I am going to compile and say this, But you will notice one thing is not yet done. We don't have any means of calling this level finished. Custom event. We created a here, but there is nothing yet calling it. So let's fix that. Let's hop on back to our content browser. Come under your actors folder here and double click on your BP level complete. And we want to do something. When we overlap This trigger volume that is this big, boxy area. Okay, jumping back to my event craft and get a right click on a trigger volume and say, Add an event for on component begin overlap. Now we want to do something when it is our first person character overlapping it. So we're gonna drag out of our other actor. We're going to cast to first person character. Next I am going to right click. I'm going to get the game mode and the reason I'm going to get the game mode is because I want to. Then cast, too. Our BP game mode gameplay. Okay. And so if it is our first person character overlapping that trigger volume, this will then fire out. So we're gonna plug that then into our BP game own gameplay so we can talk to it, and then I can drag out of here and actually call for that custom event to fire. So I'm just going to search for level complete when I call that level completes. Or did I call it level Finished level finishes what I call it SOLs. Drag off this level. Finish their Riggio. That's the guy I'm looking for. So with this, let's compile and save. And now I am just going to right click and play from here in my level so I can quickly finish my level without going all the way through it. Now again, our level complete menu will not be interactive yet, but this should be enough so that we hear the fanfare and see the screen appear the level complete screen. So here we go, right click play from here. And the reason our music was playing right away and this was something that I messed up earlier on is because let me fly to the end of my level. There it is is because And this is where I hesitated earlier with our music is in our BP game mode. Game play, my music level complete. If I go in here, I do have this sets to auto Activate now. You saw me hesitate earlier on with our music game was not sure if I needed to uncheck that as well. We can go ahead and uncheck that is well So if I compile and save this, this should then make it so that this music Onley plays when I tell it to play the a scripting. So here I am not yet overlap being that end of level trigger volume, right clicking, playing, hearing the normal music And then you can see I can see the bounds of my level complete because I checked unchecked hidden in game And here we go. Obviously clicking on these buttons will do absolutely nothing and it looks like I screwed up right there. I didn't add an outline to our final score so we can look to finish that. But for all intents and purposes that is now working, we are showing our level complete menu and we are kicking off the fanfare Music as intended . Alright, guys, that's going to do it all for this one. We will see you in the next one.
67. Level Complete Menu #2: Welcome back, guys. In the last video, we made it so that our level complete menu is showing on the screen when we overlap are level complete blueprint. In this one, we want to actually make that level complete Menu Interactive and to tally up the final score. So the first thing we need to do here is to open up our B A P game mode gameplay here in your frameworks blueprint, and I want to add a new variable. And this one we're going to call time remaining multiplier. And I'm gonna make this into germ. And then I'm gonna compile here really quickly so that I can add a default value. And I'm gonna make this be 25 and you can fiddle with this value to your heart's content. This is essentially going to be how many points are we going to get for every second that is left remaining when we complete our level? Okay. Just gonna compile and save that one more time. That's all we need to do in here for the time being. Now I'm gonna jump on over to our you I folder and access are w b P. Level complete menu now. Something I did between videos that I noticed I had for gotten in the last video is I had not set an outline setting for my score value at the very bottom here. So I made sure went back and fixed that up. Innocent mistake. Okay, Within here, we want to bind some variables. The 1st 1 I'm going to select is our target text. Our target value, not our target text, that first point value over there. And you can select it down here in your hierarchy. Or you can select it right here and over in the details panel. We want to create a binding for this. So click on this bind button, create binding. That's gonna jump us on over to the graph tab. I'm going to select our function here that we are starting to create hit F two and I'm going to call this yet. What do I want to call this? Let's call this get targets. Score like so. And in order to do this, I am going to right click, get our game mode. Which game mode do we want to talk to? We want to talk to our game mode. game Poi like so and out of our game mode gameplay. We want to extract our game points. We've got this variable called game points that is going to tally up as we shoot targets to rotter game. And then I can simply just plug this into the return value. And there's gonna be a conversion. No, that is going to convert this integer variable into text like so make sure you hook up this wire as well. So there is our get target score function that is going to be bound to this value right here. Okay. Next. What we're gonna do is select our time bonus right down here, our time of value, and then we're gonna scroll on down until we find our text. There it is. We're going to create a binding for this. Once again, we're going to create some room. I'm gonna hit hit F two on this function name. Call it yet time and I cant spell time remaining score and I'm going to get our game mode, get game mode. Which game own? Do we want to talk to our game? Play game mode Cast to BP gay mode, gameplay and out of this. I am going to extract our game time limit. I probably could have named that variable better set a time limit current time, maybe because it does increment down. Then what I'm gonna do is I'm also going to extract out of our game mode gameplay, and I'm going to find our time remaining multiplier, which I have just created within their. And then I'm gonna drag off our time limit here in type in the multiply number. Or you can simply just type in, multiply, multiply like so And we wanted you integer times integer so a little math year. So if we have ah, you know, 10 seconds remaining, we're going to multiply that by our time remaining multiplier, which is currently 25 giving us 250 bonus points. Right? Then we're gonna plug this in here in a conversion node will come in and make sure that you hook in your execution wire like so. So there is that function that Hud Bundy HUD binding is now completed as well. So one more to go here, jumping back over to our designer tab. We've got our final score and we need to bind. This is well, so create a binding for that guy hitting F to honor function Name. I will simply call this get final score, and we can take a little bit of a shortcut here. I'm just going to jump on over to my gets time remaining, function in here, and I'm going to left click and highlight a bunch of these notes. How about that many right there. I'm gonna hit control C go back to my get final score function. Gonna do control V plugged that into there. And while I do want to do this multiplication, I also want to add in our game points. I'm gonna extract off of our game old gameplay and do get points, get game points, and so we're going to get our game points, and we're going to add that to hitting, plus into jer plus imager. We're gonna add that to our time bonus to get our final score. Make sure you hook that and as well compile and save. And now all those HUD bindings should be completed. Okay, um, let's jump in and play really quickly. And then we will worry about making our quit and, um our restart buttons functional on our level complete menu. So let's make sure that the score tally is working, jumping in and playing. I've just set up a target spotter really quickly here to make it so that I've got some targets to shoot. This is the in completed end of my level. Right? Click play from here. Gonna overlap this trigger volume. Just a bunch of 100 point targets. I've got 500 points. All right? And here we go levels completed, So I've gotten 500 points for targets. My time bonus ended up being quite hefty because I had a whole lot of time remaining and you could see the map is done here. Target points and time bonus to come up with our final score. All right, let's jump back into our level Complete menu widget blueprint, and let's jump into our event graph and let's make our buttons actually functional. So I'm going to left click, drag out a marquee selection and delete out these existing event nodes. And I want something to happen when we click on our quit button over here. So in your my blueprints panel, you're going to see you have access to talking to your quit button. Select that. Let's do something when we click on it. And all we need to do is drag aware off of this. And there is a function already built in called Quit Game. Simple enough. Just gonna left click drag around that tap that Seiki and simply call it Quit Game. And then I am going to select our restart button widget and say on Click for this guy we will add on clicked event and off of this I'm going to drag out a wire and call upon a function called remove from parents. What this one does is it actually removes our level complete menu from the screen. Then I'm going to right click and I'm going to get player controller. And then I'm gonna drag off of this and do a set input mode. And the Imp Ammon that I want to set is game on. Lee. Remember we had made it so that when we got to our level complete ah, blueprint, we were showing the level complete menu, and we were making it so that you could Onley, complete or only interact with that menu screen. Here were saying When we restart, we want to remove that menu screen and give the control back to our game, not the menu screen. In addition to that, we want to drag off of our get player controller, and we want to set show mouse cursor. And whereas before we were seeing, yes, show the mouse cursor. Now we want to say, Do not show the mouth cursor because again we're restarting our game. And lastly, we need to actually drag off of this and type in open level. And the level we are going to restart here is going to be level underscore 01 This is the actual function that is going to quote unquote restart the game. It's gonna reopen that level. So let's left click drag around this chap that Seiki. And I'm just gonna call this restart game. Then let's compile and save and we're gonna test out both of those options Gonna fly back over to where I have some targets to shoot, right click play from here. Got a few targets. Shoot, shoot, shoot! You points scored. Here is my level completed area. You see, I do have access to a mile. Quit. I have quit out. I'm just gonna change my play option here to be Ah, yeah. You know, when I leave my play option here, new editor window. That's fine. Um, and then I'm gonna fly back over to the beginning of my target area here again. We're going to right click play from here. And let's try out that restart Option targets. Definitely got some work to do. Building out my level, Pretty ing it up. Here we go. Way start. Obviously this time restarts me at the very beginning and low. But you can see my score is zero doubt My health is back up to full and I restarted at that . 120 seconds. All right, guys, that is going to do it all for this one. We are going to see you in the next one.
68. Game Over Menu #1: Hello, everybody in this video, Our goal is to make it so. Our game over menu appears whenever time runs out. So the way we're going to do this is by working inside of our BP game mode. Game play blueprints of Find Your Way on Over to this directory and then double click on your game. Old game played. Open it up. For starters, we want some music to play whenever the game over menu appears. So let's do like we did before and add an audio component. So I'm going to, firstly select my default seen route here. And it doesn't really matter if this is attached to the default seen route or not, because this is simply going to be triggering some music. I'm gonna click my green add component button, choose an audio component, and I will call this music underscore Game over. And with that selected over in the details panel, these sound that I am going to slot in for this is going to be the are underscore ship. I'm looking for Shep scale down 02 Q Now if you highlight this one, you can see that the path for this is in your engine content folders. So you should all have access to this. Now it doesn't really matter which sound you slot in. But this one I thought was decently appropriate for a game over type of sound again. You probably want a little music ditty here, but this is going to serve our purposes for now. And with that slotted in, we need to slide on down in the details panel. And this is something that you should make sure that you do for all your different audio components here. And I didn't do that right away for our music game component. Auto activate. We want to make sure that this is checked off and it should be off for the rest of these as well, because through scripting, we're going to tell this when we do want it to play. Okay, so that's gonna be all we want to do. Here. Let's jump on over to your event graph and where we've got this level complete script. Let's work right beneath here, cause the first thing that we're gonna dio is we're gonna left click, actually, and we're gonna drag out a marquee selection. We're gonna grab this whole level complete section of script, and I'm gonna hit control C to copy and then down below. I'm gonna hit control V to Paste. We're gonna take a little bit of a shortcut here. Now, you're going to see this warning here because we need a unique custom event. You can't have two copies of the same custom event so you can select this custom event, and we're gonna rename this custom that a custom event to be game over. And I'm typing this over in the details panel. And if I want to make this warning go away, you can simply compile, and that will get rid of it. And obviously, this comment block is not represent representative of what? We want this to be called. I'm gonna call this whole comment block game over. So now, up above, just letting you know how this is all constructed. We've got our level complete script right up above, and we've got our game over script down below in the Onley thing we've changed so far is the name of our custom event. We've changed the game over, but there is more We need to change in here. Namely, if we scroll on over to the right. We got to make sure that the widget that we show when the game is over is not the level complete widget. We need this to be the game over menu. And then if we slide on over to the right, we're gonna fade out our game music. But we don't want to play our level complete music. Instead, we want to delete this out and drag and drop in our music game over and you can drag and drop this right on top of this pin like so and that will do. Just find there. And that should be all we need to do right there. So with that done, you can compile and save. Now, we did create this custom event for game over, but there is currently nothing calling this. There's nothing to actually fire off this event. So what we need to do is jump on over into our functions. Over here, we've got this deck Ament timer function that we created earlier. If you double click on this guy, this is where we were deca menting our game time. And what we want to do is we want to say that if our game time limit equals zero, that is. Time's up. That is true. Then we want to call Dame over call function, game over. Okay, so with that, let's compile in save. And now I should be able to jump in and play to test this out. But I'm gonna take a little bit of a short cut. I see. I don't want to wait 120 seconds to have our game over. Menu appears. So what I'm gonna do is jump over to level old one time limit this variable right here. I'm going to change our level. A one time limit to be 55 seconds. And also note, too, that I am not starting from our main menu. I am starting from level. 01 That is currently the level you see here. So if I click play from here, I'm just gonna launch directly into level one instead of going through my start menu. So here we go. Play 5432 and one. And you heard my quote unquote game over music. They're more like a sound effect. And our game music did cut out. So everything is working as intended here in terms of the game over menu showing up. But you will notice that these buttons do not yet function. So that is to come in the next video. But mission accomplished for this video. We will see you guys in the next one.
69. Game Over Menu #2: Welcome back, everybody. In the last video, we went about making sure that our game over menu would appear on the screen when we ran out of time. In this one, we want to continue where we left off and make our two buttons interactive on game over menu. So to do this, we're going to come under our content. First project, you I folder and we want a double click on R W B P game over menu so we can work inside of here. And we don't want to be on the designer tab. We want to do some scripting, so we're gonna jump on over to the graph tab in the upper right here. So we want to make something happen when we click on the quit button. So with that, come along your my blue trim panel in select your quit button. And you may be wondering, Why does this quit button appear here in the my blueprints panel? Well, if you jump on over to the designer tab and you select your quit button over in the hierarchy, you will notice that over in the details panel, there is a little check box that says is this a variable that can be accessed over in the graph and it is checked. It did that by default, but it makes it so that when this is checked like it is over here in the graph tab, you have easy access to it. So that's good to know for any of these different widgets that you place over here in your hierarchy. The texts, by default is not variable, but you can check that to access that as well. Good to know. So with my quit button here, I want to add an on clicked event. So let's click this plus button. There is our on clicked event, and I'm simply going to drag out, aware and type in quit. And there is a function for this called Quit game and quit preference right here. You got an option for a quit or background. The one you want is simply quit, and that's literally all we need to do share. So I'm gonna left click and drag out a marquee selection. Tap that Seiki and label this Arquit game script simple enough. Next, let's select our restart button, and here we want to do something as well when we click it. So let's click right here. An added event for when we click on the restart button and the first thing we want to do when we click the restart button is too drag out, aware type in, remove from parents. What this function no does is it removes this widget from the screen. So you're basically saying, Hey, game over, menu. I don't want to see you anymore. Get off the screen. Next thing I want to do is Dragon Wire off of this and I want to set input mode Game on Lee . Since we are essentially restarting the game, we do want to get rid of the game over menu, and we want to set our input so that our game is the one that is accepting our inputs. Not any widget blueprints. Now it's seeking a player controller here, so what you can do is right. Click and type in yet player controller, and you can simply plug that in like so. In addition, we want to drag off of our get player controller in type in set show mouse cursor. Because this particular property lives within a player controller blueprint, make sure you hook up your execution wires like so and we want to make sure that this is unchecked. So we are essentially saying, Hey, set the input mode back to game on Lee So Onley our game can receive inputs and hide our mouse cursor by leaving that unchecked. Then, last but not least, we want to drag aware off of this and type in hoping level. In which level do we want to open up? Well, if we are restarting, we want to open up level, underscore a one. So I'm gonna type in level underscore 01 and there is our script for that. Let's frame it up for you all. They're left click marquee selection. Tap the C as in Charlie Key. Restart game. Let's compile and save. And then let's give this a play. And before I give us a play, I want to make sure that jumping over to my BP game mode gameplay. I did set my level one time limit back to 120 seconds. So let me set that back down to five seconds. Once again, I set that back to 1 20 between videos and compile and save that so that we have got a really short play session. We're gonna play 5432 in one. You hear our game over a quote unquote in music up here. Let's go ahead and quit. And that quit out as intended. And then we're gonna jump in. Employ, Wait for a five second time are here to expire. Once again, click on Restart and we re start again with another five second timer. Good times. All right. So everything is working there as intended. That's going to do to offer this one, guys, we'll see you win the next one.
70. Pause Menu #1: Welcome back, everyone in this one we are going to create a player controller blueprint and assign it to our BP game mode. Gameplay blueprint. Now from this player controller will be able to add script to enable us to pause and unp ause the game. Remember, we made that whole pause menu. We need a way to bring it up, and they player controller is an excellent place to put this functionality. So find your way on over to the Framework folder under your first project, we're going to right click. We're going to create a new blueprint, and this one is going to be a player controller blueprint. And it says a player controller is an actor responsible for controlling a pawn used by you , the player we will call this guy BP underscore player controller, and with that created, I'm going to save it right away, right, click and save. And what I want to do is I want to insert this as the player controller to be used when we are within our BP game mode. Game play under the authority, I should say of our BP game mode gameplay. Now this is a game mode again. That is running the show when we're actually playing the game. So I'm just gonna double click on this guy to open up and over in our class defaults. I'm gonna change out our default player, controller, player, controller class right there to be our BP player controller. Let's compile and save that. Next. Let's open up our BP player controller and I want to create a variable inside of this guy so you can see in your view port here. There's nothing really to see. This is more of a functional blueprint than anything. We're gonna create a variable, and this one is going to be called is game paused question mark. And if we compile, we've got a check box to determine if the game is paused or not. This is going to be of a Boolean type, and next I'm gonna jump on over to the vent graph and start scripting some functionality left, click and drag out and delete those existing nodes. Let's use the peaky p as in Paul to pause the game. So I'm gonna right click and just type in the letter p maybe p inputs. There is our list of input events. There's my peaky. So I will select that guy and I want something to happen when we press the peaky. Well, the first thing I want to do is do a check to see if the game is already paused. I'm gonna drag in this variable. We're gonna get it, Gonna drag off this and bring in a branch node. Hook this in, like so for when we press it. So if the game is not already paused, if it is not, we're then going to set our is game applause variable. I'm gonna hold down ult left, click and drag to bring in a center. So if it's not already paused, we're then going to change it to Okay, Now it is paused. And next, when I'm going to do is we're going to create the widget, create widget. This is going to be our pause menu. And of course, it's not just enough to create it. We then have to add to view port after this, we're going to drag out aware, and we're going to set show mouse cursor, and we're going to check this now. Before when we did our setting of showing the mouse cursor or not, we had to right click, and we had to get the player controller. Well, we are within Ah, player, controller blueprint. And if I was to actually select our class default button up here within our class of defaults, if I do a search for show mouse cursor, you can actually see that this property is showing the mouse cursor lives on a player controller blueprint. So that's why we don't have to get player controller, because we are within a player controller blueprint. The next I am going to drag out and do a search for set input mode, and we want to set our input mode to be game and you I Onley. And there's a reason for this, which we will explore in just a little bit for the player controller. Before we did a get player controller and plugged it into this. All we need to do is right click and say self to get a reference to ourselves because we are a player controller and just plug that in there now for the in widget to focus on. We're going to say, Hey, we want to focus on the Pause menu just gonna drag that out of our creation of a pause menu widget like, so I'm gonna double click on the wire to create a little reroute note here. And then what we're going to do is drag off of here and type in set game pause. This is the function node that is actually going to pause the game. But it on Lee is going to posit when we actually check this box. And I'm actually going to put a comment node on our set input vote game. And you I really quickly, um, we're going to address this again in just a moment. Why? This is set to set input mode in game. And you I only, But I'm gonna add a comment. Here's a quick reminder to you must they must set this so P can be recognized again when the game is paused. We're gonna run into a problem intentionally. When we first get this up and running, and then we're gonna fix it. This has to do with that aspect. Okay, so that is going to make it. So now when we are in our game, if we have not already paused the game, we're gonna set it to be paused. We're going to create that pause menu widget. We're gonna add it to the View port. We're going to show the mouse cursor. We're gonna set it so that we can control our actual US screen, and the game will be paused. Let me just compile this and save and jump in and play. Note that if I press sorry by jump in, if you right click on the screen, by the way, your mouse cursor goes away. So that's why I'm restarting. So I'm gonna play. Here's my mouse cursor. If I try clicking the peaky to pause right now, nothing happens because our game mode game play blueprint is not overruling is not lording over our main menu screen are Start Menu. Remember, we created a separate game mode for that, but now when I jumped in and play, if I tap that peaky, I can bring up the pause menu. Now. Thes buttons are not functional yet, and if I press the peaky again, nothing will happen. There is obviously still more work to be done before I continue on. I want to jump over to my game mode gameplay blueprint. Really quickly because I noticed I have not set Are level one time limit back to be 120 seconds. I don't want our level to end that quickly. Eso I'm gonna change it back from 5 to 120. Compile and save this. You notice that I am compiling and saving all the time. If you want to save your self a step here, by the way, you can click this little drop down menu and you can say you can save on compile always. I am just so obsessive compulsive about compiling and saving that I often times don't do this, but know that that is a really handy trick to save you a click. You could just save your game automatically when you compile. Okay, so with that done Ah, we have built off Are false branch here. What about if the game is already paused? While we need to build some script off of that, they're true branch. So what I'm gonna do is off the true branch. We're gonna drag out aware, and we are going to We are not going to drag on a wire. We're going to actually bring in another center for is game pause holding down Ault left clicking, bringing this guy in okay. And off this true branch, we're going to say if the game is already paused, we are going to uncheck this. So now is the game pause? Nope. New. It is not going to Essentially, I'm positive. Okay. Next, I'm going to drag off of this in type in remove from with one I'm looking for is called Remove from parents and I can't find it right now because we have a context sensitive checked on here. What I'm trying to remove is this a pause menu widget. So what I can do is drag off of this because I'm going to need to plug this into this note anyways, remove from parent. So now this will show up in my right click menu because this is contextual removed from parent removes a widget. And in order to find that I have to have a widget as the target when I am not within a widget blueprint, I'm in a player controller blueprint. Okay, so then, with that done, we are going to show mouse cursor since we're unp. Aw, zing it. We want to not show the mouse cursor were returning back to game play. Then I'm going to drag out a wire and type in set input mode Game on Lee because we're returning to our gameplay for the player controller Aiken Simply right click and say self because we are working within a player controller blueprint that would give us control over just our game. No menu screens then lastly, we're gonna drag off of this and say, Set game paused and leave it unchecked because we do not want to pause the game. Okay, so this is our entire pause slash unp ause script. There's still gonna be a problem remaining, which we're gonna fix up here in just a moment. But with all that done gonna left, click and drag tap that Seiki, This is our pause flesh unp awes functionality. Okay. And if I was to jump in and play right now, you will see that if I tap that peaky, I will pause the game right away because we're going to check is the game pause and by default, it is not. But I can press that peaky again. Well, we need to do in order to make it so that you can press this pause key this peaky to pause and unp ause the game is select your P event and then over in the details panel. There is this option to execute when paused. We need to check this on and this will make it so that then we can pause and unp ause the game by pressing that peaky when the Pause menu is either up or not up. That is why we also set our input mode here to be game and you I only so that this whole system for pressing the peaky will work so I will compile and save. Let's give us a quick play just to make sure this is gonna work. Now remember, the buttons on a pause menu are not going to work just yet, right? So I'm controlling my game. Could hit that peaky deposit. There is my mouse cursor. I can't click on these yet press that peaky once more. UNP awes, pausing it. You'll notice that my timer is frozen. I can't control anything, Pete. On pause, we have a functioning pause menu. Pretty sweet. I should say interactive pause functionality. Our menu is not functional just yet because that is going to be coming up in the next video . That is going to do it all for this one. Guys, we'll see you in the next one.
71. Pause Menu #2: Welcome back, everyone in this video, we're going to make the buttons on our pause menu Interactive. And I'm actually going to jump into our W B P pause menu to obviously make that functionality happen. But also because I want to add 1/3 button here. We've got quit and resume. What about restart, Huh? What about restart? Why not have three options here? So what I'm gonna do is I am going to right Click on, say, Arquit button here. I'm gonna copy this. I'm going to paces to our canvas panel, and I will simply call this one hitting F two on that will do. Restart, underscore Button. And I'm gonna call this one Hitting F two on it. Restart, Underscore Text Now, obviously, it still says, Quit on here. So with that restart text selected, I'm gonna change that to read Restart. And how about we position it so that quit is along the left hand side? Restart is going to be in the middle and resume is in. Well, actually, let's do resume in the middle and then restart. Maybe on the far right? Something like that. Okay. Um, I need to position He's a little bit better, though. So let me start off with our quit button here. And I've currently got position X of negative 400. Let me go Negative 600. Nudge that over a little bit and I'll select our resume, but in here. And I have positive 600 for that. Or let it currently 400. Let me change it to Position X of 600 then with our restart button. Here, let me go. Let me see here. I had position excess 600. Let me ggo. What should we do here? Let's go 400 for this in the why and then for the X. Let's g 00 there and that will center it up just nice. Okay, so we got three buttons. Now, let's add the functionality. And to shorten up our time of implementation here, I'm gonna borrow a little bit from our level. Complete menu. Double click on that guy to open him up. Jump on over to our level complete graph. And we've already got quit game and restart game nodes. And here. So I'm going to left. Click. Highlight those nodes right there. Hit control C coming back to my pause menu in the graph tab Control V. Let's take care of the quit button first. So select the quit button Do on clicked. Of course, it's gonna bring that event node towards the bottom. We'll hook that in left click Seiki, quit game. Then we've got restart game. I'll select my restart button on click and that will restart our game. Now the the new one here is going to be the resume game. So let's select our resume button will do something when we click it, And right off of this, I'm gonna bring in a sequence node sequence and I'm gonna check the ad pin one time two times and let's go a another time. Gonna have five things happen when we resume. The first thing that we're going to do is we are going to get player controller and then I'm going to drag off of this and say, Cast too R b p player controller hooking this in like so And we are going to drag off of the SBP player controller and say, is game a pause? We're gonna talk to that variable, we're going to set it, and we're going to say that when we click that resume button that this is empty. No, the game is no longer pause. We're going to resume play. Okay, then. Dragging off of our get player controller is, well, we're going to type in set show mouse cursor. And because we are resuming play, we do not want to show the mouth cursor. So leave that blank. Then let's drag another wear off of get player controller and type in a set input mode to be game on Lee, because we Onley want control over the game were a NPAs ing it. We're making the menu screen go away so we only want control over our game. Next, what we're going to do is drag a wear out because we are within our BP WPP Pause menu. I can simply do a search for remove from parents and because we are within our widget blueprint here, I don't have to find a target. Our target is ourselves. This is a thing that we want to remove from the screen. Lastman Ali's I'm going to drag aware off of the than four and typing set game paused, and we will leave this unchecked. We want to unp ause the game like so So drag a marquee selection around that tap that Seiki and this is gonna be resume game. All right, so now we should be able to resume our game by clicking on that resume button or simply pressing the peaky. So let's compile and save this and run through all those different scenarios. Here we go. Play level one gonna hit that peaky. First thing I'm gonna do is I am going to quit. Okay, that works. Play level one hitting the peaky. I'll hit the peaky again. Just three started. Okay, You could see my timers down to 1 14 Hit the peaky. Now let's restart. That should restart my timer and everything is well, you can see it did restart my timer. So I'm gonna hit the peaky again. I'll hit it again. We're at 113 seconds. So I posit. Now when I resume, I should be back in about 1 11 seconds, which is right where I was that before. And there we resume. So that is working as intended. All right, guys, we have a fully functioning end to end game. In the next video, we will take a look at how it is all shaping up. We will see you guys in the next one
72. Troubleshooting: Welcome back, everyone. We are in the process now of wrapping up our project. And in doing so, I wanted to take a video out to troubleshoot some potential problems that may creep up as you're trying to build and work with your project. So to get things started here, the first quote unquote problem that I'm gonna point out is a common issue that many people run into when their first starting out with unreal. And it confuses many people. And that is when they click the play button. And then they used a W A S and D keys. They're like, Hey, I can't move around. What is going on? Why can't I take control? And the reason is because you have to click in the view port first before you can actually take control of your character. So that's not really a problem. But many people want to know, like is there way I can take control of the game without having to click in the view port first? And the answer is yes, there is. The way you can fix that is by coming under this play drop down menu, choosing advanced settings, and this is going to jump you over to your editor preferences. And there is an option at the very top here that says gain gets mouse control. You check that guy, then you jump back in and click play. I'm not even clicking on the view. Poor window. But as soon as I oppress W A s and D, I immediately have control over my character. So that is a good quote unquote issue to fix for many of you. All that are wondering about that now an issue mawr specific to this project that I could see some people having is when they are bringing out an individual target. It doesn't matter if it's a 100 pointer. Ah, 500 point or 1000 pointer, etcetera. A lot of times what I noticed people do is they forget to set is stand alone target to true . So the police is out here, they'll overlap the trigger volume. They'll be like, Wait a minute, it's not spawning in what is going on. You got to make sure that with any individual target that you're placing out here, that you are checking this box for is stand alone Target. Now remember, we have exposed all of these variables here in the editor. So you can change how long each of these targets to stays active before they go away too. So that's optional good functionality right there. But make sure for any single standalone target that you place on your level, you gotta check. This is stand alone target box, another issue that I want to point out as it pertains to targets. And I made this mistake earlier when I was building out my level is any target spawn. And I'm gonna place a new one out here to demonstrate it because I don't want to wreck anything that I've currently got out here. Let's see Target spawn, er si se a place one right at the edge of my riverbed here. And let's say suddenly I want to make it so that my trigger box here, which is denoted in this yellow outline, is much, much bigger. So I go and stretches out like this, right? And maybe I stretch it out, making a little bit taller, etcetera. And then I jump in and I play from here. I'm gonna be overlapping. A few spawned triggers, but you'll notice that some of those targets like crazy stretched. What just happened there? Well, what just happened is that I was scaling the size of the spawn that trigger as opposed to the spawned trigger a volume. You'll notice that some of those arrow components are looking rather stretched. And I believe that was when I just placed right there was this guy. It was that guy. So you'll notice that I've got BP targets set Sponder 10 here, and I just scaled the size of the overall set to spawn. Er, what I really meant to do and you can see my scale settings right there. What I really meant to do is I wanted to change the size of my trigger volume here, So I should have selected my trigger volume component in skilled that because if you select just the actor, the actor itself and scale, it's going to scale everything, including the size of the targets that spawn in as well. So just be aware of that. Next let's talk about some bill there's that may crop up for you, especially if you use this soul city pack to build out your level. I need to jump on over to my Google doc really quickly here to show you some of the build errors that I got when I built I got some errors for over lapping u V s. Now note that errors are not Ah, game breaking. You can still play your game. You're just gonna have some things wrong with them. In my case, my slums scaffolding was not being illuminated properly because of overlapping UV. So if you have an error such as this, how can you fix it? Well, ah, demonstrating this, I will jump back into unreal. I will go into my soul's city, pack your type in scat folding if I can spell it properly. Now, I fixed it up for this piece of scaffolding wells as well as a couple others. But I'm just gonna pick when it ran him here to show you what I did along the top toolbar Here, you've got this button for UV and you can select U V. Channel zero or you the Channel One. What we can dio is actually generate a new light map, UV. So to do this and I will actually do it for this one. I don't I don't think I'm making use of the scaffolding is Well, um, I'm gonna go into the details panel and in the section called L O D Zero, you've got this little check box for generate light map you weise. And if you check that guy, this applied changes button will now illuminate. It's going to say, where would you like to generate thes light map? You weise? Our destination light map index is going to be index one, which is essentially that index right here. The one we're currently looking at right here. And you could see that there is some overlap Ege right here. It's not all within this bound. So if I click this apply changes, you can now see that it is updated Our UV channel one to look, All went. This looks pretty. Doesn't all nice and organized. OK, but that is not all that needs to be done here. If we keep scrolling down in the details panel in the general settings, there is the light map. Coordinate index, Where is that guy like map coordinate Index, make sure that that is one as well if it isn't already okay, because up here we were saying destination light map index should be one. And here we want to make sure that light map coordinate indexes, also pointing to one as well. So now if you save the mash and then you build, you should not be getting built airs for that anymore. So that is the way you can fix up some of those overlapping UV issues you may be getting with some of your soul. City scaffolding, static meshes another air. I wanted to point out that I got while building was I had some severe performance loss for a few of my lights. Now a really quick and easy way to fix some of these issues saying, you know, severe performance loss, overlapping lights, stuff of that nature is you can simply select that light and let me see. I got BP flickering lights seven. So let me navigate to that guy My level flickering light seven. Double click on it. That guy right there. Okay. What you can dio is with that particulate actor selected there is BP flickering lights seven focusing on that guy Mother is over here that one. You can change its mobility to be static and then when you build it will get rid of that error as well. All right, hopefully that has helped alleviate or solve slash fix some of the issues that you may be having keep some of those things in mind now. Other resource is that you can seek out unreal Engine four has ah community. Ah, very helpful community that will help you with some of these questions. You can go on the unreal engine for message boards. They have an area called Answer Hub as well Where you composed to question and people that work at epic games will try to help solve your questions as well. I use it all the time. Professional developers use it all the time. There's no shame in that. We all get stuck from time to time. Hopefully that helps. Alright, guys, that's going to do to offer this one. We will see you win the next one
73. Project Postmortem: All right. Welcome back, everyone. We are just about set to put a bow on this project. But before we do, I want to take some time out for reflection and self evaluation. Want to go through a process known as a project postmortem, where we think about what went right, what went wrong and what could be changed in the future so that we could do this all better the next time. Now, this project postmortem process is something that a lot of developers go through self willingly at the end of a project so they can figure out Hey, we did okay, this time out. But how can we be better in the future? Because that's all that really matters. So if you don't believe me, I'd like to direct you to the Google. A moment and a website that a lot of professional developers know about gamma suitor dot com. A lot of times they will post project postmortems up on their website. Here is one from Resident Evil four. And again, this is a place where the development team reflects self evaluates and the list out things about what went right with the development of the project. Improved technology, you know, improved workflow, that sort of thing. Usually it's about five points that the team will hone in on. And then what went wrong, Right. I know a lot of these things do tend to be process oriented, not necessarily having to do with how good the project turned out. But they can be either process, orientation, type things or things with the project themselves. So before we do, our own project pours postmortem here, I just want to play through our level and see what we got. See what I have So you can see what I did. Well, in what I did not do so well, here we go. Lacking a sound effect on that door. Don't really like that. Find those targets a little bit. Hard to see sometimes I did like the flexibility of the sets. Ponders how much power that gave me as a designer. A lot of parameters that I could specifies. I was building this out. I'll try to catch its next elevator on over. Okay. I do like the rain. Quite a lot again. Here's that. No sound when I'm opening up the door. Just find those targets a little bit hard to see. I like the flexibility that I built in with some of these fans here, making it so that some of them could spin faster than the others. I can see that some of my lighting here is a little bit dark. It's just too dark in this section. Obviously, I know I've got a sky without clouds in it, although it's raining anyway, that you really take great pains to ensure that it was realistic or anything. Catch this on over. I'm getting close towards the end of my level here. One thing that I'm not going to be exposing for you here, that I know I did not like is that when I do die by touching the water, the water would turn if I landed in here. It's too dark as well. But when I landed in the water, it sets me to respond way back, beginning of level, which with sometimes oftentimes not enough time for me to get back to the end of All right . So there is my completed project pens and let's evaluate what I did Good. What I did not do so good. And what could be done better in the future. Let's start with what I thought went right. I think one thing that went pretty well was getting the level scale and character metrics mostly right. Do do the pre planning that we did at the very outset of the course. Now I did modify some of my characters, jump parameters and speed and even the outlay of the level a little bit as I went through the creation of this project. But it didn't deviate too far from my originally intended design here. One thing I definitely did is our fan corridors here. That's where are Player had to pass through the spinning families. I definitely widen them out. I thought I was going to make them more narrow, but I decided I wanted and needed to make them a lot wider than I actually did. I didn't add this last bend at the very end of my map. Didn't feel a need to didn't feel a need to add this balcony. But in general, the actual scale of this map was pretty darn close to what I had in the end. So I thought that one pretty well, something else I thought one pretty well was the targets spawning in the set sponsors at a lot of flexibility that I really enjoyed all the parameters. Let me bring in our set Sponder here. We exposed a lot of variables here to the editor, and that gave me a lot of power that I really enjoyed. So says Sponder. Big win. I thought that worked out well, something else that I thought ended up working well, that I wasn't originally intending on a little bit of emergent gameplay that I had going on over in this area. I had these targets that I kind of place behind the spinning fan blades, and it made the targets to shoot them a little bit more of a challenge because I kind of had to work around, shoot around the spinning families. So I thought that worked out pretty well as well. Now let's talk about things that went wrong and that I could do better the next time one and I can see it right here. I don't think I made my target art nearly noticeable enough, especially in these dark and quarter doors. You can see my five point targets right here. I thought that they were a little bit too hard to see. Now there are a few ways that I could have made them more noticeable. I could have in either the parent blueprint or even in any of the child blueprints. I'm just gonna open up the parent blueprint. I could have added maybe a spawn in any spawned out particle effect and activated or deactivated Ah, the particles, as they spawned in and out. Maybe even a looping particle that plays around the targets while they're hovering in midair just to make them stand out a little bit, maybe even at a sort of border, another mesh behind the main target here just to help it stand out a little bit more for me , I thought that the targets did not stand out nearly enough, especially the point targets. Um, I already mentioned that I did not like the fact that I omitted adding a sound effect for opening the door. That would not have been too hard to do if I open up my BP door here. Here is our open door script. I could have simply made it, so that may be right in here or anywhere in here I could have done a place sound to d or at location place sound at location and played a door opening sound somewhere in this script. So that's a my bad right there. I should have caught that as well. Let's see other things that I felt could have been better. You may have noticed that when I played the game, I didn't give very good feedback when getting a time bonus or a speed bonus. And I did that somewhat intentionally cause I knew I was under a time crunch putting together this course. But you'll notice in my hut now try to get a time bonus. Here, let me just jump back in and play in really quickly. Uh, and, uh so my time bone is my time in the upper right. When I shoot this, you don't see anything in the upper right there flickering or making that my current time more noticeable, that I added some time to my total same thing with when I shot a speed boost target. There was no visual indication on the screen whatsoever that my character could actually move faster, so those are things that I would improve upon next time as well. And I would do that through creating more robust script. In my hug, you I to maybe make my text grow. That is this text right here. When I added some time, maybe I'd have something slide in from the side. There's something called widget animations that I didn't talk about. Um, what else could I have done? Better? Well, um, as I mentioned, I did not like the fact that every time I would die playing my game, I get respond back to the very start of my level when I touched the water, for example, and I knew that that was going to be somewhat of a problem. But to create a checkpoint system was gonna add a lot more video. So I opted not to do it. And it's probably a little bit more advancing. It is for beginners. So maybe at some point I had bonus videos for that. Let me know if you are interested in those last thing. Obviously, this is not much of a game. The fact that were traversing through this level kind of racing against time to shoot targets. It's really not that interesting of the game to make it a little bit more of a game. It might have been nice to at least have a leaderboard, too. Ah, Comparator scores against others We didn't include that in this course is well, I have that included in another Pac Man style course. But that adds a whole lot more videos in his beyond beginner level as well. So there's some things that I would have changed or done better next time. Um, let me know of some things that you may like to see in the project. Maybe I'll add a bonus video. If it's not too bad, let me know. Okay, that's gonna do all for this one. Guys, we're one step away here from packaging up our project and putting a bow on it. We'll see. Win the next video.
74. Packaging a Project: Welcome back, everyone. In this video, we are going to show how to package a project into its own execute herbal so that you can distribute your fine work to others so that they can play it on their computers. Now, what is packaging? Well, packaging is a process that ensures that all coding content is up to date and in the proper format to run on the desired target platform, which for us, is going to be our computers. Now, I am working on a Windows computer, so that is the one that I will be making a package for now before we can package our project and ready for distribution here, there's a few things we need to get in place. I need to add some script just to make it so late. We can see our mouse cursor and exit out of the game should we want to hit the escape key and quickly exit out. So we're gonna take care of that 1st 1st area I'm going to work within is our w B P start menu. Open up that guy and we're gonna jump on over to the graph and in some empty space, there should be some event nodes here by default. And there's one called event Construct that I deleted out between some videos. We're gonna add it back in here, right click. It's called Event Construct. This is sort of the event. Begin play for widget blueprints. You can think of it kind of like that, and right below this I'm going to right click and I am going to get player controller and I'm going to drag out of here so that I can set show mouse cursor, the show mouse cursor property lives within our player controller. So we want to say that when we start up our main menu here are start menu that we yes, we can see the mouse cursor. Ah, and in a package project, this is something that you want to do before you package it. So on the left, click and drag that Seiki show mouse cursor. Let's compile and save that. Okay, that one's good. Next thing I want to work within is our start menu level with jump on over there and then I want to access. I have some lights in here for some stuff. I was messing around with getting delete that out quickly. I'm going to jump into my level blueprint doctors along the top. And in here I'm gonna find some empty space, right? Click typing escape and off of this simply dry. Got a wire and type in Quit. I want to make it so that if we press the escape key while we're in our start menu that we will quit out of the game. So let's compile and save that. So next thing we need to do is jump on over to our framework blueprints gonna open up our BP player controller. And this is the player controller that is used when we're on level one. This one is not used in our start menu. If you remember, right, Just gonna jump back to our start menu over here in our world settings here. We are not using our BP player controller here, which is why I put the ability to quit out in the start menu level blueprint. However, when we're in a level, I am going to put our quit out functionality using the escape key right here in our BP player controller. So I'm gonna right click type escape, drag out, aware typing quit, and that should be all we need to do in this one. Now I understand that you can, you know, pause the game with your player controller when we're in there using this functionality, and you can press quit from the pause menu screen. But I just want to give players and easy way to quit out of their game as well in my package project. Okay, so with that done, the next thing we need to do is access our project settings. I'm gonna exit out of here. In here and along the top toolbar you've got your settings will come into project settings and over in your maps and modes right over along the left hand side, you need to set a game default map. Now, this is a map that will open when you open up or you click on your execute herbal for your project that we're about to create. So we want to make sure that this is set to our start menu. We've got her editor started map, which is the one we're going to default when we open up the editor. The game default map is a map that we default to when we start up are executed ble project , so make sure you set that to be start menu. Also, just a quick sanity check. Make sure you've got your game instance class set down here to be BP Game instance. And then these air my other project map mode settings as well. BP game mode. Gameplay is my default game mode. This is my default player controller, etcetera. So make sure those lineup next thing we need to take care of is jump on over to our packaging settings right over here. And we've got this build configuration option over here that's currently set to be development. I'm gonna change this to shipping now. What is the difference? Well, when it's set to development, you can access things like console commands, which I didn't talk about in this course at all. But that's basically a way to add some cheats to your game if you need to or access some information like frames per second, that sort of thing. You can also see any Prince string nodes printed out to the screen if you are in build configuration development. However, if you are in shipping, your basically saying no my product is ready for the store shelf. I don't want to see any of that stuff. So I'm gonna set mind the shipping cause Yeah, it's good to go. Right. Um, next thing we need to do is right below. This we need are staging directory. When we package our project, Where do we want it to go? I am going to be putting mine on my desktop. But if you click these three buttons, you can determine where you want yours to live. So just for easy access, I may recommend putting it on your desktop as I am. Um, what else we got here? Full rebuild, if enabled, a full rebuild will be enforced. Yes. I think that is a good idea to fully rebuild your project, I would recommend doing so. Next thing we need to do is determined our supported platforms. So next option down over in the project settings again. I am working on a Windows machines, so I'm going to uncheck all platforms and unchecked everything here except windows with that cross our fingers here. Hopefully, everything should be good to go jumping back to our main editor coming under our file menu . right down here. We have the option to package our project and you can see there's an exclamation point next to everything we said was not Windows, But Windows does not have an exclamation point next to it. Weaken package for Windows 32 bit or 64 bit platform. I have a 64 bit platform. I don't know what you have. Newer computers should be 64 bit, but older Windows platforms, You may want to go 32. I'm gonna go 64. And when I click on this, it's gonna say, Where do you want a package of project? Once again, I'm gonna say desktop is just fine. And I'm gonna get this little message saying we're packaging the project for Windows 64 bits. Now, this process can take some time. Depending on how many assets you have in your project. You can show your output long if you want to see what it is all going through at the moment . I am going to pause the video here and come back when this is finished seeing a little bit . Okay? My project has just finished packaging up and I got a little notification in the lower right hand corner of my editor as well as I heard. A sound effect plays well with my project finished packaging. I have since closed out my output long here it had some legacy warnings dealing with some soul city assets that were not my problem. I am not going to worry about those for now, but I am going to jump on out to my desktop and what I'm looking for is this folder right here called Windows. No editors. If you are looking to distribute your project to friends or family members send, send them this whole folder of goods because inside of here is your project application as well as some other folders. All you need to do to play your project is double click on this. There we see our main menu, and if I was to just simply hit escape from here, it will back right out. Because we just added that functionality. We're gonna double click again in order to actually interact with the button I must click on the screen for So I'm gonna click. Choose level one. Let's give us a quick spin after open open, make sure everything looks like it is working. All right, frame racing going just fine. And everything seems to be in fine working order. So, no, that if you wanted to distribute your project, send them this whole folder. You can't just send out this application. These folders air needed as well, guys, that is going to do it for this entire project. A big thank you all for joining me in all the kind comments that you have passed along. If you would like to lower with me in the future, I would love to have you back again. I'm always creating new courses online, so feel free to seek me out again. My name is Mr Wandera. Thanks for learning with me. See next time.
75. Making It Rain: Welcome back, everyone. In this special bonus video, I am going to show you guys a couple methods to make it rain in your level. And I do believe it would be appropriate to make it rain. Since our Soul City Content pack has some assets that make it look like it is raining, For example, throughout my entire level on my floor here, I place this material that looks like raindrops are falling upon it. Now, if I'm to move up in our sky a little bit, you don't actually see any rain falling whatsoever. But our material, if I scroll on down here a little bit, looks like it is so the 1st 1 I'm going to demonstrate. Getting rain in your level is a rather brute force way of doing it. And that would simply be to come into your soul city pack in the content browser. Let's do a filter by particle systems and in my search box up here, I'm just gonna type in rain and one I am looking for Is this p underscore rainstorm. You can drag one of these in here, and as soon as you let it go, you can see that you've added some rain to your level. But you will notice a problem that is immediately apparent. If I am to move over to the right here it his Onley reining in that small stretch back over here. It is not raining it all and way over here. It is not raining it all just in that one little sliver. So a couple ways, you could go about fixing this and one would be You could place a whole bunch of these rain particles all throughout your level to encompass it all. Or you could come into the rain particle asset itself. Double click on it. And in here there are some modules related to this emitter related to how this rain particle falls, how big it is, how long it lives, etcetera. For example, you could come in and adjust the initial location at which this particle emitter is spawned . Now, we didn't talk about this at all throughout the course, the Cascade editor here and honestly, I don't really want to get into this too much, but I do want to just point you to where you could possibly make some alterations to your P underscore rainstorm particle. Ah, a little bit of warning here. If you are going to go this route of modifying the particle itself to be much bigger to spawn a lot more rain drops, etcetera. You may want to duplicate this asset first, So that is how you can get rain all throughout your level. And of course, if you're gonna have some rain, you probably want some sound to back it up. So to go with this brute force way of placing a lot of these particles throughout your level, we could add some sound of rain by coming under our blueprints tab along our toolbar and let's jump into our level blueprint. Now our level blueprint is where we can write scripts specific to this one level. And you see a couple event knows that live out here by default. I'm going to get rid of this event, tick. But I do want this event begin play, and what I can do here is simply drag off a wire type in play sound to D. And there is a sound asset that lives in the Soul city pack called rain heavy. It doesn't really matter if you use the queue here or the way of file, but I generally like to use the Q if there is one. And so this should be enough for us to hear some rain while we are playing. So I'm just gonna compile that and save and then click play. And there you can hear some rain going out in the background. Obviously, you can't see any rain yet because I place our rain particle way over here. Rain itself. So there you go. That's the rather quote unquote brute force way of getting some rain in your level. Now, I'm just gonna get rid of this bit of script here in our level. Blueprints compile and save this. And then I'm gonna exit out of my level blueprint. And I'm also going to nix out, get rid of my reign particle here because I want to show you a second somewhat tricky way of adding rain to your level as well. And this is perhaps a more performance way of adding rains. Your level, um, and way I'm going to do this is I'm gonna jump into my first person blueprint. BP, select my blueprints folder here. I need to make sure that I clear out my filters here. So let's exit out the rain. Let's get rid of this particle system, filter by right, clicking on it and removing it. And I'm going to select my first person character. Let me just exit out of that real quick and I'm gonna jump into my view port. And what I am going to do is I'm actually going to add a particle system and an audio component here as components to make it rain over the top of our character. So with our capsule components selected here in the components tab, let's add a component. Let's add a particle system and I'm gonna call this the f X underscore rain and then over in the details panel, I can slot in my rain particle. And that was the rain storm p underscore rainstorm, and you can see that already it is raining above our character. And then to coincide with that, I'm going to select our capsule component once again because I want this component to be attached to our capsule component. That is to follow us around all nice like, and I'm gonna add an audio component here, and I'm gonna call this s f X underscore rain. And with that selected over in the details panel, I can slide in that sound cue rain. So now check it out. If I jump in and play from here, it'll just take a moment there. But you can hear the rain, you can see the rain and now you'll notice that the rain is essentially following me wherever I go. And people are none the wiser that it's not actually raining way off in the distance. Now, this is a somewhat tricky solution, but I'm gonna point out a few Gotsche is to know about that. You may want to work around. Ah, some got just to know about our If you get a speed boost of sorts or if you have tweet your character movement components such that your character moves around quite quickly, you can outrun your rain particle. So let me just quickly change my character movement. Max walks be Let me double action Let me triple instead of 600 I'm gonna go 1800 compile and save. And if I play be raining a little bit, let me get out into open space. I can really dental this And now you're gonna see I'm outrunning my rain and then it catches back up to me. So that is a little got you to know about. And then one last got you to know about. Actually, I just jump in and play. Is that that trick really only works if you are completely in an outdoor environment like I had a roof over my head kind of like I had this little awning over my head. Right now, it's just gonna rain right through it. So that's probably not what you want is gonna break immersion a little bit. So just be aware of that. Alright, guys. So we just demonstrated a couple ways that you could go about making it rain in your level . Hope you found that useful. We will see you guys in the next one.
76. Customized Projectile: Welcome back, everyone. Another special bonus video for you. All in this one we will be customizing are projectile. That is we will be changing the look, the sound and even the feel that is adding some force feedback for all you controller users out there of shooting our projectile. So let's get right to it. I am in my content first person BP Blueprints folder, and we're gonna double click here on our first person projectile. And the first thing we want to do is change the look of our projectile because hopping over to our view port here, it's kind of bland. Just this yellow ball. Let's do something a little bit more interesting, shall we? So let's click on our sphere static mesh that is this yellow ball and let's change our associate ID. Static mesh to be shape underscore. Narrow capsule. Now it's a little small for the time being, but we're going to stretch this guy out here. So with that still selected, come under your location, rotational settings, etcetera. We're gonna firstly change the location in our X to be negative. 50 rz. Here is this weird value. Let's just change that to be zero as well for the rotation. I'm going to set that to be x of 1 80 The why is going to be negative. 90 in the Z is going to be 1 80 as well. And then I am going to change up this scale settings here. So we've got scale X of 0.1. Why off 0.1? But I want to set the Z to be one point. Oh, so something kind of long now, You see, I just made everything big. And the reason for that is because I got my lock setting here, so I need to unlock it. Let's change my ex to be 0.1 the y to be 0.1. And we do want rz here to be one. I'm essentially going for a Star Wars Blasters shot type of thing. Okay? And to help reinforce that, I'm also going to change out the material here to be you just type in Vertex. Not Vertex, but Vertex. There is a red one in here that I want to use this vertex red Onley. So now you got some sort of a glowy red color, okay. And then I want to select our projectile component next. Few things I want to change here. I want to make this go a little bit faster. Gonna change the initial speed here to be 8000. The Max speed is also going to be 8000. And I'm going to say I do not want this to bounce. So I'm gonna uncheck My should bounce here and the projectile gravity scale. I am actually going to make this b zero as well. Gravity is not going to affect this laser shot. Okay, with that done going to compile and save here quickly next, we're going to jump on over to our event graph over here and towards the end. So this is our script for when our projectile hits something. And towards the end here, we've got this destroy actor and there's a little note here that says, Then destroy this projectile. Um, I'm going to remove this simply is selected and deleted out here, going to get it back there in just a little bit. But I want to remove that for the time being. And instead I want to move towards the front end of this script and let me just make my event graph here a little bit bigger and off of our event hit here. I want to add some script in this area. The first thing I'm gonna do is I'm gonna drag a wire out of my event hit, and I am going to spawn an emitter at location. Let me just bring this all appear like that. Um and I'm going to say that the emitter I want to play is p underscore Explosion. What am I doing here? Well, I've made my projectile not bounce. So what I want is for this laser shot to play a tiny explosion when it hits something this event hit is going to fire off when our projectile hit something. And so we want to play a little explosion. Right now, my scale settings are all at one across the board. I don't want it to be a big explosion, so I'm gonna set it to be point to across the board and next I need to specify where am I going to play this explosion at? Well, I want to play it at the hit location. So when this projectile hits something this event hit is going to output. The hit location. And so I can plug this into the input of the location for where to spawn the emitter. Okay, then what I want to do is directly after this spawn emitter at location. I'm going to drag aware off of here and say Destroy actor and your wire should be flowing like so let me just back this up a little bit. So as soon as our projectile hits something, we're gonna play an explosion, a little explosion at our hit location. Then we're going to destroy the actor which actor ourselves. That is this projectile blueprints. Okay, with all that done, there's a little bit more work I want to do. But that's going to be done in the first person character. So let's just compile and save this quickly. So then jumping over to our first person character blueprints at this location, there is some script that already exist in here for spawning the projectile. And so find your way over here and over to the right. Where we are spawning are actor, first person projectile. There is this place sound at location. I am actually going to swap out this sound, and I have actually imported another sound effect that I'm going to use That will sound very familiar to Wall. I have called it s Effects Blaster shot. I'm not going to share this asset with you all because I I don't have the rights to it. But I have permission for myself to use it for demonstration purposes, but I cannot distribute it. So I'm just going to compile and save this quickly. And so now if I jump in and play, there's still more I want to do. But I'm just gonna demonstrate what we've got so far. So make sure you compile, save play and you can see a little explosion playing. Our projectile is not bouncing. You're hearing that blaster sound effect. That's pretty cool right now. Wouldn't it be even cooler if we could make a hooked up controller rumble? I think so. So let's take care of that now. Simply move on over to the right here and we can extend this flow of act of execution after we've spawned the first person projectile and played the sound. We're simply going to firstly, right click, say, get player controller. And after we've done that, we're going to drag out of here and type in play dynamic force feedback. So this note is going to play some force feedback on a controller that you may have hooked up. So make sure you plug in your execution to the start, and it's asking for an intensity and duration. Now, you can fiddle with some of these values. But I tried some of this before recording this video, and I'm gonna go with, like, 0.5 for intensity in a duration. I'm gonna go with something like 0.1. Let me just compile and save. And I do have a controller hooked up to my computer. So let me just try this out clicking play. All right, So now if you do have a controller hooked up, which I do and you fire a shot, you will feel a little force feedback to me. I could actually spend some more time tweaking and tuning that value, but fiddle with that until your heart's content. Alright, guys, there we go. We have made a customized projectile hope you like that one a lot. We will see you guys in any future bonus videos we add. See you later