So here's the code:
Dragon Combat Script (Script which exists on the Dragon's Base Actor)
Scriptname MOD1AazCombatScript extends Actor Quest Property MOD1QPart1 AutoEvent OnLoad() Registerforupdate(120)EndEventEvent OnUpdate() Debug.Notification("OnUpdate") If (MOD1QPart1.GetStage() == 32) self.SetAllowFlying(True) debug.Notification( "SetAllowFlying Should Be True") self.StopCombat() MOD1QPart1.SetStage(33) ElseIf (MOD1QPart1.GetStage() == 33) MOD1QPart1.SetStage(34) Debug.Notification("Stage Should Be = 34") ElseIf(MOD1QPart1.GetStage() == 34) MOD1QPart1.SetStage(32) self.SetAllowFlying(False) self.StartCombat(game.GetPlayer()) Else Debug.Notification("Else Condition") EndIf self.EvaluatePackage()EndEventEvent OnCombatStateChanged(Actor akTarget, Int aeCombatState) If (aeCombatState == 1 && MOD1QPart1.GetStage() != 32) self.StopCombat() self.EvaluatePackage() EndIfEndEventAnd HERE
is the problem:
The Dragon is originally set (by some code which executes at the final dialogue of a scene) to have SetAllowFlying(False) and to be attacking the player. It is at this point that the quest stage is also set to 32. After the first 120 seconds (when the OnUpdate Runs) the dragon's SetAllowFlying is set to true, the dragon leaves combat, and successfully reevaluates his package stack. (This causes the dragon to run his package, which has a condition of GetStage (This Same Quest) == 33). The problem is, after another 120 seconds, I get the "OnUpdate," and "Stage Should Be = 34" notifications, but the stage never actually sets to 34. So, the MOD1QPart1.SetStage(34) doesn't appear to be setting, anyone have any ideas?
