WEBVTT

00:00.040 --> 00:04.320
If we click left mouse button then we will play attack animation clip.

00:04.440 --> 00:11.120
So basically what we need to do if we move over to animator tab and select this player in the hierarchy,

00:11.320 --> 00:16.560
we need to trigger this attack one, attack two, and attack three parameter through our code.

00:16.560 --> 00:19.320
Once we gonna click left mouse button.

00:19.600 --> 00:22.880
So let's open up our player script by double clicking on it.

00:23.240 --> 00:24.640
And let's do it.

00:24.640 --> 00:27.480
So we're gonna do it inside update function.

00:27.520 --> 00:30.720
For that we will make a separate function as well.

00:31.160 --> 00:33.760
So let's check it over here.

00:33.960 --> 00:35.680
So let's use this if condition.

00:35.680 --> 00:38.280
Let's make first bracket and some curly brackets.

00:38.480 --> 00:40.560
And what we want to check over here.

00:40.560 --> 00:42.600
We're going to check for some input.

00:42.600 --> 00:50.400
So we will use this input dot get get get mouse button down.

00:50.600 --> 00:52.520
And we need to make this brackets.

00:52.520 --> 00:59.120
And inside these brackets if you pass one it basically means that you just clicking the right mouse

00:59.120 --> 00:59.760
button.

00:59.760 --> 01:02.110
Since we're checking for left mouse button.

01:02.110 --> 01:05.430
So that's why instead of one I'm going to pass zero.

01:05.710 --> 01:11.070
If input dot get mouse button down basically means that we just clicking the left mouse button.

01:11.070 --> 01:16.750
So what we're going to do we're going to trigger that parameter which is attack one and attack two like

01:16.750 --> 01:17.190
that.

01:17.190 --> 01:20.790
So let's make a function for play attack animation.

01:20.790 --> 01:22.550
So let's make it over here.

01:22.910 --> 01:25.110
So for function we're going to type void.

01:25.230 --> 01:31.190
And we're going to call this function to something like play attack attack animation.

01:31.470 --> 01:35.710
So let's call it and let's make first bracket and some curly bracket.

01:35.710 --> 01:41.950
So what we want to do inside this function basically we need to trigger this attack one, attack two

01:41.950 --> 01:43.110
and attack three.

01:43.110 --> 01:48.630
So let's suppose we want to play the attack three animation clip a animation clip.

01:48.630 --> 01:51.870
So basically we need to trigger this attack three parameter.

01:51.870 --> 01:55.310
So firstly we need to move over to this animator component.

01:55.310 --> 01:57.750
And we need to use this set trigger function.

01:57.750 --> 02:04.350
Because this is a trigger and we have to pass the parameter parameter name, which in our case attack

02:04.390 --> 02:04.790
three.

02:05.030 --> 02:06.030
So let's do it.

02:06.110 --> 02:07.350
So what we will do.

02:07.390 --> 02:10.310
Firstly we will move over to animator component.

02:10.310 --> 02:15.190
And now we're going to use dot set trigger function and then make this first bracket.

02:15.230 --> 02:19.390
Why are we using this trigger function instead of set float.

02:19.430 --> 02:25.590
Set bool because that attack three parameter or attack one attack two is trigger parameter.

02:25.590 --> 02:28.430
So that's why we need to use this set trigger function.

02:28.750 --> 02:34.150
And inside this brackets it's going to take the name of the parameter in quotation.

02:34.150 --> 02:37.590
So I want to play the attack three animation clip.

02:37.750 --> 02:44.870
So we need to trigger this attack three parameter and make sure you spelling it correct and close that

02:44.870 --> 02:46.110
off with semicolon.

02:46.110 --> 02:51.630
So whenever we're going to click the left mouse button then I'm going to call this play attack animation.

02:51.630 --> 02:53.310
And what this function just going to do.

02:53.350 --> 02:56.270
It's going to move over to our animator component.

02:56.270 --> 02:58.630
And then it's going to trigger this attack three.

02:58.670 --> 03:03.950
And we do note that once we trigger it at a three, it's going to play the attack three animation clip

03:03.950 --> 03:05.550
as we saw earlier.

03:05.750 --> 03:08.750
And now, uh, we we have to call this function.

03:08.750 --> 03:10.390
So let's call it over here.

