May as well start posting some outstanding TobEx issues in separate threads here.
O: Action ChangeAnimation() does not transfer state flags to the creature replacing the old creature, resulting in the Islanne doppelganger occasionally being highlighted as Dead but the creature remains alive and remains unkillable
E: Action ChangeAnimation() transfers state flags to the creature replacing the old creature so that dead creatures stay dead
C: Issue is the dead creature inherits 0 hp but STATE_DEAD is not set.
You can reproduce this (although difficult!) by using a player script like this:
ActionOverride(NearestEnemyOf(Myself),ChangeAnimation("DOPKIE")) // Kiel the Legion Killer
summoning say DOPFUE.CRE, attack him with everybody in party, and occasionally pressing the B button. When the enemy gets hit while doing the ChangeAnimation() action, you get a "Dead" DOPKIE.CRE that is invincible.
TobEx fixed this in ACTIONRESULT CCreatureObject::ActionChangeAnimation(...) by adding the STATE_DEAD if creOld.hp
if (creOld.m_BaseStats.currentHP <= 0) creNew.m_BaseStats.stateFlags |= STATE_DEAD;</pre>