WEBVTT

00:06.820 --> 00:07.810
Welcome back.

00:07.810 --> 00:11.380
Now we have a functional summoning creature.

00:11.530 --> 00:12.760
Our shaman.

00:12.760 --> 00:16.150
But obviously, we have some issues with this, right?

00:16.180 --> 00:19.630
Our shaman is clearly spawning way too many creatures.

00:19.720 --> 00:25.870
And of course, the visual aspect of this, there might be some things we want to polish up so it looks

00:25.870 --> 00:31.270
a little bit more attractive when they pop in rather than just appearing like that.

00:31.270 --> 00:36.900
But for now, we need to fix this issue where we're summoning way too many minions.

00:36.910 --> 00:40.470
We need to have some kind of a minion count, some kind of threshold.

00:40.480 --> 00:49.090
Now we're summoning because our summon ability has its ability tag and we can see what that tag is by

00:49.120 --> 00:56.380
going to blueprints, ability, system, enemy abilities, and we can go to summon ability.

00:56.410 --> 01:02.050
And this ability has ability tags and we've given it abilities dot attack.

01:02.080 --> 01:08.900
Now I'd like to have an abilities dot summon so that we can distinguish between these two because we

01:08.900 --> 01:16.550
may wish for our shaman to be able to attack with fireballs and summon depending on the situation,

01:16.550 --> 01:21.140
such as how many minions are currently spawned for that given shaman.

01:21.140 --> 01:26.840
So step one is I'd like to create an abilities dot summon gameplay tag.

01:26.840 --> 01:29.570
So let's go ahead and close our editor.

01:30.270 --> 01:33.220
And we'll go into Ora gameplay tags.

01:33.270 --> 01:42.260
So in the public section or a gameplay tags and we have our abilities tags right here, abilities attack.

01:42.270 --> 01:49.620
I'm going to make another gameplay tag called Abilities underscore Summon and we'll go ahead and create

01:49.620 --> 01:53.220
that and or a gameplay tag scope.

01:53.640 --> 01:55.320
Let's find a tag.

01:55.940 --> 01:57.620
We'll go ahead and copy it.

01:58.310 --> 02:04.190
And just beneath it we're going to paste and change it to abilities summon.

02:04.550 --> 02:11.390
The name will be abilities summon and the F string will be summon ability tag.

02:11.570 --> 02:13.700
So that's the first thing I'd like to do.

02:13.730 --> 02:20.630
Now I'd also like a minion count and we could subclass our aura enemy class into the different character

02:20.630 --> 02:21.170
classes.

02:21.170 --> 02:22.920
But I don't want to do that.

02:22.940 --> 02:31.160
I'd like any of my characters to have a concept of minions because a character having a pet or a minion

02:31.160 --> 02:36.410
is an ability that I think just about every character should at least have the concept of.

02:36.440 --> 02:42.110
That way, our player controlled character could have its own pet or set of pets or minions.

02:42.110 --> 02:48.770
So I'm going to go to character or a character based H and we're going to add to our character base

02:48.770 --> 02:51.380
class A minion count.

02:51.970 --> 02:54.600
So let's put this in the protected section.

02:54.610 --> 02:56.890
We'll go all the way down to the bottom.

02:56.890 --> 03:00.550
We'll have a multi-line comment that says Minions.

03:01.170 --> 03:03.850
And by the way, this doesn't have to be a multi-line comment.

03:03.870 --> 03:10.530
This is just style preference of mine for making it a little flashier, a little bit more noticeable.

03:10.530 --> 03:14.490
And I'm going to add an int 32 called Minion Count.

03:14.640 --> 03:22.080
Now we'll set this to zero by default, and rather than exposing it to the event graph with blueprint,

03:22.080 --> 03:23.640
read only, for example.

03:23.640 --> 03:28.290
Instead, what I'd like to do is make an interface function to get this minion count.

03:28.320 --> 03:35.520
That way we don't really even need to cast to or a character or an enemy or something like that.

03:35.520 --> 03:38.340
All we have to do is call the interface function.

03:38.340 --> 03:43.920
So I'm going to go into Interaction combat interface and we'll make another blueprint Native event,

03:43.920 --> 03:48.410
blueprint callable, and this will return our minion count.

03:48.420 --> 03:55.320
So I'm going to copy and paste, get tagged montage by tag and instead of an f tag montage it's going

03:55.320 --> 03:56.790
to return an int 32.