03:10.390 --> 03:18.710
So once we're going to click left mouse button then we will call this play attack sorry play attack

03:19.190 --> 03:20.590
attack animation.

03:20.590 --> 03:21.870
And let's close that up.

03:22.430 --> 03:24.110
Close that up with semicolon.

03:24.110 --> 03:27.270
Make first bracket and then close that up with semicolon.

03:27.270 --> 03:29.950
And let's press down Ctrl S to save our script.

03:29.950 --> 03:31.990
And now let's move over to unity.

03:31.990 --> 03:37.470
So as soon as we're going to click left mouse button that play attack animation function just gonna

03:37.470 --> 03:39.510
trigger or we simply calling it.

03:39.510 --> 03:44.150
And what that function is really doing is just going over to animator component.

03:44.150 --> 03:49.630
And then we're using the set trigger function in order to trigger that attack three parameter.

03:49.630 --> 03:55.110
And we do know that if we trigger this attack three parameter, it's gonna play the attack three animation

03:55.110 --> 04:00.470
clip right away since we just triggering that attack three parameter.

04:00.820 --> 04:03.900
So just wait a little moment and you will see.

04:05.660 --> 04:12.940
So just wait a little moment and once our compilation is done, we can just go ahead and then we can

04:12.940 --> 04:14.300
play our game.

04:14.300 --> 04:20.140
And also if we click the left mouse button then we just triggering that attack three parameter.

04:20.140 --> 04:22.700
So now the compilation is done.

04:22.700 --> 04:26.700
So let's click on this play button in the top in order to play our game.

04:26.860 --> 04:29.220
And let's try to click left mouse button.

04:29.220 --> 04:35.100
So as soon as we're gonna click left mouse button that play attack animation function just gonna call

04:35.140 --> 04:38.700
and that function just triggering this attack three parameter.

04:38.700 --> 04:45.060
So if I click left mouse button, as you can see, as soon as we click we can see that we playing attack

04:45.060 --> 04:46.540
three animation clip.

04:46.740 --> 04:52.700
But the problem is that I want to play this attack one and attack two animation as well.

04:52.700 --> 04:55.180
So we also need to trigger this parameter.

04:55.180 --> 04:56.900
So I'm gonna choose a trigger.

04:57.060 --> 04:59.900
Basically I will trigger a random one like this.

04:59.940 --> 05:02.850
Attack one, attack two, or this attack three.

05:02.850 --> 05:09.690
So if we just trigger a random attack, uh, basically this parameter, uh, by picking up a random

05:09.690 --> 05:14.370
one, then it's going to do so instead of playing a some certain parameter.

05:14.370 --> 05:19.330
Basically, instead of playing this attack three animation clip, we're going to choose a, we're gonna

05:19.370 --> 05:25.730
trigger a, we're gonna trigger a random attack one random this attack one, attack two, or attack

05:25.730 --> 05:27.250
three, a random one.

05:27.250 --> 05:32.730
So it's gonna play the random animation clip, which can be attack one, animation clip, attack two,

05:32.770 --> 05:34.010
and attack three.

05:34.210 --> 05:35.730
So let's get out of play mode.

05:35.730 --> 05:40.810
And for that, we're gonna use, uh, a random dot range function.

05:40.810 --> 05:42.490
So move over to your scale.

05:42.610 --> 05:48.370
So before we instead of playing a some certain which in our case attack three, we're gonna choose a

05:48.370 --> 05:49.250
random one.

05:49.250 --> 05:51.570
And then we're gonna play that animation clip.

05:51.570 --> 05:57.930
Basically we need to trigger that attack one, attack two, or attack three, basically a random one.

05:57.930 --> 06:03.610
So it's gonna play, uh, those animation clip which can be attack one, attack two, and attack three.

06:03.610 --> 06:04.570
Animation clip.

06:04.570 --> 06:09.530
For that, we're gonna use this random random dot range function.

06:09.530 --> 06:15.410
And we do know that this random dot range function in brackets is going to take the minimum inclusive.

06:15.410 --> 06:22.450
So we will pass zero and it's going to take the maximum include maximum inclusive.

06:22.490 --> 06:23.010
Sorry.

06:23.050 --> 06:26.330
We we're gonna pass uh three uh three.

06:26.330 --> 06:28.330
And let's close that up with semicolon.

