Hi! I have a enemy with a remote attack, I want the enemy attack while I am in their attack range, with x seconds between attacks. I have this code but it only works once, while I’m in range it does not work, I have to go out and enter its range to make it work. What I can do? Thanks
You should change currentState after attack to EnemyState.idle or EnemyState.walk in order to enter
" if (currentState == EnemyState.idle || currentState == EnemyState.walk && currentState != EnemyState.stagger) " statement again.