try hide() first before Delete() , I can make the Delete() function does this automatically in the next version
Tried that as a second option, and unfortuantly still didnt work. This is how far i have got:
//////////////////////////
if ZombieA.isValid()
ZombieA(Pain):: "GGGRRRrrr...."
ZombieA:health -= DMG
ZombieA:health -= DMGCRIT
zh = ZombieA:health
"Zombie health = <zh>"
If ZombieA:health < 1//Dead Zombie
"<DeathScene>"
ZombieA.hide()
ZombieA.Delete()
ZombieA.hide()
if ZombieA.isValid()
ZombieA.Delete()
ZombieA.DeletePerson()
Endif
Endif
/////////////////////////////////
On 3.b1 a simple
If ZombieA:health < 1
ZombieA.Delete()
This works as intended.
//////////////////////////////
On 3.b2 nothing I have tried works. This is confirmed the same on another persons PC.
Its hard to see whats happening on 3.2 because the actor is moving around when this happens. It looks like it is being regenarated as a diffrent model, and without clothes. Will try locking it in a while loop but I am guessing thats just going to crash my scene. Will do some more test and get back to you.
further to this :
While ZombieA.isValid()
ZombieA.hide()
ZombieA.Delete()
Endwhile
Causes indefinite loop.
Edit now using a var to toggle if a zombie is active, so no longer an issue on my script:
Elseif ZBV == 1
ZombieB:health -= DMG
If ZombieB:health < 1//Dead Zombie
ZombieB.hide()
ZBV = 0
Endif