welcome to video number 11 and in this
video what I'm gonna go through is
there's a bit of fine tuning left on the
boss and then we're gonna give them
collision capsules that are gonna damage
our night character a warrior and I
realized that there was one more thing
that I needed to add on the melee class
so I will be making an extra melee video
and it's not an optional one you need to
watch it because otherwise you won't be
able to complete the whole game so be
sure to watch the next extra video and
it's gonna be called melee combat so
let's continue with our boss here so go
in the boss blueprint and if you notice
my graph here looks a bit different than
yours probably that's cuz I expanded
this switch on integer and I added more
combos in there I just made more animal
touch and everything else is pretty much
the same and here I switched the player
distance function to one I put it to
three because I don't want my boss to
attack too often the little fine-tuning
aspect is here face player we're gonna
call this in the boss's animation so I'm
just gonna do a few of them or maybe I
might do all of them so for example if I
go into Hadouken one
here when he's charging it's for certain
you're gonna be able to dodge so let's
say at this point he looks at the player
and then he fires it so I'm making you
notify and I'm gonna call it bass player
the same title as our as our custom
event then let's say I'll put one here
two and I have animation trails in mind
so you probably don't have them in yours
let's say here I could add a face player
and then all these melee attacks this
one I'll leave it anything with one hit
I won't make him face the player in them
because I don't see the point it's just
one hit but like a big hit like this
where he holds a little bit here I can
add a face player and these combos to
let's say halfway through the combo oops
I'm free to the combo he can face the
player
if you don't have these animal ties made
you can do them on your own I just
wanted to have them all in this one to
multiple attacks
later when we refine him further what
I'm gonna do is these attacks where he
strikes the player multiple times well
they're only gonna be accessible to him
when you use a bit lower on health and
we'll make them do more damage too
and this is my favorite one
streetfighter kick so I probably wanted
to face player than lunch so it's a
really scary looking attack he's gonna
face player right before each lunch this
was called hurricane kick the
this will be the ultimate attack so what
I'm gonna do now is I'm going to go into
this animation blueprint and I'm gonna
go get that notify bald-faced player and
I forgot to comment this so I'm gonna
call this launch and get the custom
event called face player
I'm a comment listen call it faceplant
so with that out of the way what we can
hear I'm just gonna do a quick demo to
show you what I did and I'll end the
video segment for this and we'll
continue on with the next so as I
approach him see it turned in the middle
of his attack yeah it turned like that
so it's a bit more dangerous for me so
the best bass players I put the easier
it is because I can stay behind him and
keep attacking him but this just makes
it more challenging it tells me to dodge
more and I sped up my dodge animation
because the other one I found it was too
slow just for gameplay I know it doesn't
look so real a guy in heavy armor so
we'll continue on with the next segment
on the bus in this segment I'm gonna
continue working on our bus so in my
Google bus character blueprint as you go
to his viewport and want to take off is
animation blueprint so I'll put it to
none and I'm gonna compile next I'm
gonna get capsule capsule collision and
I'll call this right fist duplicate this
and call it left fist
now take both of them and drag and drop
them under mesh so here we can have
access to the sockets this is right fist
so I'm gonna get right hand right there
and for left this time I'm gonna go get
left hand I'm gonna zero out all these
values up here
and I'm gonna adjust these fists these
capsules properly and I'm gonna scale
them up too right now I'm gonna leave
them quite big so this overlaps the
player it can hurt him but later when
it's time to adjust it a bit I'll do it
then
okay now in this capsule you can type in
collision and you're gonna see custom
presets like collision presets are you
set it to custom and then put it to no
collision do the same thing for the
other fist so put it to custom and then
no collision then we're gonna go in his
event graph and I'm gonna comment this -
it's my flow strange attacks and these
are my long-range effects so I know the
quote that follows it's about that okay
now what we need is something that
enables and disable the collision on
these two so like these and you want to
get both
drag a wire out type set collision
enabled copy-paste that
top-1 we can cut it to collision enabled
and the bottom one to no collision to
make two custom events will call this
left fist actually II call left fist in
a book revision that fist and then this
one we're gonna call it we call right
fist
I put another underscore so it's easier
to read
remove the word copy
okay now that we have this and actually
yeah we're gonna need more of these
actually disconnect left wrist copy
paste both of these connect left wrist
so this is the label collision left
enable collision right now we get it
disabled the collisions too so you could
copy these two custom events are based
on connecting to the ones below and then
we're gonna change their names so you
want to remove the word copy obviously
and change e to D for disabled
so now we have events that can be fired
to turn those collisions on and off I'm
gonna comment this I'm gonna call it
this division
a /d for enable and disable one more
thing go back to viewport click on the
capsule for right fist and do you want
to type in collision again here it says
object type world dynamic we're gonna
change this later when we're dealing
damage put everything to ignore but put
vehicle to actually put pawn to overlap
with vehicle to overlap and put
destructible to overlap do the same
thing for that fist so put everything to
ignore except for pawn vehicle
indestructible we're gonna leave those
on overlap next thing we're gonna do is
go back to his event graph I'm just
gonna move this to the side I'm gonna
make a bunch of constraints
and what these are gonna do it they're
gonna tell me when the fists are getting
turned on or off so I'll say II right
and then D right for disabled right and
right will be read and who will be left
I shall put it yellow and red yellow
when it's on red when it's off and this
one green when it's on and blue when
it's off
this is the left and this is a left
now to get this working I'm only gonna
do it for I guess the first three
montage these three and you guys can do
for as many as you have placed so going
into okay unreal froze so what I'm gonna
do is I'm gonna stop the video segment
and I'm gonna continue I don't know why
this happens a lot
okay so I realized the animation
blueprint sometimes goes haywire for
some reason when there's a taboo on it
so I reconstructed everything pretty
much and here I don't know if I put a
animation blueprint on them again
but I'll leave that there and I'm gonna
save that so in the event graph this is
what I had set up I kind of changed the
names a little bit it's just to hurry up
and continue on recording and now we're
gonna need to go into the animation
blueprint which hopefully yeah it didn't
crash so let's go into I had mentioned
okay I hope it doesn't crash again
anyways let's go after this maybe old
one let's open that up
so his right tan I want to enable right
there
so I'd notify we're gonna say P rights
and then D right
while we're here let's just make some
more notifies he left and D left these
are just for his fists I'm gonna delete
these two because I only want the right
one so it gets enabled at lands and it
gets disabled again around here
it may be a good practice to make sure
it's disabled so you start with disabled
and may rule it and disable it once more
now I'm gonna go get strong one and I'm
gonna add the same types of not advice
this time is this left hand so I need to
enable not even here Rocksmith be here
so enable the left the action is done
disable it I'm gonna copy this and I'm
gonna paste at the start now let's go
after the next one kickin
okay this is a different one because he
utilizes his feet so basically what I
did with the arms where I attached
capsules and I'm enabling and disabling
them you would do the same thing with
the feet because he's not attacking with
his hands really that's what this feet
but if we can do is we can kind of keep
this although I recommend you do that
with his feet I'm gonna enable and
disable his hands because they cover a
large amount so yeah I guess the
capsules are enabled and then they're
gonna get disabled right here
so I'm gonna disabled left and disabled
right but I'm gonna copy these actually
I'm gonna go in by one copy paste copy
and paste so that's out of the way I
don't need to enable or disable here the
next thing I need to do is click here
and let's check the events on component
begin overlap I need one of that and I
also need it for the right fist on
component begin overlap now we're gonna
take care of this in the next segment
when we add to it but in the meantime
let's just test out and make sure the
animation is triggering triggering the
fists on and off
hopefully in Oliviana mission because I
have so many it doesn't I'm gonna pause
the video and I'm gonna set it up for
all of them
and then with the start again get one
more shot okay I'm gonna pause the video
and I'll set it all up okay so I
finished up setting up all Deanna and
montage so let's see
oh right missing another crucial step
i hate when i forget things like that
there's just so much going on and it's
here we're missing your right knee right
knee left and do that
okay now I'm gonna go get my typing
ecole left you call right I'm basically
calling the events I mean earlier I'm
gonna get D call left deke alright so
dick alright is here
Eco left right they're equal writers up
here and the last one down here
so I'm going to comment this to fist
call or collision and I'm just going to
save this and press play
there you go all these colors are
appearing things are getting turned on
and off as collisions they're getting
triggered so I'm gonna stop this segment
here and the next segment we're gonna
make it detect the player all right so
for this segment let's start by going to
the blue balls blue print and in fist
fist collision okay what I wrote fist
collision I'm gonna delete all the
prints next we had made these two boxes
earlier and other character I'm gonna
type get class Oh actually I'm gonna
type in let's see if this might work
stat equal equal and then type I get
player character
and put two branches
and connect the condition I don't know
thank you do the both yeah you can so if
it's true you print
left Claire it's because the left face
left fist is overlapping the player and
then here right Claire and right we'll
color it red so this doesn't work I have
another method to try
now let's go and get hit by that guy
oh look at that detected me
just to make sure that it really is
working I'm gonna go into warrior and
I'm gonna make a custom event then I'm
gonna delete later but this is for test
let's call it just an event here
so this custom event we're gonna call it
the test
and it's Prince
I'm gonna call it
I'm hit
so I could delete these two print
strings from the blue box blueprint and
here and get player character I need to
do get fast
and then I'm gonna type equal equal from
this
I'm not none even need this actually I
don't know what I'm doing actually no I
don't what I'm doing yeah yeah we're
gonna tighten or your underscore DP and
connect to go to these the reason why
you're doing this is because later
you're gonna have a a mage character so
when it's warrior well you're gonna
trigger something in the warrior and if
it's made you're gonna trigger something
in the mage drag another pin from here
untied cast to a warrior like this into
true and you want to copy paste act like
that integer then we made an event
called test you want to get that for
both you could have two events one that
says I'm hit with left wrist I met with
right fist but I'm just gonna do this
okay let's let him beat us up
oh nothing there you go
took a hit
I think it's only one of these Pistons
doing it and the reason being it's
probably because this
or maybe we should do treatments just to
be sure shot about this it's copy this
so test copy and I'm gonna color it red
I've been test get test copy and hit
play again
okay well looks like one of his fists
isn't working so that's something to
troubleshoot
it's probably this other class right
here
other glass
they're not works that's what was needed
now he's hitting me with both of his
fists so you really needed to get this
other actor here and connect this
together this thing looks like a mess
but it's clean it up
I can also delete these two contestants
by the end of this you're gonna have
wires everywhere these look nice but not
these guys
so actually I'm just going to leave
those test events on for now
we'll get rid of them like there are the
time comes
so that's it that's kind of it for this
segment one more thing you might want to
do is invariably create two variables
call this min dmg and make another one
called max the energy and convert both
of them into floats what we're gonna do
with these is set up the minimum damage
and maximum damage for each attack so if
I move all this to the side these both
of these variables are gonna be set
right here right after lunch force so
you could set set min damage and set max
damage unless you just want your attack
do Willett 820 damage at each time if
you wanted to do between let's say I
don't know 18 and 24 well this is the
method to go with otherwise you only
need one variable and that variable
could be called the damage but I always
like to go with 2 so sometimes you don't
know how much you're gonna get hit by
what you do after is basically and put
the values o I'm gonna stop the video
segment here and I'm gonna continue
doing this grunt work and in the next
video segment I'm gonna see what else
we're gonna refine on them
to finish this video we're gonna be
doing some sphere tracing this is so we
can every time we get hit we didn't
spawn a sprite or a particle so I'm
gonna start by making the particle first
I'm gonna duplicate if you're going to
start your content and this isn't your
starter content particles take the
explosion and duplicate it or call it P
underscore fist sprite and then in here
take a fireball spark fire light smoke
in fact you could just delete this
because for this you won't be needing
them then right-click and go color
initial color put it over color over
life and uncheck it so now this thing is
white now what we can do is we'll save
this and let's go into blue bus here in
the overlap by the way see this thus
we're gonna be making so I'm just gonna
leave it on the side as a reference but
I'll remake it with you guys so and
these are the event begin overlap I'm
just gonna disconnect this stuff and I'm
gonna delete test copy I'm gonna go into
warrior blueprint in the event graph and
delete the events from here to just
gonna compile save this and save the bus
now you have to go into your Anna
montage let's say you go into MIDI one
now I need to make 200 notifies I
already made it right here but that's
because I placed it in all of the
animation notifies so it took a while
but this is a good one so for example
you have L trace you need our trace and
L trace these are two notifies that get
triggered for example let me show you
something that looks like a total mess
yeah that's yeah this one so here's the
animation now look at the notifies total
mess right here what's happening is you
see where it says L trace this is where
it's gonna fire a spear and check if
there's a character in front of it if
the player is in front of it if it is
it's gonna spawn a hit sprite and then
you see the next one here our trace well
check this so right here it's gonna fire
another one straight and check if
there's something here if there is and
it's the player it's gonna spawn a
sprite so I put a bunch of those and
this stuff you see here it's
enable/disable collision all this stuff
so it's a multiple hit attack now let's
go back into the boss blueprint and here
I made trace right and trace left so
I'll make new custom events for this
tutorial right click and type in custom
event and let's call it
our underscore trace and copy-paste it
you want to call this one L on your
support race once your animation
notifies are done and you made those two
custom events go to your bosses
animation blueprint and go and call
those two animation notifies so it was
our trace and L trace then we're gonna
go get those two custom events we just
made and it was our underscore race and
L wonder sport race I'm just gonna
disconnect the pin and connect the right
ones together so I got our trace up here
and L trace down there I'm gonna call
this this tracing I'm gonna close the
animation blueprint because it's not to
do evil things to unreal and crash some
reason now coming back here I won't work
on the left one I'll work on the right
one first so type in fear trace it
sphere trace by channel
so here what I need is first stuff oh
not bad Channel sorry its sphere trace
for object that's the one now here it's
object types you drag this and make
array select pawn then in radius will
put 64 I'll connect these together and
and out it
we hit break the hit result put a branch
and where it says hit actor type in
equal twice and then type and get player
character plug that in right there put
it into the condition then what you want
is spawn emitter at location and you
want to get type in fist and you should
have it this sprite you want to spawn
this and you want to spawn it at the hit
location rotation I'll leave it as 0 but
if it doesn't look good and will change
something up in here now the next thing
is this so you're gonna copy paste that
code and I'm gonna explain it and so
first you get this is right trace so
we're gonna get right fist and from it
you need to drag a pin and type in get
world location that's what this is so
that's a little weight then you need to
also get world rotation okay so this is
out of the way next you drag a pin from
here and type in get forward vector
which is right here and what you want to
do is multiply this by foot okay so
that's out of the way to and then this a
vector plus vector node so you connect
these two together this goes to the end
and this goes to the start and I think
our chain is pretty much completed
and here you can type in I don't know
strive with 1000 and debug type for
duration so this is just for the right
fist trace so we can copy/paste this
whole code and call it for the left fist
I'm going to eat my old one
on the side here
so let's play and give that a shot and
see what happens
I'm just gonna run into them and let him
hit me so you see that the green ones
are hits the red ones are miss but this
is going really far and like the sprites
are okay
so what I'll do is here I can produce
this - I don't know maybe 300 will do
this you just play around with whatever
satisfies you and when you're gonna have
actual characters in there in the
animation make sure that the landing
point at least one area where they're
pointing straight in front of them and
that's where you want to get the trace
from like this guy it's gonna be all
over the place some of them are gonna be
flying back like that you see you don't
want that you want them all going in the
front and if I turn off debug and set it
to none you're gonna see all the hit
sprites appeared without all the messy
lines
if that's too big well you can always
set the scale of the hit sprite
and I think it was set world scale 3d
and you could just add that better 0.4
you do throw this one too
yeah there you go
so this pretty much ends this video and
in the next one you know every time I
have to make a next one I'm not too sure
what I gotta do so I got a plan a bit
and then I'll see what it is that I'm
gonna cover perhaps we'll work on his
abilities like debugging the player or
maybe is ultimate that'd be a good one
to make him uses ultimate when his
health is low so we're gonna do some
damage to this guy too but maybe not
with our attack combos with just a click
of a button maybe I don't know anyway so
thanks for watching and I'll see you in
the next video