﻿1
00:00:04,370 --> 00:00:05,330
‫Hello and welcome.

2
00:00:05,330 --> 00:00:11,060
‫In this lecture, we're going to be setting up the basics in place for our eye, getting started on

3
00:00:11,060 --> 00:00:14,420
‫the whole AI process, which is going to be quite a series of lectures.

4
00:00:14,420 --> 00:00:19,160
‫So we're starting with a revision of AI controllers and blueprints.

5
00:00:19,160 --> 00:00:21,740
‫Let's dive in and see what we're revising.

6
00:00:22,720 --> 00:00:25,880
‫So let's check back in with our project plan at the moment.

7
00:00:25,900 --> 00:00:30,720
‫We have done player movement, animation, shooting, health and death.

8
00:00:30,730 --> 00:00:31,350
‫So far.

9
00:00:31,360 --> 00:00:33,940
‫Those things are pretty much covered.

10
00:00:34,030 --> 00:00:39,260
‫We're going to look next at a very big chunk, which is going to be the enemy A.I..

11
00:00:39,280 --> 00:00:40,530
‫So let's get started.

12
00:00:40,540 --> 00:00:45,320
‫The first thing we always need to do with A.I. is to have an AI controller.

13
00:00:45,340 --> 00:00:47,950
‫So we're going to go over and create a C++ one.

14
00:00:47,950 --> 00:00:55,630
‫Then I'm going to challenge you to create the Blueprint subclass and hook it up as the default for the

15
00:00:55,630 --> 00:00:56,260
‫pawn.

16
00:00:56,290 --> 00:00:58,600
‫So we're going to go to add new.

17
00:00:58,930 --> 00:01:01,240
‫Create a new C++ class in here.

18
00:01:01,360 --> 00:01:06,610
‫And then we're going to go down and look for if there is an AI controller in here, I'm not sure if

19
00:01:06,610 --> 00:01:07,150
‫there is.

20
00:01:07,150 --> 00:01:12,790
‫So I'm going to do show all classes and look for the AI controller and we're going to use that as our

21
00:01:12,790 --> 00:01:13,340
‫base class.

22
00:01:13,360 --> 00:01:20,110
‫Go ahead and rename it to something like Shooter A.I. Controller.

23
00:01:20,930 --> 00:01:23,870
‫And go and create that class.

24
00:01:24,770 --> 00:01:29,750
‫And once that's gone ahead and generated and recompiled, which may take a little while in your system,

25
00:01:29,750 --> 00:01:33,500
‫you should end up with a C++ class like this.

26
00:01:33,530 --> 00:01:39,380
‫Now, that's pretty much all I'm going to do, because the rest, you should be able to remember some

27
00:01:39,380 --> 00:01:40,070
‫of it yourself.

28
00:01:40,070 --> 00:01:45,680
‫We've done a lot of this in the previous section already, so let's see if you can do it.

29
00:01:46,340 --> 00:01:47,240
‫So here's the challenge.

30
00:01:47,240 --> 00:01:52,250
‫To create a blueprint child, you're going to have to first create the child class, then set it as

31
00:01:52,250 --> 00:01:54,800
‫the I for our blueprint character.

32
00:01:55,040 --> 00:01:57,120
‫You may or may not remember, but that has to go.

33
00:01:57,140 --> 00:02:00,980
‫You go into your blueprint for the character, the first person.

34
00:02:01,210 --> 00:02:02,990
‫Well, third person shooter character.

35
00:02:02,990 --> 00:02:07,640
‫And you can set the AI that should automatically possess these characters when they're placed in the

36
00:02:07,640 --> 00:02:08,240
‫world.

37
00:02:08,330 --> 00:02:11,930
‫And then test the actors are created to test that.

38
00:02:11,930 --> 00:02:18,710
‫The AI controller actors are created by basically possessing, doing an F8 and having a look in your

39
00:02:18,710 --> 00:02:22,790
‫world outline and to see if those actors are present.

40
00:02:22,820 --> 00:02:24,650
‫Pause the video and have a go.

41
00:02:25,670 --> 00:02:26,060
‫Okay.

42
00:02:26,060 --> 00:02:26,710
‫Welcome back.

43
00:02:26,720 --> 00:02:30,350
‫So first of all, we're going to create a blueprint child class here.

44
00:02:30,350 --> 00:02:36,680
‫So I'm going to do that by going to add new blueprint class and I'm going to make it a child of the

45
00:02:36,680 --> 00:02:45,290
‫shooter A.I. controller, and then I'm going to call it the BP underscore shooter AI controller.

46
00:02:45,860 --> 00:02:47,570
‫I can get the capitalization right.

47
00:02:48,720 --> 00:02:49,500
‫Like so.

48
00:02:49,920 --> 00:02:54,810
‫And then we want to make that the default A.I. for our BPP shooter character.

49
00:02:54,810 --> 00:02:59,040
‫So I'm going to open up the beep issue to character and dock it to the main window and then I'm going

50
00:02:59,040 --> 00:03:01,320
‫to go to the class defaults details.

51
00:03:01,320 --> 00:03:07,620
‫And in here we should have under the pawn settings the AI controller class which we want to switch over

52
00:03:07,620 --> 00:03:13,170
‫to the beep underscore shooter AI controller so I can click all save.

53
00:03:13,170 --> 00:03:21,960
‫Okay, do all of that and go alt p to play and then f eight to d possess and have my mouse back and

54
00:03:21,960 --> 00:03:23,070
‫look in the world outline.

55
00:03:23,370 --> 00:03:26,670
‫We should be looking for a shooter A.I. and here we go.

56
00:03:26,670 --> 00:03:31,410
‫The beep shooter AI controller is being created for that character we put in the world.

57
00:03:31,410 --> 00:03:36,600
‫If you are to put more characters in the world, there would be more A.I. controllers being created

58
00:03:36,720 --> 00:03:41,760
‫and do watch out that it is the blueprint version being created because we want any of the modifications

59
00:03:41,760 --> 00:03:46,170
‫that we make in Blueprint to be showing up in our game, basically.

60
00:03:46,200 --> 00:03:46,590
‫Cool.

61
00:03:46,590 --> 00:03:52,620
‫So we've just gone through a quick revision of how we typically set up AI controllers and the next lecture

62
00:03:52,620 --> 00:03:58,320
‫will be actually making that AI controller do something, basically aiming at our player.

63
00:03:58,320 --> 00:03:59,040
‫So you there.