06:28.330 --> 06:33.890
So this random dot range function, it's gonna pick up a random number between 0 and 3.

06:34.090 --> 06:35.130
It can be zero.

06:35.130 --> 06:36.090
It can be one.

06:36.090 --> 06:37.090
It can be two.

06:37.130 --> 06:39.170
But it's not going to pick up this three.

06:39.210 --> 06:44.250
It's gonna accept that and it's gonna pick up zero definitely.

06:44.250 --> 06:45.690
So it can be random one.

06:45.690 --> 06:46.730
It can be zero.

06:46.730 --> 06:50.010
It can be two and it can be one.

06:50.010 --> 06:55.730
So what we're gonna do whatever this random dot range function pick up, we're gonna store it into a

06:55.730 --> 06:56.690
int variable.

06:57.130 --> 07:00.720
So let's store it and let's call it attack index.

07:00.720 --> 07:03.360
So let's call it attack index.

07:03.360 --> 07:05.440
And let's set equal to this.

07:05.440 --> 07:08.960
So let's suppose this random dot range function pick up one.

07:08.960 --> 07:15.160
So this attack index right over here it's gonna be one say because we directly setting it as you can

07:15.160 --> 07:15.520
see.

07:15.800 --> 07:21.520
So in that moment what we're gonna do, uh, we're gonna play a we basically we will check.

07:21.520 --> 07:23.480
So we're gonna use this if condition.

07:23.480 --> 07:26.320
Let's make first bracket and some curly bracket.

07:26.320 --> 07:29.080
And let's suppose this attack index became zero.

07:29.320 --> 07:36.240
So if our attack index is equals equals to zero, then we will play the first animation clip.

07:36.480 --> 07:42.440
Else if else if our attack index attack is index.

07:42.480 --> 07:47.600
If it's equals equals to one then we're gonna play the attack to animation clip.

07:47.640 --> 07:50.480
Else if it's not 0 or 1.

07:50.480 --> 07:54.320
And let's suppose this a random dot range function pick up two.

07:54.480 --> 07:57.680
So in that moment we're gonna play the third animation clip.

07:57.680 --> 08:02.000
So else else we will play the third animation clip.

08:02.000 --> 08:04.120
For now, let's print out a message.

08:04.120 --> 08:10.680
So if our attack index is zero and we do know that this random dot range function right over here is

08:10.680 --> 08:14.360
going to pick up a number between 0 and 3.

08:14.360 --> 08:17.760
So let's suppose this random dot range function pick up one.

08:17.760 --> 08:20.600
So it's going to move over to this if condition first.

08:20.600 --> 08:22.440
So attack index is one.

08:22.440 --> 08:25.000
So this right over here just going to be false.

08:25.000 --> 08:28.840
Because attack index is not equals equals to zero.

08:28.840 --> 08:30.600
So it will move over to next.

08:30.640 --> 08:31.840
Else if condition.

08:32.040 --> 08:34.160
So attack index right over here.

08:34.160 --> 08:36.680
As you can see we assume it one.

08:36.680 --> 08:42.360
So this condition right over here becomes true attack index is equals equals to one.

08:42.360 --> 08:45.880
So in that moment we want to play the second animation clip.

08:46.080 --> 08:47.960
For now let's print out a message.

08:47.960 --> 08:52.840
So if our attack index is zero then we're going to play the first animation clip.

08:52.840 --> 08:55.520
So let's print out something like Debug.log.

08:56.000 --> 09:01.360
Uh play play attack one animation clip, Something like that.

09:01.400 --> 09:05.480
Attack1 animation animation clip.

09:05.800 --> 09:08.040
And let's close that up with semicolon.

09:08.040 --> 09:16.080
And we're going to copy this line of code by Ctrl C and sorry Ctrl C and let's paste it inside over

09:16.080 --> 09:17.360
here by Ctrl V.

09:17.520 --> 09:23.080
So if our attack index is one then we're going to play our second animation clip.

09:23.080 --> 09:26.320
So I will say something like play attack to animation clip.

09:26.480 --> 09:36.000
Else if our attack index is not equal to 1 or 0, if our attack index is something like two, then in

09:36.080 --> 09:38.800
that moment we're going to play the third animation clip.

09:38.800 --> 09:42.760
So I will say something like play attack three animation clip.

