|
Post by shadex on Jan 17, 2019 4:42:10 GMT
Whats the difference between Combat Blocking Chance and On Damage Blocking Chance on the AI Melee Controller part?
On Damage Blocking Chance doesn't trigger a block animation it seems and Combat Blocking Chance set to 100% doesn't make the AI block 100% or trigger block 100% from what i can tell. Very confused. Whats the chance based off of? How would i keep the AI blocking 50% of the time, but only block damage in the "Blocking" state?
|
|
|
Post by Invector on Jan 17, 2019 14:18:17 GMT
The Combat Blocking Chance - The AI can enter the defence animation at any time during the combat, and by doing so, can block attacks.
On Damage Blocking Chance - The AI is not defending at the time he takes the damage, so basically it will block the damage right when you take it and not before.
Basically in the first option you can see the behavior, so you as the player can wait for him to 'drop the guard' to attack, but if he has a chance to block on damage (2 options) you won't be able to prevent his defence because he as a random chance to block that attack.
Hope that this clarify things for you
|
|
|
Post by Invector on Jan 17, 2019 14:18:34 GMT
I will add a Tooltip there as well
|
|
|
Post by shadex on Jan 18, 2019 0:51:54 GMT
The Combat Blocking Chance - The AI can enter the defence animation at any time during the combat, and by doing so, can block attacks. On Damage Blocking Chance - The AI is not defending at the time he takes the damage, so basically it will block the damage right when you take it and not before. Basically in the first option you can see the behavior, so you as the player can wait for him to 'drop the guard' to attack, but if he has a chance to block on damage (2 options) you won't be able to prevent his defence because he as a random chance to block that attack. Hope that this clarify things for you Ahh that actually clarify's quite a bit. Thank you. So Combat Blocking Chance is chance to enter into blocking state, based on time in combat, and On Damage Block Chance is a chance to enter the blocking state, based OnHit. I had min/max Time To Try Block at higher values (4/6) which wasn't allowing Combat Blocking Chance to ever really trigger.
Quite an improvement over the simple melee AI's blocking. Awesome job !
|
|
|
Post by tzirrit on Apr 4, 2020 16:07:48 GMT
Are there any other factors for wether or not and how long the AI is blocking?
According to the debug output, my ControlAIMelee AI seems to be blocking. But it never plays the blocking animation, only the recoil animation when it blocks.
|
|
|
Post by komposite on Apr 5, 2020 16:44:10 GMT
I currently have the same problem as tzirrit now, in the Debug I can see my AI is currently in defense, but the bool in the Animator parameters is not trigged...
But when I use my enemy animator on my main chara, no problem, I can block, and the animation plays.
It sounds like their is something wrong deeper in the code, but this is waaaaaaay over my level of coding.
Any help appreciated folks !
|
|
|
Post by tzirrit on Apr 5, 2020 17:09:21 GMT
I currently have the same problem as tzirrit now, in the Debug I can see my AI is currently in defense, but the bool in the Animator parameters is not trigged... But when I use my enemy animator on my main chara, no problem, I can block, and the animation plays. It sounds like their is something wrong deeper in the code, but this is waaaaaaay over my level of coding. Any help appreciated folks ! I think I found the issue. Looks like there is a bug in vControlAICombat that only updates the blocking flag in the animator when the AI is _not_ blocking. After changing the UpdateCombatAnimator method like below, the blocking animation plays as expected: protected virtual void UpdateCombatAnimator()
{
if (_isBlocking && Time.time > _blockingTime || customAction)
{
_tryBlockTime = Random.Range(_minTimeToTryBlock, _maxTimeToTryBlock) + Time.time;
_isBlocking = false;
//if (isBlockingHash.isValid) animator.SetBool(isBlockingHash, _isBlocking);
//if (isAimingHash.isValid) animator.SetBool(isAimingHash, _isAiming);
}
if (isBlockingHash.isValid) animator.SetBool(isBlockingHash, _isBlocking);
if (isAimingHash.isValid) animator.SetBool(isAimingHash, _isAiming);
}
|
|
|
Post by komposite on Apr 5, 2020 17:24:48 GMT
I currently have the same problem as tzirrit now, in the Debug I can see my AI is currently in defense, but the bool in the Animator parameters is not trigged... But when I use my enemy animator on my main chara, no problem, I can block, and the animation plays. It sounds like their is something wrong deeper in the code, but this is waaaaaaay over my level of coding. Any help appreciated folks ! I think I found the issue. Looks like there is a bug in vControlAICombat that only updates the blocking flag in the animator when the AI is _not_ blocking. After changing the UpdateCombatAnimator method like below, the blocking animation plays as expected: protected virtual void UpdateCombatAnimator()
{
if (_isBlocking && Time.time > _blockingTime || customAction)
{
_tryBlockTime = Random.Range(_minTimeToTryBlock, _maxTimeToTryBlock) + Time.time;
_isBlocking = false;
//if (isBlockingHash.isValid) animator.SetBool(isBlockingHash, _isBlocking);
//if (isAimingHash.isValid) animator.SetBool(isAimingHash, _isAiming);
}
if (isBlockingHash.isValid) animator.SetBool(isBlockingHash, _isBlocking);
if (isAimingHash.isValid) animator.SetBool(isAimingHash, _isAiming);
} Oh Yeah, it's working great now !
you're my hero ! Maybe Invector should be aware of this for the next update
|
|
|
Post by komposite on Apr 14, 2020 7:53:48 GMT
Regarding this, a bit similar, but when an AI have a weapons of 100 defense rate and take a hit while in protection, he doesn't play the recoil animation.
From what I've seen, you need to deal at least 1 point of damage to have a valid damage for the AI to play an animation.
for example, if your weapon is dealing 20pt of damage, the AI's weapon defense rate must be 95% at least, otherwise he won't play the recoil animation.
If someone can found out this, he's my hero !
|
|