In the last video some of you may have noticed that I made this a little bit of a mistake with this
command in the I two weapon weight attacks should be set back to true
case for the reason why.
Obviously this needs to be true in order for this to take effect again.
Okay so there is gonna be an assignment in this video to give you that soon.
First of all we need to figure out a way in which to get this not to be hard coded.
We don't want to put in the hard coded value for wait for seconds.
That was your task in the last video and hopefully it was quite easy and you figured out how to do it.
Okay.
So where shall I put it.
I'll put it up here.
It's going to be a serialized field
so a type.
This one's actually going to be a float as opposed to an integer type.
I know I'll call it.
I think we'll call it wait time.
I might even give it like a default value of 1.0.
Okay as in the float.
So now what we can do under the wait for seconds we can simply refer to wait time.
All right.
Which means that we can now change that on the fly.
So for example current weapon 0 we don't have to worry about current weapon 1.
We can say wait time equals one point zero f..
Okay now let's say that for Who are you.
Okay.
This wants the baseball bat isn't it.
So a current weapon to read it say wait time equals and let's make a little bit longer let's say maybe
this one wait one point five seconds or something like that for this one for the ax.
You might experiment with a different time current what can fall for the gun.
This one might be really really quick.
So this one could be like wait time
equals zero point two f or something like that and I'll just fill this one in just for the sake of getting
everything completed on air and so wait time equals an alarm I put like one point six or something like
that.
Oh yeah I just remembered when the F so that he knows this float and this will of the sea change this
and now it's become dynamic it will change depending on which weapon we have selected and you will have
to actually play through this to see what happens because the different animations are different ones.
You don't want it to start replaying the second loop of the animation and then suddenly do nothing so
refined that by playing through it.
Okay.
So at the moment under the key code dot mouse zero attack equals true.
We've got one weapon set up but we need four different weapons or at least three different weapons in
this section and one weapon in that section.
So to determine if this is weapon one or weapon 2 etc. We can say if current weapon is equal to the
value of one
then do all of this
and then obviously you can just copy that pasted underneath.
If current weapon is equal to true weapon strike value equals to true.
And this is your assignment.
Okay so what I'd like to do in this assignment is backing the animator
we currently have no straight one.
We now need axe strike baseball strike and gun fire okay.
And strike baseball strike will be connected to weapon ready.
Gunfire will be connected to gun ready.
You know if you noticed that each of these as a condition weapon straight equals one bullet to figure
out which one is equals two equals three.
Gun fire is going to be equals 4 and then they want you to do that in the script.
Remember that the gun version of this one key called Mouse zero should go in this section down here.
Let's see how you get on with the next.
By the next video it's a little bit more complicated but by now you should have really picked up the
scripting and be quite familiar with it quite confident.
And if you can achieve this one then you're making really really good progress.