09:42.760 --> 09:45.720
So now let's press down Ctrl S to save our script.

09:45.720 --> 09:47.640
And now let's move over to unity.

09:47.840 --> 09:54.720
So if our attack index is zero then you will see in our console tab the first animation.

09:54.760 --> 09:59.840
The message says like play attack one animation clip just gonna pop up.

09:59.840 --> 09:59.870
up.

10:00.350 --> 10:06.230
But if our attack index is one, then it's gonna say something like play attack one.

10:06.230 --> 10:07.190
Animation clip.

10:07.230 --> 10:07.590
Sorry.

10:07.630 --> 10:08.950
Attack two animation clip.

10:09.150 --> 10:15.630
Else our if our attack index is not is equal to zero or 0 or 1.

10:16.390 --> 10:18.750
Let's suppose this attack index is two.

10:19.070 --> 10:26.390
Then in this situation, this third uh third else condition this right over here just gonna be execute.

10:26.390 --> 10:28.310
So this message should be pop up.

10:28.310 --> 10:32.430
So let's move over to unity and let's select our console tab.

10:32.430 --> 10:34.270
And let's click on this play button.

10:34.270 --> 10:39.590
So as soon as we're gonna click left mouse button we're gonna see a random message just gonna pop up

10:39.590 --> 10:42.910
in our console tab a console tab.

10:42.910 --> 10:49.350
Because since this random dot range function right over here gonna pick up a random number between 0

10:49.350 --> 10:53.910
and 3, it can be zero, one, and two, but it's not gonna be three.

10:53.910 --> 10:59.070
So if I click left mouse button, as you can see play attack one animation clip.

10:59.070 --> 11:05.060
And now if we go ahead and click the left mouse button one more time, we can see a play attack one.

11:05.100 --> 11:10.980
And now it says Play Attack three, animation clip attack three, attack one and attack three.

11:11.780 --> 11:14.860
Uh, so let's, uh, click some more time.

11:15.300 --> 11:19.660
I don't know, it's, uh, only picking up, uh, zero.

11:20.300 --> 11:26.100
So it's not doing so it, it can be one, two and three.

11:26.100 --> 11:30.780
So as you can see if our attack index is zero.

11:30.780 --> 11:36.700
So in this situation what we're doing we just printing out play attack one animation clip as you can

11:36.700 --> 11:36.940
see.

11:37.140 --> 11:40.860
So this random dot range function just picking up zero.

11:41.020 --> 11:44.620
And over here it just moving over to the first if condition.

11:44.620 --> 11:48.340
So if our attack index is equals equals to zero.

11:48.340 --> 11:51.820
And let's suppose this random dot range function pick up zero.

11:51.820 --> 11:53.860
So this attack index will be zero.

11:53.860 --> 11:56.300
So zero is equals equals to zero.

11:56.300 --> 12:03.820
So that's why this uh message just getting pop up in and pop up in our console tab says Play Attack

12:03.820 --> 12:05.180
one animation clip.

12:05.220 --> 12:06.260
As you can see.

12:06.420 --> 12:12.940
But if it's something else, basically if our attack index is one, then in that moment we are printing

12:12.940 --> 12:17.340
out this message, as you can see, which says play attack to animation clip.

12:17.500 --> 12:25.620
And if our attack index is two, uh, is not equals equals to zero or equals equals to one.

12:25.660 --> 12:32.740
Then in that moment, as you can see we printing out this message says play attack three animation clip.

12:32.740 --> 12:39.700
So instead of printing out a random message we basically want to play a random animation clip of attacks.

12:39.700 --> 12:42.140
So if I move over to my animator tab.

12:42.140 --> 12:47.140
So basically we need to trigger a attack one as well as attack two and attack three.

12:47.460 --> 12:51.820
Uh, if our attack index is zero, then we're gonna trigger the first parameter.

12:51.820 --> 12:54.380
So in our case, attack one parameter.

12:54.380 --> 13:00.250
And if our attack index is something like one, then we're gonna trigger this attack two parameter.

13:00.250 --> 13:06.370
And if our attack index is is two, then we're going to trigger this attack three.

13:06.650 --> 13:10.330
Sorry attack three parameter instead of printing out message.

13:10.330 --> 13:12.930
So it's going to play the random animation clip.

13:12.930 --> 13:18.850
So if I go ahead and manually trigger this attack one, attack two and attack three animation clip.

