Problems with Take Damage and Pickup Points

My enemy was no longer dealing damage to the player at the end of this lecture.

I think there is a logic error in the EnemyUI. If the player is within chase range and the enemy is not chasing the state automatically changes to chasing and all coroutines are stopped. There is no check to see if he is already in attacking state. So what is happening is the enemy attacks, starts a damage After delay coroutine, skips immediately into chasing mode, stopping the coroutine and then straight back to attacking, so visually there is no clue that this is happening.

An additional check for && state != State.attacking cured the problem for me.

I also noticed that currently if any character, including enemies and NPCs, enters a weapon pickup point the player’s weapon will change. I think the collider type needs to be checked in OnTrigger Enter

Privacy & Terms