TobEx: 77
Ascension64
Member Posts: 560
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:
TobEx fixed this in ACTIONRESULT CCreatureObject::ActionChangeAnimation(...) by adding the STATE_DEAD if creOld.hp
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:
IFsummoning 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.
HotKey(B)
THEN
RESPONSE #100
ActionOverride(NearestEnemyOf(Myself),ChangeAnimation("DOPKIE")) // Kiel the Legion Killer
END
TobEx fixed this in ACTIONRESULT CCreatureObject::ActionChangeAnimation(...) by adding the STATE_DEAD if creOld.hp
creNew.SetSaveName(ResRef(creOld.aCurrent.GetSName1()));
if (creOld.m_BaseStats.currentHP <= 0) creNew.m_BaseStats.stateFlags |= STATE_DEAD;</pre>
Post edited by Tanthalas on
4
Comments
I heard there was a snitch that told the developers that we had access to their private forums.
I put it under the hp set because I'm not sure that SetSaveName == SetName
I tried also CLUAing in DOPFUE and using the script above. It did change him to DOPKIE, but then he died. Subsequent CLUAing in DOPFUE had Fuernebol there only a moment before he converted to a doppleganger, and at that point it wouldn't become DOPKIE. I tried this a few times trying to do the animation change during damage, but the invulnerable DOPKIE never arrived.
Went to AR0512 hunting for the problem to occur... Didn't.
Went to vBG1's AR0512 to see if I could reproduce it there. Transported the .BS script and used it on DOPFUE again. Couldn't reproduce it... *sigh*
Inconclusive tests, sorry...
I will get on to it.
Tested by repetitively firing this script: then summoning CLUAConsole:CreateCreature("dopfue"), and hacking him with all my might while pressing B continuously...
On ChangeAnimation() during death, the dude dies, and drops the target animation's items (compare the two piles of loot in the screenshot). However, the area search map bits aren't being updated correctly, so I can't actually walk on top of the dead dude. Where you put the code, probably needs to go somewhere else. I'm not sure if my SetSaveName() == your SetName() either.
I placed the code after something like: In summary, not quite fixed.
Looks like this one still needs to be fiddled with.
Yes, slowly stepped through my and your code and the position of the fix correctly corresponds, so should be fixed.