﻿1
00:00:04,360 --> 00:00:05,410
‫Hello and welcome.

2
00:00:05,410 --> 00:00:10,570
‫In this lecture, we are going to be making moving platforms that look a little bit more visually appealing

3
00:00:10,570 --> 00:00:15,700
‫like this by using blueprint child classes of a C++ class.

4
00:00:15,700 --> 00:00:17,710
‫Let's dive in and see how it works.

5
00:00:18,430 --> 00:00:21,100
‫So enough with this white cube.

6
00:00:21,100 --> 00:00:24,370
‫Let's start using some of the assets from our asset pack.

7
00:00:24,370 --> 00:00:30,670
‫Now, with these moving platforms, we don't want to be reconfiguring them every single time that we

8
00:00:30,670 --> 00:00:31,180
‫create them.

9
00:00:31,180 --> 00:00:35,110
‫So this is where blueprint classes come in handy.

10
00:00:35,110 --> 00:00:39,520
‫We can put a lot of the configuration into our blueprints.

11
00:00:39,520 --> 00:00:44,650
‫So what I'm going to do is I'm actually going to delete out of the seen a current moving platform because

12
00:00:44,650 --> 00:00:48,880
‫I want to show you how we can create a new blueprint base class for these.

13
00:00:49,180 --> 00:00:55,390
‫So we've done this very similar process with the third person character that we're using.

14
00:00:55,390 --> 00:00:59,560
‫This is a blueprint class based off of another class.

15
00:00:59,560 --> 00:01:03,370
‫Now we can do this based off of our C++ classes.

16
00:01:03,370 --> 00:01:08,830
‫So we go to our content draw and there's a few ways of doing this, but this is one of them.

17
00:01:08,830 --> 00:01:14,830
‫We can go to the C++ classes, go to Obstacle Assault, and right click on the moving platform class

18
00:01:14,830 --> 00:01:19,810
‫that we've got in here and go create Blueprint Class based on moving platform.

19
00:01:19,840 --> 00:01:21,040
‫So go ahead and do that.

20
00:01:21,490 --> 00:01:27,910
‫I'm going to call it BP, underscore moving platform and put it in the route of content and hit create

21
00:01:27,910 --> 00:01:28,930
‫blueprint class.

22
00:01:28,930 --> 00:01:33,520
‫And then it's going to pop open the Blueprint editor that we are now familiar with.

23
00:01:33,520 --> 00:01:40,750
‫So I'm going to close my content browser and here you can see that we've got the details pane with all

24
00:01:40,780 --> 00:01:47,850
‫of the settings that we have for our moving platform and including the move distance, etc. We've also

25
00:01:48,070 --> 00:01:54,310
‫added in a default scene route component because we didn't have a component within here.

26
00:01:54,310 --> 00:01:58,300
‫So an actor needs to have some sort of component, otherwise it's not got a location, which that's

27
00:01:58,300 --> 00:02:01,390
‫why we had to add our cube component in the previous instance.

28
00:02:01,630 --> 00:02:08,020
‫So what I'm wanting to do here is actually bring in some of the assets from our learning kit.

29
00:02:08,020 --> 00:02:13,340
‫So if we go to our content draw to the content folder, we'll go to the learning kit and then have a

30
00:02:13,340 --> 00:02:16,750
‫look at assets and let's have a look if props.

31
00:02:16,750 --> 00:02:18,640
‫Well, there's lots of things, lots of folders in here.

32
00:02:18,640 --> 00:02:27,490
‫So what I'm actually going to do is filter go to the filter button and look for the static mesh filter.

33
00:02:27,490 --> 00:02:31,810
‫And that's going to show us all of the static meshes down under the learning kit.

34
00:02:32,080 --> 00:02:35,110
‫And in my case, I want to make a kind of stone pillar.

35
00:02:35,110 --> 00:02:43,480
‫So there's a few ways I could go about this, but I think this kit floor is one possible avenue to explore.

36
00:02:43,690 --> 00:02:47,830
‫And the other way to have a look at this, of course, is we've got the assets in our scene.

37
00:02:47,830 --> 00:02:53,980
‫So let's go and fly over to this other platform here, go over to the floating island and we can have

38
00:02:53,980 --> 00:02:55,510
‫a look at what assets are available.

39
00:02:55,510 --> 00:02:58,270
‫I can see that there's a stone floor that I'm liking the look of.

40
00:02:58,300 --> 00:03:04,360
‫If I click on that and have a look at the static mesh in use, you can see it's this static mesh kit,

41
00:03:04,360 --> 00:03:05,320
‫floor mesh.

42
00:03:05,320 --> 00:03:10,280
‫Okay, so that's what I'm looking for in the content draw and I could remove the filter if I want to

43
00:03:10,280 --> 00:03:15,550
‫do it that way and I could look for the kit underscore flaw I think it was.