13:18.850 --> 13:25.010
As you can see it just playing, uh, the attack one, attack two and attack three animation clip.

13:25.010 --> 13:29.290
So instead of doing manually, we're going to do it through, uh, through our code.

13:29.290 --> 13:33.450
So instead of printing out message we're gonna trigger those parameter.

13:33.450 --> 13:38.530
So let's get out of play mode and let's double click on this message in order to open that up.

13:38.530 --> 13:45.050
So if our attack index is zero then I want to play the first attack one animation clip.

13:45.170 --> 13:48.610
So what we will do we will go over to animator.

13:48.610 --> 13:52.610
And then we're going to use this set trigger function and make this first bracket.

13:52.610 --> 13:58.530
And inside this uh brackets in quotation it's going to take the parameter name.

13:58.530 --> 14:05.010
So if our attack index is equals equals to zero, then I want to play the first animation clip.

14:05.010 --> 14:08.690
So in my case I need to trigger this attack one parameter.

14:08.690 --> 14:10.930
And now let's close that up with semicolon.

14:11.010 --> 14:13.810
And I'm gonna copy this line of code by Ctrl C.

14:13.970 --> 14:16.370
And let's paste inside right over here.

14:16.370 --> 14:22.970
If our attack index is equals equals to one then I want to play the second animation clip.

14:22.970 --> 14:28.930
So in my case I need to trigger the second parameter which in our case attack two.

14:29.130 --> 14:35.730
And we're gonna replace if our attack index is not equals equals to one or equals equals to zero.

14:35.890 --> 14:39.890
If our attack index two uh attack index is two.

14:39.930 --> 14:47.450
So in that moment I want to play the third animation clip so we can simply, uh, cut this and let's

14:47.450 --> 14:53.370
paste inside right over here by Ctrl V, Ctrl X for cut and ctrl V for paste.

14:53.370 --> 14:59.610
So if our attack index is not equals equals to zero or equals equals to one.

14:59.690 --> 15:04.170
And if our attack index is two, then what we're doing, we're just going over to.

15:04.210 --> 15:07.170
Animator and then triggering the third parameter.

15:07.170 --> 15:12.730
And if our attack index is one one then we're just triggering the attack to.

15:12.770 --> 15:13.570
Parameter.

15:13.570 --> 15:19.650
And if our attack index is zero then we just triggering the first parameter, as you can see.

15:19.690 --> 15:25.010
But we do know that this random dot range function is just gonna pick up a random number.

15:25.010 --> 15:28.610
It's not gonna pick up all the time zero or 1 or 2.

15:28.650 --> 15:30.170
It's gonna pick a random.

15:30.170 --> 15:36.570
So basically we're gonna able to see a random animation clip just gonna play, since we're doing, uh,

15:36.570 --> 15:39.170
using this random dot range function.

15:39.170 --> 15:44.290
And this attack index can be a random one, it can be zero, 1 or 2.

15:44.570 --> 15:48.770
Uh, if if it's two, then it's gonna play the third animation clip.

15:48.930 --> 15:54.210
If it's zero, then it's gonna play the first animation clip right over here, as you can see.

15:54.410 --> 16:01.280
And if our attack index is one in that moment, it's gonna play the second animation clip since we triggering

16:01.280 --> 16:02.640
the second parameter.

16:02.640 --> 16:03.720
As you can see.

16:03.800 --> 16:10.040
Firstly we going over to animator component and we using this trigger function in order to trigger that

16:10.040 --> 16:17.560
parameter and make sure you inside this quotation, you pass the parameter name perfectly and make sure

16:17.560 --> 16:18.840
you spell it correct.

16:18.840 --> 16:25.000
And once you are done, press down Ctrl S in order to save your script and then move over to unity.

16:25.240 --> 16:28.520
So we should able to see a random attack animation.

16:28.520 --> 16:29.480
Just gonna play.

16:29.680 --> 16:34.320
It can be first, one, second and the third since that random dot range function.

16:34.320 --> 16:38.000
Just gonna pick up a random number between 0 and 3.

16:38.040 --> 16:42.480
It's not going to pick up three, but it's going to pick up two, 1 or 0.

16:42.480 --> 16:44.400
But it can be random one.

16:44.400 --> 16:48.560
So we will able to notice a random attack animation just gonna play.

