WEBVTT

00:06.890 --> 00:08.150
Welcome back.

00:08.450 --> 00:13.220
We're now ready to add cost and cooldown to our Fire Blast ability.

00:13.760 --> 00:17.960
So I'm going to compile and launch up Unreal Engine.

00:19.410 --> 00:21.060
All right, so we're back in the engine.

00:21.060 --> 00:22.800
I'm done with offensive spell tree.

00:22.800 --> 00:24.990
I'm done with ability info for now.

00:24.990 --> 00:26.610
We'll get it back open soon.

00:26.610 --> 00:29.220
But here's Fireblast I'm going to keep that open.

00:29.220 --> 00:35.490
And I'm going to start with my cost my mana cost for fireblast.

00:35.490 --> 00:42.210
So that means I can go to ability system and data and go to Spell cost and add a curve.

00:42.210 --> 00:43.590
Rename this curve.

00:43.590 --> 00:47.910
It's going to be Fireblast and I'm going to add two points to it.

00:47.910 --> 00:50.700
So add key click add key.

00:50.730 --> 00:53.550
The first one is going to be at one.

00:53.550 --> 00:55.980
And I'll make its damage a little higher.

00:55.980 --> 00:59.460
Let's make it 15 as this is a higher level spell.

00:59.700 --> 01:02.970
And I'm going to take my second point.

01:03.670 --> 01:09.730
And my second is actually this one down here, because I put that first one right here at one.

01:09.730 --> 01:13.420
This one is going to be at level 40.

01:13.600 --> 01:18.550
And I'm going to make its value 150 or so.

01:20.580 --> 01:24.540
And with that, I'm going to make this a auto curve.

01:24.540 --> 01:26.430
Flatten it out just a bit.

01:26.430 --> 01:31.500
And that's my spell cost for this spell.

01:31.500 --> 01:35.400
Now 15 Manacost at level one is okay.

01:35.400 --> 01:40.500
150 is a little expensive, but we'll have to see with testing how that feels.

01:40.500 --> 01:42.630
So I'm going to save this spell.

01:42.630 --> 01:48.540
Cost is set now Fireblast needs a cost gameplay effect right?

01:48.540 --> 01:50.190
So let's make one.

01:50.190 --> 01:53.490
I'm going to browse to where Fireblast exists.

01:53.490 --> 01:55.980
Create a new gameplay effect blueprint.

01:58.780 --> 02:03.760
And call this GE underscore cost fireblast.

02:04.180 --> 02:05.590
We're going to open it up.

02:05.590 --> 02:08.710
And the cost is going to be an instant effect.

02:08.710 --> 02:10.090
With one modifier.

02:10.090 --> 02:15.010
It's going to require mana just like our other spells.

02:15.100 --> 02:19.270
It's going to be add and the modifier magnitude will be negative one.

02:19.270 --> 02:22.000
But we're going to use a curve table.

02:22.980 --> 02:24.930
Spell cast and choose.

02:24.930 --> 02:26.460
Fire blast.

02:27.340 --> 02:35.680
We can compile, we can save, and we can take fireblast and set its cost gameplay effect to cost.

02:36.310 --> 02:37.480
Fireblast.

02:37.840 --> 02:42.400
Now when we activate the ability, we can commit ability cost.

02:45.030 --> 02:49.770
Like so, and we should be able to see that cost if we save all.

02:49.770 --> 02:52.080
If we press play, we level up.

02:55.830 --> 03:01.740
We purchase our spell, we equip it to two, and then I can hit number two.

03:02.100 --> 03:06.210
And we just did our cost commit there.

03:06.510 --> 03:06.900
Okay.

03:06.900 --> 03:10.680
So cost works I'm going to close CT spell cost.

03:10.710 --> 03:12.480
Now we need a cooldown.

03:12.480 --> 03:14.250
So I'm going to make a cooldown.

03:14.670 --> 03:15.750
Right click.

03:15.750 --> 03:17.580
We're going to add a gameplay effect.

03:18.470 --> 03:24.230
We're going to call this gameplay effect GE cooldown underscore fireblast.

03:25.610 --> 03:29.330
And this is going to be a duration based gameplay effect.

03:29.330 --> 03:31.190
So has duration.

03:31.190 --> 03:35.030
And I'm going to set the duration magnitude for this.

03:35.030 --> 03:39.620
And I think we can make the duration for this about five seconds.

03:39.620 --> 03:43.730
And we need a cooldown tag and the granted tags.

03:43.730 --> 03:45.740
So we're going to go to Project Settings.

03:45.740 --> 03:49.220
We're going to go to Gameplay Tags into cooldown.

03:49.220 --> 03:55.790
We're going to add a new cooldown tag and call this cooldown dot fire dot Fire Blast.

03:56.790 --> 04:01.890
And now we have a cooldown dot fire dot Fire Blast gameplay tag.

04:01.890 --> 04:07.950
We're going to go to Cooldown Fire Blast and add that to the granted tags so it's cooldown fire fire

04:07.950 --> 04:15.450
Blast, compile save, and we're going to get that into our Fire Blast gameplay ability.

04:15.450 --> 04:21.570
In Class Defaults, we're going to set the cooldown to Cooldown Fire Blast like so.

04:21.570 --> 04:30.330
And now if we end the ability, we should be able to activate it again, but not until our cooldown

04:30.330 --> 04:30.780
is over.

04:30.780 --> 04:37.080
As long as we commit the cooldown and we can commit cost and cooldown with commit ability.

04:39.110 --> 04:42.770
So I'm going to do that now instead of just the cost.

04:44.220 --> 04:53.460
Now before testing, I do want to go back into my data folder blueprints ability system data into ability

04:53.460 --> 04:58.650
info, because now that I have a cooldown tag, I can set it here Fire Blast.

04:58.650 --> 05:01.020
And with that I can press play.

05:01.020 --> 05:02.610
I can level up.

05:04.410 --> 05:11.880
And I can unlock Fireblast, and I can equip it to slot two, and I can press two.

05:12.300 --> 05:15.090
And there's my cooldown going down.

05:15.090 --> 05:17.850
And when it comes down, I can cast it again.

05:19.640 --> 05:21.020
And I can spam the key.

05:21.020 --> 05:24.530
I can't cast it until the cooldown is over.

05:25.040 --> 05:28.310
So with that, we have cast and cooldown.

05:28.310 --> 05:35.360
All that's left is to actually determine what happens when we cast Fireblast, and we'll do that next.

05:35.360 --> 05:37.430
So I'm going to close project settings.

05:37.430 --> 05:39.260
I'm done with my new effects.

05:39.260 --> 05:41.150
I'm going to keep Fireblast open.

05:41.150 --> 05:44.210
Save all and I'll see you soon.