44
00:03:16,060 --> 00:03:17,230
‫And that's the one that we want.

45
00:03:17,230 --> 00:03:21,220
‫There's two versions, actually, so let's have a look at the differences between them.

46
00:03:21,220 --> 00:03:23,980
‫It looks like the second one is a bit more fleshed out.

47
00:03:23,980 --> 00:03:26,260
‫There's certainly more properties when I'm hovering over it.

48
00:03:26,260 --> 00:03:28,690
‫In fact, there's even some levels of detail.

49
00:03:28,690 --> 00:03:31,180
‫There's four levels of detail where there's only one for the other.

50
00:03:31,180 --> 00:03:35,890
‫So I'm going to go for the second one and I'm going to drag it in to the viewport.

51
00:03:35,890 --> 00:03:42,220
‫And you can see it gets added in as a component underneath this default scene route component, which

52
00:03:42,220 --> 00:03:42,820
‫is just fine.

53
00:03:42,820 --> 00:03:47,800
‫We don't have to make this kit the absolute center of the whole class.

54
00:03:47,800 --> 00:03:49,570
‫It doesn't have to be the root component.

55
00:03:49,570 --> 00:03:56,530
‫We can attach it to the route and that actually allows us to move the center of the platform so that

56
00:03:56,530 --> 00:04:03,220
‫the center is in the actual middle of the platform rather than being at wherever the center is for this

57
00:04:03,220 --> 00:04:04,540
‫particular static mesh.

58
00:04:04,540 --> 00:04:05,470
‫So that's what I've done.

59
00:04:05,470 --> 00:04:09,280
‫I've moved my platform over to be a little bit off center.

60
00:04:09,800 --> 00:04:12,130
‫I'm also going to make this into a platform that goes up and down.

61
00:04:12,130 --> 00:04:18,940
‫So selecting the actor in the components panel or clicking on class defaults in the toolbar, I'm going

62
00:04:18,940 --> 00:04:24,280
‫to go and change some of the properties in the moving platform section.

63
00:04:24,280 --> 00:04:27,280
‫So our platform velocity is going to make it go up and down.

64
00:04:27,280 --> 00:04:33,940
‫So I'm going to give it 200 velocity going up, zero going across, and I'm going to give it a move

65
00:04:33,940 --> 00:04:36,310
‫distance of 500 to start off with.

66
00:04:36,310 --> 00:04:38,350
‫And let's see how that looks.

67
00:04:38,350 --> 00:04:41,290
‫I'm going to bring a moving platform actually into my scene.

68
00:04:41,290 --> 00:04:49,480
‫So let's go to the scene, go to the outline of search for the third person character and double click

69
00:04:49,480 --> 00:04:51,820
‫on him to bring us back to this other island.

70
00:04:51,970 --> 00:04:58,360
‫Then I'm going to go to the content draw, go to the root of content, cancel out my search and drag

71
00:04:58,360 --> 00:05:00,250
‫in our BP moving platform.

72
00:05:00,250 --> 00:05:00,700
‫So there we go.

73
00:05:00,700 --> 00:05:03,310
‫We've got a moving platform in here.

74
00:05:03,610 --> 00:05:08,920
‫And if I hit play, you can see that it is going indeed up and down like this.

75
00:05:08,920 --> 00:05:16,030
‫And if I put two of them in the scene so I drag in another one, you'll see that they both react in

76
00:05:16,030 --> 00:05:21,520
‫the same way and they both are linked because of that blueprint class that they both share.

77
00:05:21,520 --> 00:05:24,700
‫So let's challenge you to customize your own platform here.

78
00:05:24,700 --> 00:05:29,350
‫You may choose to go with the approach I'm going with, or you may go entirely different.

79
00:05:29,350 --> 00:05:35,110
‫You can also create more than one blueprint variant class so that you're moving platforms.

80
00:05:35,110 --> 00:05:39,370
‫Could be some that float, some that goes outside, some that are pillars coming out of the ground.

81
00:05:39,370 --> 00:05:45,430
‫I'm going to go for the rock pillar coming out of the ground as the idiom so make.

82
00:05:45,430 --> 00:05:49,330
‫And if you want to follow along, that's your challenge as well to make it a pillar emerging from the

83
00:05:49,330 --> 00:05:49,900
‫floor.

84
00:05:49,900 --> 00:05:53,830
‫What we're going to do is look for some appropriate components from the kit that could be the sides

85
00:05:53,830 --> 00:05:54,610
‫of the pillar.

86
00:05:54,640 --> 00:05:58,660
‫And then we're going to drag them into the blueprint class and we're going to position them in place

87
00:05:58,660 --> 00:06:03,220
‫so that they form the base underneath that floor component that we've already put in.