16:48.560 --> 16:52.520
So let's click on this play button in the top in order to start our game.

16:52.520 --> 16:55.160
And let's try to click left mouse button.

16:55.200 --> 16:58.080
Then we're calling the play attack animation function.

16:58.080 --> 17:04.950
And that function basically picking up a random number and then triggering a random attack parameter.

17:04.950 --> 17:11.350
As you can see, we are able to notice we playing random attack animation clip, we playing the third

17:11.350 --> 17:17.830
one, we playing the first one, and also oh, also we playing the third one and the second one.

17:17.830 --> 17:19.110
So this is the third one.

17:19.110 --> 17:23.150
This is the second one and this is the first one as you can see.

17:23.350 --> 17:26.230
And we can take a look in animator tab as well.

17:26.230 --> 17:31.910
So if we select our animator tab and then select the player game object in the hierarchy, we can take

17:31.910 --> 17:33.470
a look in animator tab.

17:33.510 --> 17:34.950
It's triggering this month.

17:34.950 --> 17:38.350
This one and this one I guess.

17:38.390 --> 17:39.550
Yes this one.

17:39.550 --> 17:41.630
So it's triggering a random one.

17:42.150 --> 17:43.790
So I hope you get the idea.

17:43.790 --> 17:47.830
And you can notice in left side in animator tab as well.

17:48.150 --> 17:50.950
So I hope you get the idea that how you can do it.

17:50.950 --> 17:52.630
And let me explain one more time.

17:52.630 --> 17:54.310
So I'm gonna get out of play mode.

17:54.310 --> 17:57.310
So firstly, what are we doing if we move over to script?

17:57.430 --> 18:04.270
Uh, firstly we checking if we, if input dot get mouse button down zero basically means that if we're

18:04.270 --> 18:08.790
clicking the left mouse button, then we're calling this play attack animation function.

18:08.790 --> 18:11.190
And that function basically doing these things.

18:11.310 --> 18:14.950
Firstly we are using this random dot range function.

18:15.230 --> 18:19.710
Uh and we pass zero and three since we have three animation clips.

18:19.710 --> 18:22.670
So that's why we pass as a second argument three.

18:22.830 --> 18:28.030
So this random dot range function just going to pick up a random number between 0 and 3.

18:28.230 --> 18:31.950
It can be one, it can be two and it can be zero.

18:31.950 --> 18:35.710
So let's suppose this random dot range function pick up uh one.

18:35.710 --> 18:40.870
So this attack then what we're doing we're storing that number into this attack index.

18:40.870 --> 18:43.270
So this attack index is just going to be one.

18:43.270 --> 18:45.270
So it will move over to first condition.

18:45.270 --> 18:49.870
And it will check if our attack index is equals equals to zero.

18:49.870 --> 18:51.230
So we assume it one.

18:51.230 --> 18:56.950
So this if condition getting false because attack index is not equals equals to zero.

18:56.950 --> 18:58.710
So it will move over to next.

18:58.710 --> 19:00.020
Else if condition.

19:00.020 --> 19:04.380
So now it's gonna check if our attack index is equals equals to one.

19:04.380 --> 19:08.140
And we assume it attack index is one.

19:08.140 --> 19:10.540
So this condition over here getting true.

19:10.540 --> 19:14.180
So in that moment what we're doing we're just going over to animator.

19:14.180 --> 19:18.100
And we're just triggering the second parameter which is attack two.

19:18.140 --> 19:21.300
So that's why it's playing the second animation clip.

19:21.300 --> 19:22.940
So I hope you get the idea.

19:22.940 --> 19:28.020
So you can use this random dot range function in order to pick up a random number.

19:28.020 --> 19:33.460
And with that random number you can simply play a random attack animation clip.

19:33.460 --> 19:39.500
So I hope you get the idea that how you can do it, and make sure you press down Ctrl s on your script

19:39.500 --> 19:45.900
in order to save your script, and then move over to unity, and also press Ctrl S on your keyboard

19:45.900 --> 19:47.980
in order to save your project.

19:47.980 --> 19:52.620
So whatever you have done so far in Unity Editor, it will be saved.

19:53.420 --> 19:56.740
And we can just go over to console tab.

19:56.740 --> 20:00.220
If we have some messages, we can just clear that as well.
