In my third person game, whenever my AI and Player Character seem to be attacking at the same time, and the Player Character ends up taking damage, the Player Character can no longer move around. Certain functions like bringing up inventory, using Power-ups, jumping, etc. still work, but the player can no longer move from the spot he is in. Any ideas?
Is this a Player Character problem or AI?
Have you got images of the scripting? Would be helpful to see what’s going on.
Player Character Taking Damage & Death
Player Character Heavy & Primary Weapon Collision and Damage
Player Character Combos
AI Enemy01 Melee Collision & Damage
Thanks for taking a look. Also, the “ranged” Enemy AI attacks are done through the Animation Blueprint because at the time, that was the only thing that worked since the AI Behavior Tree and AI Controller are modeled somewhat after the Advanced AI Tutorial Series here on Unreal Engine. This was raising some suspicions and I was thinking about moving the melee collision and damage scripts to the Animation Blueprint as part of the attack sequences there. I am fairly new at all of this and am barely learning programming so you’ll probably see a lot of unconventional ways of accomplishing a simple task.
I tried changing the blueprint logic to reflect damage application in the Animation Blueprint of the AI, and while it still works, the Player Controller still ceases to move after a couple of hits. No idea…
I am trying to think what could possibly be causing the Player Character to stop moving?
So I ended up moving on and then stumbled upon how this was happening to anyone who may have a similar issue. In order for the Player Character to successfully move or attack, the condition for the Boolean variable “Is Attacking?” is checked to prevent the initiation of movement (gliding) or another attack while the Player Character is currently undergoing animation for the current attack. The problem listed above occurred when the Player Character was attacked in the middle of an attack montage. At the beginning of the attack montage, the Boolean value “Is Attacking?” is set to TRUE and then once the animation Montage is COMPLETED, the variable is set to FALSE. However, when the Player Character is attacked from the enemy AI in the middle of the Attack Montage, the Attack Montage does not COMPLETE and is instead interrupted by animation representing a “Hit Impact”. Therefore, the “Is Attacking?” variable stays set as TRUE and never gets reset to FALSE and therefore will not allow the Player Character to move or attack.
Thanks, you may run into this if the scripting is anything similar to mine so definitely try to wrap your head around this if it helps!