I'd just compiled it to make sure there weren't any logic errors, and it looked right. I'm not actually sure why it doesn't work either, but now I'll have to play around with it for my own benefit to see what I did wrong.
In testing, adding a while loop to your initial (master fixed) script worked for me for multiple henchmen, though I didn't try it from within a case statement.
object oPC = GetLastPlayerDied();
object oHench = GetAssociate(ASSOCIATE_TYPE_HENCHMAN, oPC);
while (GetIsObjectValid (oHench))
{
RemoveHenchman (oPC, oHench);
oHench = GetAssociate(ASSOCIATE_TYPE_HENCHMAN, oPC);
}
Edit:
I figured out what was wrong with mine. A silly mistake on my part, really. Trying to remove the henchmen while it's still going through them doesn't work. Adding a delay to the remove henchman part worked for me.
Modifié par Failed.Bard, 05 juin 2011 - 08:13 .