03:56.820 --> 04:02.950
It's going to be called Get Minion Count and it's going to take zero input parameters and we'll go ahead

04:02.950 --> 04:10.180
and override this in a character base up here with our other combat interface functions, we're going

04:10.180 --> 04:21.000
to have virtual int 32 get Minion count implementation override and it'll just return minion count.

04:21.010 --> 04:23.830
So return minion count.

04:24.220 --> 04:30.970
Okay, so now our characters have a concept of minion count and we have a summon tag and our combat

04:30.970 --> 04:32.920
interface has get minion count.

04:32.920 --> 04:35.830
And this allows us to really easily get the minion count.

04:35.860 --> 04:39.790
When we have any actor write any object that we want to check.

04:39.790 --> 04:41.860
So I'm going to compile and launch.

04:42.840 --> 04:43.230
Okay.

04:43.230 --> 04:44.220
Back in the editor.

04:44.220 --> 04:47.070
I'm going to get my summon ability back open.

04:47.070 --> 04:51.690
And remember, our ability tag is abilities attack for this.

04:51.690 --> 04:54.990
That's why we're seeing this get activated.

04:54.990 --> 05:00.300
But I'm going to remove abilities, attack and instead add abilities summon.

05:00.300 --> 05:04.020
And now this ability is its own thing.

05:04.020 --> 05:08.400
It's not really considered a attack ability, it's a summon ability.

05:08.490 --> 05:09.990
So I'm going to compile that.

05:09.990 --> 05:13.080
Now, what happens when we change that ability tag?

05:13.080 --> 05:15.420
Well, we're not going to see it activated anymore.

05:15.420 --> 05:20.670
We're going to see that our enemy doesn't actually have the ability to summon.

05:20.670 --> 05:24.960
I mean, it does have the summon ability, but it cannot activate it.

05:24.990 --> 05:26.850
Nothing is activating it.

05:26.880 --> 05:29.400
Now, let's see exactly why that is.

05:29.430 --> 05:36.960
We know why when we go to Blueprints I behavior tree and we open enemy behavior tree.

05:36.960 --> 05:43.570
And if we're arranged attacker which our elementalist is, we'll reach beat attack this behavior tree

05:43.600 --> 05:44.410
task.

05:44.410 --> 05:49.210
And if we open beat attack, then we'll see what we're doing here.

05:49.210 --> 05:56.080
When we reach this task, we see that we're trying activate abilities by tag and we're using attack

05:56.110 --> 05:58.870
tag and that is abilities attack.

05:58.870 --> 05:59.440
Right?

05:59.440 --> 06:06.910
So as long as this is abilities attack, we're not going to try activate abilities with abilities summon,

06:06.910 --> 06:07.540
are we?

06:07.540 --> 06:09.820
So that's something to be aware of.

06:09.820 --> 06:16.240
Now we could come in here and check that minion count and say, well, if it's less than say, two,

06:16.270 --> 06:19.360
then activate the summon ability.

06:19.360 --> 06:24.460
But that doesn't have anything to do with any of the other types of enemies, right?

06:24.460 --> 06:29.680
Beat attack is not really made for specifically the elementalist.

06:29.680 --> 06:31.900
But here's the cool thing.

06:31.930 --> 06:36.160
Our behavior tree is a variable that we set on the character.

06:36.160 --> 06:44.770
If we go into our shaman, for example, and we right click on Shaman, edit Shaman and we search for

06:44.770 --> 06:50.380
Behavior Tree, we see that we've got our behavior tree set to beat Behavior Tree.

06:50.410 --> 06:53.800
This is set for the specific character, right?

06:53.800 --> 06:58.780
We just all happen to be sharing the same behavior tree, all of us enemies, right?

06:58.780 --> 07:07.300
So if we want, we can make a behavior tree specific to the shaman and call the shaman specific behavior

07:07.300 --> 07:08.740
tree task attack.

07:08.740 --> 07:10.900
We can make one for the shaman.

07:10.900 --> 07:17.440
And then it can do things like check the shamans minion count, and if it's minion count is low enough,

07:17.440 --> 07:19.900
then it should spawn more minions.

07:19.900 --> 07:24.610
And if it's not, then it should activate the attack ability and so on.

07:24.610 --> 07:27.160
So that's what we're going to do in the next video.

07:27.190 --> 07:32.980
We're going to make a behavior tree specific to the shaman class and we'll do that next.

07:33.010 --> 07:34.120
I'll see you soon.
