I don't know where I'm going wrong makes sense to me and compiles. Basically its an OnDeath script which counts deaths and mods a global. The else is for any of the actors dying before "time" which should fail the quest. Take a look.
GlobalVariable property Deaths AutoQuest Property myquest AutoInt Property PreReqStage AutoInt Property StageToSet AutoInt Property ReqDeathCount AutoEvent OnDeath(Actor akkiller) if myQuest.GetStage() == PreReqStage Deaths.Mod(1) as intdebug.notification("Somebody died")if Deaths.GetValue() == ReqDeathCountmyQuest.SetStage(StageToSet)else if myQuest.GetStage() < PreReqStage myQuest.SetStage(500); fail quest endif endifendifEndEvent
Thanks for looking.