88
00:06:03,400 --> 00:06:07,660
‫So pause video and have a go at making your own rising pillar.

89
00:06:10,440 --> 00:06:10,890
‫Okay.

90
00:06:10,890 --> 00:06:11,610
‫Welcome back.

91
00:06:11,610 --> 00:06:14,250
‫So let's stop playing with our rising pillar.

92
00:06:14,250 --> 00:06:19,560
‫I'm going to go over to the BP moving platform and in fact, I'm going to go over into the scene view

93
00:06:19,560 --> 00:06:25,680
‫first of all, and I'm going to travel over to the other island here by right clicking on it and going

94
00:06:25,680 --> 00:06:27,180
‫snap view to object.

95
00:06:27,180 --> 00:06:32,430
‫So I snap right to that island and then we're going to look for different walls that I could use.

96
00:06:32,460 --> 00:06:37,110
‫Okay, so there's a few rocky walls here that I'm seeing that could be a good component.

97
00:06:37,140 --> 00:06:40,980
‫You could also put little holes in the wall if you wanted to.

98
00:06:41,010 --> 00:06:47,520
‫There's some kind of sloping roof, but that's kind of already at an angle that might not be the ideal.

99
00:06:47,520 --> 00:06:50,640
‫There's also we could use these upturned islands.

100
00:06:50,640 --> 00:06:54,810
‫These could be used as part of a more rocky and craggy base if we wanted to.

101
00:06:54,810 --> 00:07:00,690
‫But I'm going to go for a slightly more boring wall, so I'm just going to use the kit wall.

102
00:07:01,410 --> 00:07:02,860
‫Let's go over to the moving platform.

103
00:07:02,860 --> 00:07:09,570
‫I'm going to open up the content drawer and look for kit and score wall and then using let's find which

104
00:07:09,570 --> 00:07:11,100
‫element is the most appropriate.

105
00:07:11,100 --> 00:07:12,060
‫I think it's this one here.

106
00:07:12,060 --> 00:07:13,710
‫It's got four levels of detail.

107
00:07:13,710 --> 00:07:19,320
‫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

108
00:07:19,320 --> 00:07:19,680
‫them.

109
00:07:19,680 --> 00:07:22,410
‫But let's start off with just the one.

110
00:07:22,470 --> 00:07:31,260
‫So I'm going to position it down and across from our platform like so, and then I'm going to duplicate

111
00:07:31,260 --> 00:07:37,080
‫it with just a control C, control V, and then I can rotate using the rotate tool.

112
00:07:37,110 --> 00:07:37,530
‫There it go.

113
00:07:37,530 --> 00:07:40,080
‫It's made the other side automatically.

114
00:07:40,080 --> 00:07:42,300
‫Now let's go and paste it again.

115
00:07:42,300 --> 00:07:46,320
‫Use the move tool to just flip it over to the other side here.

116
00:07:46,350 --> 00:07:50,130
‫And I'm not being too careful with positioning because I think it's rocky.

117
00:07:50,130 --> 00:07:51,840
‫It can be a little bit haphazard.

118
00:07:51,960 --> 00:07:58,350
‫Then I'm going to copy the one side that's already aligned and bring it over to the other.

119
00:07:58,350 --> 00:08:03,090
‫So in total we have about four wall elements like so.

120
00:08:03,270 --> 00:08:09,480
‫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

121
00:08:09,480 --> 00:08:16,650
‫and paste them and we're going to drag them on down to be the elements down below as well, so that

122
00:08:16,650 --> 00:08:21,120
‫this is a nice, tall, rocky pillar that should allow us to pop out of the ground.

123
00:08:21,120 --> 00:08:27,240
‫And I'm just going to do one more level down so that we can use it in particularly tool situations.

124
00:08:27,390 --> 00:08:30,750
‫And then we're going to go and save go back over to the main level.

125
00:08:30,750 --> 00:08:35,220
‫We're going to go double click on our third person character to zoom us back and hit play.

126
00:08:35,220 --> 00:08:41,250
‫And now these two rocky pillars that I've got are popping in and out of the ground just fine.

127
00:08:41,250 --> 00:08:43,110
‫You can see they're going in sync with each other.

128
00:08:43,110 --> 00:08:49,710
‫We could work on changing that if we wanted to, but they are going up and down and both have sides

129
00:08:49,710 --> 00:08:55,530
‫to them so I can't get trapped underneath and also gives them a bit of a sense of grounding rather than

130
00:08:55,530 --> 00:08:58,560
‫looking like magical, floaty platforms.

131
00:08:58,560 --> 00:08:59,040
‫Great stuff.

132
00:08:59,040 --> 00:09:04,830
‫So we've learnt about how we can create blueprint child classes off of C++ classes.

133
00:09:04,830 --> 00:09:06,750
‫I'll see you in the next lecture.

