How to Get AI to block?

Hey people, how do I get my AI to block incoming attacks from player? How can I make him evade/dodge my attacks?
I don’t want the AI to block all the attacks, but rather I want him to block attacks randomly. Any help would be appreciated as I am working on a melee combat game and have an AI that cannot block or evade?

Hi there!

You probably need to find out how the the “AI Controller” works and set up a “Behavior Tree”. Can’t tell you more than that though, just look on youtube I’m sure you’ll find a tutorial on this.

Kind Regards,
Gull Jemon Studios