I have an enemy actor that can be hit with a player bullet. I have it so that if the bullet hits the enemy, the bullet plays a hit animation for .35 seconds, and the enemy actor takes damage once the bullet hits it. The problem is, it keeps taking damage for the whole .35 seconds. Is there a way to make it only take damage once?
I thought of having a game attribute that is like (BulletHitAnimation) which is set to true when it hits an enemy and then false after .35 seconds, when the bullet actor dies. But this has a few problems that I would like to avoid. It means that the fastest you can hit an enemy is .35 seconds, but you can shoot every .1 seconds. I would also have to add an If BulletHitAnimation false before every time any enemy gets hit, and that is probably not the best thing to do. Is there a way around this?