Closed vgaming closed 5 years ago
The graves are just like any other enemy, so the fact that the ally zombie attacks them is normal. As for why the spawned enemies don't attack the zombie, I think I have an explanation:
Enemies begin in a passive state (unless set to be aggressive) and enter the combat state in a few scenarios. These scenarios include the player being close enough, or the enemy being hit by an attack. Only once the enemy is in combat do they pick a target (player or ally). So the solution here would be to make it so that allies can also put enemies in the combat state based on proximity.
Cool, I see. One question regarding the zombie: why does it move forward to attack though? Normally, it only attacks when I already attack a unit, or when I'm being attacked. In other cases, it walks towards my hero and stays put. Here, however, it crosses quite large distances just to hit the grave. It doesn't hit wandering enemies.
UPD: nevermind, it attacks wandering enemies as well if they try to attack my hero. The only difference is that zombie doesn't attack passive wandering zombies but runs to kill the grave. Probably, the spawning of a unit is considered an aggressive action towards my hero, so zombie tries to protect me from the attacking grave.
The fix is apparently the same anyway: make enemy units "wake up" to attack zombie based on proximity.
This should be fixed with: https://github.com/flareteam/flare-engine/commit/a4b2e0a5b25d2cc68c5446c7c8c70e33913dff47
Thanks for the fix!
I wonder if allied zombie behavior currently works as intended for The Pit location (Empyrean). Now, the following tactics is possible:
The zombie will now run towards the grave and start hitting it. Enemy AI units will not interfere and not attack the allied zombie. Zombie will continue its job until the grave is destroyed, and the summoned unit is thus dead.
Also note that the distance at which the grave will spawn a unit is really great, but you don't even have to come closer for your zombie to attack -- you can even walk in the opposite direction. Somewhy, zombie sets the grave as their goal and attacks it unconditionally.