WEBVTT

00:01.260 --> 00:02.490
Welcome back.

00:02.670 --> 00:06.480
So we need an incoming exp meta attribute.

00:06.510 --> 00:09.150
You're going to add this to the attribute set.

00:09.180 --> 00:11.610
Now this is a meta attribute.

00:11.610 --> 00:17.130
So remember, there are a lot of steps that you don't have to worry about for meta attributes.

00:17.160 --> 00:19.290
They're not replicated and so on.

00:19.290 --> 00:24.060
So take a look at how we handled our other meta attribute that we created.

00:24.060 --> 00:27.750
And I'd also like you to handle changes to incoming exp.

00:28.080 --> 00:30.300
For now, just put a log.

00:30.300 --> 00:38.010
Now we're not going to test this as we have not yet started changing exp, but just get things set up

00:38.010 --> 00:39.490
in the attribute set.

00:39.510 --> 00:47.040
So set it up so that if incoming exp were to change you could see that change in the output log.

00:47.160 --> 00:49.890
So pause the video and add the meta attribute.

00:49.920 --> 00:50.610
Now.

00:53.650 --> 00:56.500
Okay, so we need to go to our attributes set.

00:56.530 --> 01:05.050
I'm going to go ahead and close all tabs and open my ability system folder, open aura, attribute set,

01:05.050 --> 01:07.420
and we're going to add a new attribute.

01:07.450 --> 01:10.150
Now I'm going to find my other meta attribute.

01:10.150 --> 01:12.250
I have incoming damage.

01:12.250 --> 01:17.140
We're going to have incoming XP so it can go right here.

01:17.410 --> 01:23.350
I'm going to go ahead and just copy the lines for incoming damage and paste them just beneath it.

01:23.380 --> 01:28.060
Now the category can be meta attributes, it can be blueprint read only.

01:28.090 --> 01:35.800
It's a gameplay attribute data struct, but it's going to be incoming XP, not incoming damage.

01:35.800 --> 01:38.980
But we can create our attribute accessors for it.

01:38.980 --> 01:40.840
So we'll keep that line as well.

01:40.990 --> 01:42.100
Now that's it.

01:42.130 --> 01:49.120
We've created our meta attribute job done, except we're going to go ahead and set ourselves up to respond

01:49.120 --> 01:54.770
to changes and that's going to be in the CPP file here in post gameplay effect execute.

01:54.800 --> 02:03.260
We can go ahead and place an If statement to check to see if our evaluated attribute is our incoming

02:03.290 --> 02:03.740
XP.

02:03.980 --> 02:06.380
So I'm going to copy this.

02:06.410 --> 02:07.130
If statement.

02:07.130 --> 02:14.450
It's nice and small, I'm going to paste it down here at the bottom, but change my getter to get incoming

02:14.450 --> 02:18.500
XP attribute and we'll just place a UI log here.

02:18.620 --> 02:19.940
UI log.

02:20.840 --> 02:22.550
We can use log ora.

02:24.250 --> 02:30.850
We'll make it a log for now and just say incoming XP.

02:31.840 --> 02:37.120
Percent f and we'll use get incoming XP.

02:38.450 --> 02:44.300
Now, that reminds me, I think I had a log up here that we don't care about anymore, so I'm going

02:44.300 --> 02:46.280
to go ahead and remove that.

02:46.280 --> 02:55.070
And now we have our clamping for health and mana, our handling of incoming damage, and of course,

02:55.070 --> 02:56.930
our handling of incoming exp.

02:57.320 --> 03:04.160
Pretty soon I'm going to want to refactor my handling of different attribute changes, but for now we're

03:04.160 --> 03:05.420
going to leave it be.

03:05.450 --> 03:13.700
Now, with incoming meta attributes, the practice is to store that meta attribute locally and then

03:13.700 --> 03:18.650
set its value to zero and then do with that value what you will.

03:18.680 --> 03:24.140
So what we could do here, just to really get ourselves prepared for when we're going to use this,

03:24.140 --> 03:33.530
is we can make a const local float called local incoming exp and set it equal to get incoming exp.

03:35.270 --> 03:38.000
And then set our incoming exp to zero.

03:38.000 --> 03:41.360
So set incoming exp passing in zero.

03:41.360 --> 03:47.720
So we're zeroing it out and then what we can print is local incoming exp here.

03:48.550 --> 03:54.430
And in fact, we'll probably place an If check to see if it's zero before doing anything serious.

03:54.430 --> 03:56.390
But for now, we just have the log.

03:56.410 --> 04:01.480
Now, again, we can't test this because we're never actually setting incoming XP.

04:01.840 --> 04:05.260
That's what we're going to do in the videos to come.

04:05.260 --> 04:07.960
But now we have our meta attribute.

04:07.990 --> 04:11.580
We're now ready to start using it and we'll do so soon.

04:11.590 --> 04:13.570
I'll see you in the next video.
