Download

Block Attack?

How does Block Attack work?
Which is to basically block a attack from AI.

You can apply damage with it then make it be a variable bool like block. The player character state can have a variable like “Blocking.” you can give the shield a health percentage, and apply damage for shield attack. It would just be 2 different states in the anim bp, and a shield, or weapon blueprint… Then you could use branch as in attack false, and blocking true.

I was actually about to post a thread inquiring about best practices for something like this for a realistic block.

Going to just piggy back on this thread since its already here, and is relevant to my questions

My question;

How would one go about setting up an AI’s attack to check to see if an attack is being blocked by the shields static mesh? To clarify further…say I had the AI doing a sphere trace or a simple line trace before applying damage to the character, what would be the best & most realistic way to see if an attack is actually being blocked by the vast majority of the shields static mesh? I’ve got a very simple block mechanic in place right now, but it’s basically just an invulnerability state during the blocking animation, and as you can imagine, that is not ideal.

Normally I’m very stubborn and figure stuff out on my own, but the answer to this one just remains elusive to me, which is probably due to my lack of experience.

Thanks in advanced!

I could do something like that, also how about a way to stop the enemies from applying damage when they been hit?

This is something I struggle with so basically the Enemy is attacked but when attacked he still attacks back and knocks some of my
health out is there a way to make sure it does not attack back when its been injured?

About Animations they wont play at all, I made state machines and they are all working fine for AI animations but they just wont play
the only thing the AI does Animation wise is to Run and stay Still but other animations they wont work I don’t know why.

What I did was basically how the main character works with State Machines and you make the True / False “Is running” etc…

I have tried to just play the animation but to no success, the character just does the movement thing Floats you know “Still – Running” as for the other thing with
montage its not working either I already tried it.

The only thing it does is just make a twitch when something is suppose to play and that’s it.

I ended up figuring out the animation issues and they play now it was something wrong with the animations themselves so I reimported them and they work fine now.
Also when playing a animation how can you make the character go back to the original animation it was playing as?

I’m not exactly sure what you mean by that. Could you provide an example of what is happening and what you want to happen instead?

That would help me get a better idea of what you mean

Okay so what I mean is when the character is done playing the animation in this case is the Attack animation, what do I do to make it go back to
the main Animation basically the one that the AI starts of with, to go back to the previous Animation it was playing and to stop playing the
Attack Animation.

So the AI was Running after me and playing the animation it catches to the main character and starts playing the Animation “When its not moving” and when
I move away it stops playing the attack animation and goes back to running and playing idle animation “Patrol”.

“What happens when the AI is not attacking is that the animation just gets stuck when its suppose to be moving or switch back to walk/idle”.

Sorry if I cant explain it AI with me is not the best.