welcome to video number 10 in this
series and we're gonna start off by
adding some animation montage to the bus
so that way we can check how the tacks
are playing out for the tutorial I'm
only gonna do a few of the Anna montage
because I added some animations and you
can download them in the the video
description there's a link so be sure to
import those and boss animations and I'm
gonna do let's say three merely
close-range attacks and too far range
attacks just for starters and then the
rest of the animations you can do
animation montage chop up them and plug
them in yourself so to start here I
imported all my animations and I'm gonna
take I don't know let's go check what we
have we got boxing we have cross punch I
like that one so I'm gonna take cross
punch create a demo - I'm gonna type BB
for blue bus maybe a 1 then I'm gonna
get a punch recieve a punch
it's kind of like this the other one I
just made cross punch
I'm gonna check kicking yeah I'm gonna
get a animation montage out of this so
maybe underscore keeping and one more
let's check this one
maybe swiping this is a strong one so
we're gonna take this one and make an
animal - keep the underscore strong or
one because I know there's multiple
melee and there's two hits that look
pretty strong this is the second strong
looking on these fins and strikes so now
let's go get to long-range - looking
attack first we're gonna get worse
fireball that's right I really like this
one so it's gonna shoot a fireball at
the player so create running montage BB
will call it hadouken and we're gonna go
look for
see as this war
yeah let's use that
create animal Taj EP underscore we're
gonna call this debuff because it will
be used to debuff the player so in boss
I'm gonna make a new folder and call it
and a montage go back to animations and
take these any montage we just made and
put them in the right folder now once
they're here we're going to open these
up change the groups of body
okay now let's go back to our boss
folder click on blue bus I need to make
two variables first one we'll call it
alive second one we'll call it is
attacking so here in initialize bus
after you can begin play I'm gonna set
is attacking to treat I mean sorry is
alive we will use this further down in
this tutorial then let's go into our
player distance function and put a
branch and this branch is gonna check if
he's attacking connect the false part of
the branch to the ongoing node and put
is attacking as a condition so while the
attacks were not gonna initiate any
other attack animation so we're gonna
wait for it to be done then in his event
graph or in his player distance I guess
now we could do it here in the event
graph right after close range and long
range we're gonna set is attacking to
truth
next what we're gonna do is delete all
these print strings and play and then
montage what you want to do is promote a
name attached to a variable call it ATT
attached so I know it's my attack
montage then I'm gonna set this variable
add three close-range attacks and two
long-range attacks for this demo can i
connect all this together
and here I'm gonna remove the three and
I'm going to change the c2
but don't forget when you add more you
got to modify this and as you add pins
so I'm gonna drag this down and put it
all into this node
okay and now we're gonna go get her and
a montage for the bus we had really oh
one we had strong oh one and we had
kicking these were three close ones and
then here we had fireball whoops
it was Hadouken and the other one we had
was debuff where he performs a war so
what's gonna happen after this is we're
gonna have a delay and connect the
return value let's see how well this
works and after it's done we're gonna
set is attacking to pulse
so let's see what's gonna happen do we
have to stop it there
do we have to stop him from seeking the
player or not let's hit play
so going to be
he's already roaring but he's moving at
the same time oh look at that he's
tacking me but he's chasing me at the
same time while he attacks that's
because we're not telling him to stop
moving and in fact it's gonna keep
rotating I'm trying to attack me so this
is it for this segment of the video and
the next one we're gonna continue and
fine tune this
before we continue fine-tuning
want to add a health bar to the bus I'm
gonna do that now so I don't got to do
it later and I know we're gonna need it
when we test out attacks and damages so
let's go into widgets and create a new
one
user interface widget blueprint so I'll
call it little boss call it blue busbar
now in here what I need is a progress
bar and we'll put it to size X we'll put
it to 800 I should split to 1000 size
wire let's put it to 15 and let's leave
it around this area and for the anchor
will put it on top then I'll get a text
block a text box sorry wrong one it's
text just this and we'll call them war
requisites name
so I'll put that up here and I'm gonna
do the same thing for the anchor now the
bar here I'll put it to red and let's
see okay
so percentage here we're gonna create
binding and I'm gonna promote this to a
variable I'll call it boss HP and what I
need to do is find the way to set the
guy's HP it has to communicate at least
let me just close this okay going into a
blue box I'm gonna make a variable and
I'm gonna call it health click the
little eyeball and set it to a float
compile that and in initialize boss
we're gonna set it because this is where
we initialize our boss and we said all
of his variables to start with I'm gonna
give my health of let's say 1,000
going back into busbar gonna extend this
and I'm gonna type get actor of class
pass this through
here type in for each together for each
loop for class type in blue get the blue
bus caste blue see you guys to the blue
bus then you get help
you connect this here and you also want
to set the boss HP how did it go let me
just recap this quickly so we have you
want to divide it by 1000 and plug it
into boss HP so let's set this up to 750
just for testing and I'm gonna type
create widget
for the class I'm gonna get blue bus bar
and add viewport
it added really soon but you see at
least it's communicating look at the
health how it's not full and I know it
added up too quickly but we're gonna
make it so that when we enter the level
then it's gonna add it's gonna add it to
viewport afterwards so here if I was to
set this to 500 and play you should see
that his bar is halfway full there so
I'm gonna leave that to 1000 and that's
gonna be that for this segment in this
segment we're gonna do a bit of
fine-tuning while you test it out you
might notice that as he swings his fist
at you it kind of gets in the way of the
camera and there's like this quick blink
like effect like everything goes black
first foot second and goes back to
normal and it's pretty annoying and if
you have the the health bar in your
viewport you just need to disconnect
this because we don't really need to see
it yet we're just working with his
animations and this thing might get
annoying so go in his viewport
click on the mesh and up here type in
collision collision preset set it to no
collision what's gonna happen is check
this out basically his hands are always
gonna go through me see but that doesn't
matter because the collision capsules is
gonna have they're gonna be able to hurt
me we're gonna give them two capsules on
his arms after or not it so let's go in
the event graph first and it's moved
down to see Claire and what I want to do
is put a branch
and put false into that and disconnect
true yet is attacking and put it as the
condition so if this condition is true
what we're gonna do is type in stop move
and it's not movement immediately and
connect that this is gonna stop the
character from moving at all
however we need to reach rigor seek
player at the end of our attack chain so
at the end of this is a whole attack
chain you type in seek clip like that so
now let's check it out also before we do
that let's go to player distance and put
this to a lower value because it
performs a melee attacks way too far
away from you so put that to like 600
but that's a number you can play around
with based on whatever you'd want for
your own battle arena so all he should
be doing is I roaring or doing the
fireball attack but he's gonna keep us
acting every second you probably don't
want that either you probably wanted to
chase you a little bit and yeah every
now and then perform an attack but for
melee you always want them attacking up
close so let's go in the event graph and
add a few pins in long range and set
that to 4
or another way to actually do this is
you remove all these pins let's connect
this one to
I think this is good for the current
example because we don't have too many
nodes but you would put a branch here
put it to true or false and ask for
condition I don't know you would just
say if this is equal to 0 say this one
if not take this one and you would take
one and just pass it down to C player
but right now what I'm gonna do is I'm
gonna go the other way because
off-screen when this tutorial is done
I'm gonna add in all the other attacks
so let's say 2 3 4 5 I'm gonna set them
in to see Claire in fact I might as well
just copy this note and put it here I'll
pass them all through this so he has a
pretty high chance so 2 out of 6 you can
attack so let's give that a shot
so I'm pretty far away from me he
doesn't seem to be carrying it all and I
think I know what's happening
yeah we have set to attacking basically
this is probably not at the right place
said that the one I don't know why it
was at the poor but let's go to player
distance and long range where it says
long range put it above make a new
branch can make it go through true
connect them like so
and then you could do random integer and
range and we'll say min one Max one and
type in equal equal give it that to zero
and put it in condition so 50% of the
time either he attacks you or he chases
you okay if you wanted to play around
with the percentages you would just put
to say two here and if the number is
greater than 1 or equal to 1 then you
seek player but in this case I'm just
leave it to one so it's 50/50 let's see
what that does
there is chasing me now he's attacking
this is a 50% chance of either attacking
or continuing to chase me he's chasing
nice attacking just to demonstrate the
point like she chased me for a longer
time so let's say this was set to 4 and
if I get zero out of this it'll go to
true so if it's true if it'll attack me
if it's not true which has a higher
chance of it being not true
it'll secret Claire so in this case he's
probably gonna run after me a lot longer
more frequently than attacking
look at that I ran all the way to me
that means every second he kept hitting
that see clear note so that's what you
can do in your and your blueprint and I
think I'm gonna leave this this setting
because personally I prefer this but you
guys can modify it and change it up to
whatever you want so this is how you
pretty much set up the boss to choose an
attack whether it's close range or far
ranging and attack the player now the
next thing we're gonna do is go into
third person blueprint actually not even
well go into warrior will go to warrior
blueprint and look for a launch
character right here copy this whole
thing go into blue bus and we're gonna
paste it your motors that two variables
are missing launch force and jump force
delete those and promote these two
variable launch force and promote this
one to jump horse
when you compile set both of them to one
as default values press the X to get
your menu and then just as we did with
the warrior or after each animation
montage you set launch course you could
do that within two
and this one
so you don't really need a camera shake
because remember we deleted the camera
so here I'm going to put that on a 350
and next one I'll put it this is strong
yeah I'll put it 400 and then kicking up
with it
500 and you can go back to your boss
folder and go to block boss animation
movement there's a vendor graph you want
to drag a pin out and type gasps dude
where is it gasps to character connect
it with speed and ask character cast to
blue bus from blue boss what you want to
get is that event called launch their
launcher then disconnect these click on
animation and let's say we go to kicking
now we make the animation notify call it
launch and check where you want to
launch him so I would want to watch him
around this kind of I guess here I don't
know I'm just gonna wing it right now
but I'll fix it up off-screen it's
basically moving these launch nodes
around and then he lands I'm gonna check
melee and see where I wanted launch him
yeah there's no real need to launch him
but I guess I'll do it anyway then I'm
gonna get strong and see when he does
that this foot perfect
lunch
so let's try this out see if there's any
errors
there is it's coming straight at me
look at that no lunching that's funny
probably because we didn't connect it
well I'm an idiot there we go let's
watch him fly
so there is gently running at me trying
to murder me and he doesn't
oh there he's lunching see that he's
sliding a bit
sweet so he's moving around as he's
performing his attacks which is what you
want because you don't want them
standing in the same spot so that's it
for this segment and I'm gonna check my
notes and see what else is left in the
segment's to come if not start a new
video
here's something I noticed while playing
it's when we get really close to the
enemy he attacks us but then he keeps
attacking he won't even bother looking
at us
so watch I'm right behind him and he
keeps attacking but I wanted to face me
and then attack so to get that fix let's
go here next to launch character and
make a new customer then I'm gonna call
this base player I'm gonna go to my
player distance function and I'm gonna
go get basically these three nodes and
face them out here I'm just gonna spread
them out a little bit I'm gonna type
look at get the final look at location
and the one with the player character
I'm gonna put it to target then I'll
type in set actor rotation and put the
return value there
so what this will do I'm just gonna
comment this I'm gonna call it bass
player if he's really close to me I want
him to look at me before he attacks so
going back to the player distance
function I'm gonna copy this branch
paste it here
and I'm gonna get distance and put it up
there so if this is false that means I'm
really close to him then I'm gonna face
player
so let's try to get him to attacking him
for okay well he's doing his melee
attacks I'm gonna get behind him now you
looked at me nice tacking
and from a far range if I can get away
from him in time
he doesn't have the need to flip so he
was doing his fireball attack and see
he's chasing me again
he doesn't have to perform a flip it's
only when I'm close to him so that's a
little fixed for this segment and I'm
gonna dig some more in in the next
segment we'll find two and further
to finish up with this video what I'm
gonna do is make the bosses of bar
appear when we enter the level and
activate him then so he's only active
once we hit the level basically over
surpass the trigger so type in trigger
here get a box trigger and make sure
that this is double click whichever
level you're working on so that look
like that then put the trigger in and
what I want to do is take this trigger
and scale it as much as I can I want to
cover both sides of this level side to
side I'm just gonna lift it up in the
air a bit and then I'm gonna go into
blueprints sublevel edit blue level
I'm gonna right click and type in event
begin overlap that's what I need add on
actor begin overlap then drag a pin up
type in equal twice and you want to get
their character put a branch connect the
condition and the input output then go
to your level select your boss and clear
the reference
now in here we need to add something so
in your blue boss blueprint edit event
begin play you want to delete that and
create a custom event called initialize
I already had it here from a previous
recording so this custom event called
initialize I'm gonna plug it in into a
live I'll compile them and I'm gonna go
into do level drag a pin out of the
reference and type in initialize and I'm
gonna plug that into true so if I test
it out
he's running at me so the only thing
that I'm missing is in blue bus is that
I didn't connect the rest of my chain
now when he activates I should also see
yourself are there you there this
well I hope you guys enjoyed the video
and the next one we're gonna continue
working on this guy so thanks for
watching