I was right about the dopplegangers; the ChangeAnimation() command also switches the scripts, so the global variables weren't set when the dopplegangers die. I have fixed the error, however.
You have to add the following script via EXTEND_TOP to *all* of the scripts used by the dopplegangers:
IF
Die()
Global("NobleDopple","GLOBAL",1)
!Global("SarevokBehavior","GLOBAL",4)
THEN
RESPONSE #100
IncrementGlobal("SarevokDoppDeath","GLOBAL",1)
END
You then use EXTEND_TOP to add the following block of script to SAREVOK.bcs:
IF
Global("SarevokDoppDeath","GLOBAL",6)
THEN
RESPONSE #100
SetGlobal("SarevokDoppDeath","GLOBAL",0)
SetGlobal("GDOPP7Dead","GLOBAL",1)
SetGlobal("GDOPP71Dead","GLOBAL",1)
SetGlobal("GDOPP72Dead","GLOBAL",1)
SetGlobal("GDOPP73Dead","GLOBAL",1)
SetGlobal("GDOPP74Dead","GLOBAL",1)
SetGlobal("GDOPP75Dead","GLOBAL",1)
END
IF
See([PC])
Global("SarevokBehavior","GLOBAL",4)
GlobalTimerNotExpired("SarevokRun","GLOBAL")
THEN
RESPONSE #100
SetGlobalTime("SarevokRun","GLOBAL",0)
CreateCreature("WINSKI",[693.578],0)
TriggerActivation("0200",TRUE)
TriggerActivation("0109a",TRUE)
TriggerActivation("0109b",TRUE)
TriggerActivation("0111",TRUE)
StartCutSceneMode()
StartCutScene("EndCut01")
END
-Galactygon