DM-Chemosh wrote...
She does speak those lines, transforms and also tries the touch attack (which sometimes seems to kill ALL PCs that are next to her?). Script is working fine, just the treasure generation on that monster doesn't.
I don't have any new insight on the treasure spawning problem, it may help to see the script that spawns the additional loot like Mudeye suggests.
However, the problem with all PCs getting killed probably has to do with the fact that the OnDamaged event triggers whenever a PC damages the creature and if they meet the conditions they will all get the death touch.
You can do something like this to avoid having it trigger multiple times:
else if (nStage == 3) {
if (fDist < 5.0) {
if (TouchAttackMelee(oTarget) == 1 || TouchAttackMelee(oTarget) == 2) {
ActionSpeakString(GetName(oTarget) + ", you shall die with me!");
effect eDeath = EffectDeath(TRUE);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget);
SetLocalInt(OBJECT_SELF, "nStage", 4);
}
-420