‫Hello and welcome.
‫In this lecture, we are going to be making moving platforms that look a little bit more visually appealing
‫like this by using blueprint child classes of a C++ class.
‫Let's dive in and see how it works.
‫So enough with this white cube.
‫Let's start using some of the assets from our asset pack.
‫Now, with these moving platforms, we don't want to be reconfiguring them every single time that we
‫create them.
‫So this is where blueprint classes come in handy.
‫We can put a lot of the configuration into our blueprints.
‫So what I'm going to do is I'm actually going to delete out of the seen a current moving platform because
‫I want to show you how we can create a new blueprint base class for these.
‫So we've done this very similar process with the third person character that we're using.
‫This is a blueprint class based off of another class.
‫Now we can do this based off of our C++ classes.
‫So we go to our content draw and there's a few ways of doing this, but this is one of them.
‫We can go to the C++ classes, go to Obstacle Assault, and right click on the moving platform class
‫that we've got in here and go create Blueprint Class based on moving platform.
‫So go ahead and do that.
‫I'm going to call it BP, underscore moving platform and put it in the route of content and hit create
‫blueprint class.
‫And then it's going to pop open the Blueprint editor that we are now familiar with.
‫So I'm going to close my content browser and here you can see that we've got the details pane with all
‫of the settings that we have for our moving platform and including the move distance, etc. We've also
‫added in a default scene route component because we didn't have a component within here.
‫So an actor needs to have some sort of component, otherwise it's not got a location, which that's
‫why we had to add our cube component in the previous instance.
‫So what I'm wanting to do here is actually bring in some of the assets from our learning kit.
‫So if we go to our content draw to the content folder, we'll go to the learning kit and then have a
‫look at assets and let's have a look if props.
‫Well, there's lots of things, lots of folders in here.
‫So what I'm actually going to do is filter go to the filter button and look for the static mesh filter.
‫And that's going to show us all of the static meshes down under the learning kit.
‫And in my case, I want to make a kind of stone pillar.
‫So there's a few ways I could go about this, but I think this kit floor is one possible avenue to explore.
‫And the other way to have a look at this, of course, is we've got the assets in our scene.
‫So let's go and fly over to this other platform here, go over to the floating island and we can have
‫a look at what assets are available.
‫I can see that there's a stone floor that I'm liking the look of.
‫If I click on that and have a look at the static mesh in use, you can see it's this static mesh kit,
‫floor mesh.
‫Okay, so that's what I'm looking for in the content draw and I could remove the filter if I want to
‫do it that way and I could look for the kit underscore flaw I think it was.
‫And that's the one that we want.
‫There's two versions, actually, so let's have a look at the differences between them.
‫It looks like the second one is a bit more fleshed out.
‫There's certainly more properties when I'm hovering over it.
‫In fact, there's even some levels of detail.
‫There's four levels of detail where there's only one for the other.
‫So I'm going to go for the second one and I'm going to drag it in to the viewport.
‫And you can see it gets added in as a component underneath this default scene route component, which
‫is just fine.
‫We don't have to make this kit the absolute center of the whole class.
‫It doesn't have to be the root component.
‫We can attach it to the route and that actually allows us to move the center of the platform so that
‫the center is in the actual middle of the platform rather than being at wherever the center is for this
‫particular static mesh.
‫So that's what I've done.
‫I've moved my platform over to be a little bit off center.
‫I'm also going to make this into a platform that goes up and down.
‫So selecting the actor in the components panel or clicking on class defaults in the toolbar, I'm going
‫to go and change some of the properties in the moving platform section.
‫So our platform velocity is going to make it go up and down.
‫So I'm going to give it 200 velocity going up, zero going across, and I'm going to give it a move
‫distance of 500 to start off with.
‫And let's see how that looks.
‫I'm going to bring a moving platform actually into my scene.
‫So let's go to the scene, go to the outline of search for the third person character and double click
‫on him to bring us back to this other island.
‫Then I'm going to go to the content draw, go to the root of content, cancel out my search and drag
‫in our BP moving platform.
‫So there we go.
‫We've got a moving platform in here.
‫And if I hit play, you can see that it is going indeed up and down like this.
‫And if I put two of them in the scene so I drag in another one, you'll see that they both react in
‫the same way and they both are linked because of that blueprint class that they both share.
‫So let's challenge you to customize your own platform here.
‫You may choose to go with the approach I'm going with, or you may go entirely different.
‫You can also create more than one blueprint variant class so that you're moving platforms.
‫Could be some that float, some that goes outside, some that are pillars coming out of the ground.
‫I'm going to go for the rock pillar coming out of the ground as the idiom so make.
‫And if you want to follow along, that's your challenge as well to make it a pillar emerging from the
‫floor.
‫What we're going to do is look for some appropriate components from the kit that could be the sides
‫of the pillar.
‫And then we're going to drag them into the blueprint class and we're going to position them in place
‫so that they form the base underneath that floor component that we've already put in.
‫So pause video and have a go at making your own rising pillar.
‫Okay.
‫Welcome back.
‫So let's stop playing with our rising pillar.
‫I'm going to go over to the BP moving platform and in fact, I'm going to go over into the scene view
‫first of all, and I'm going to travel over to the other island here by right clicking on it and going
‫snap view to object.
‫So I snap right to that island and then we're going to look for different walls that I could use.
‫Okay, so there's a few rocky walls here that I'm seeing that could be a good component.
‫You could also put little holes in the wall if you wanted to.
‫There's some kind of sloping roof, but that's kind of already at an angle that might not be the ideal.
‫There's also we could use these upturned islands.
‫These could be used as part of a more rocky and craggy base if we wanted to.
‫But I'm going to go for a slightly more boring wall, so I'm just going to use the kit wall.
‫Let's go over to the moving platform.
‫I'm going to open up the content drawer and look for kit and score wall and then using let's find which
‫element is the most appropriate.
‫I think it's this one here.
‫It's got four levels of detail.
‫So that's the one I want and I'm going to drag it in to the world and I'm going to need a couple of
‫them.
‫But let's start off with just the one.
‫So I'm going to position it down and across from our platform like so, and then I'm going to duplicate
‫it with just a control C, control V, and then I can rotate using the rotate tool.
‫There it go.
‫It's made the other side automatically.
‫Now let's go and paste it again.
‫Use the move tool to just flip it over to the other side here.
‫And I'm not being too careful with positioning because I think it's rocky.
‫It can be a little bit haphazard.
‫Then I'm going to copy the one side that's already aligned and bring it over to the other.
‫So in total we have about four wall elements like so.
‫And then what we're going to do is we're going to take all four of them and we're going to copy them
‫and paste them and we're going to drag them on down to be the elements down below as well, so that
‫this is a nice, tall, rocky pillar that should allow us to pop out of the ground.
‫And I'm just going to do one more level down so that we can use it in particularly tool situations.
‫And then we're going to go and save go back over to the main level.
‫We're going to go double click on our third person character to zoom us back and hit play.
‫And now these two rocky pillars that I've got are popping in and out of the ground just fine.
‫You can see they're going in sync with each other.
‫We could work on changing that if we wanted to, but they are going up and down and both have sides
‫to them so I can't get trapped underneath and also gives them a bit of a sense of grounding rather than
‫looking like magical, floaty platforms.
‫Great stuff.
‫So we've learnt about how we can create blueprint child classes off of C++ classes.
‫I'll see you in the next lecture.