xcafe Posted December 7, 2016 Posted December 7, 2016 So I've isolated the problem! Not sure how to fix it, or what's causing it, but at least I know what's actually happening now. State Studying Event OnBeginState() ;This will run as studying begins. ;;; Include anything that needs to happen at study start here. bStudying = True Game.DisablePlayerControls(True, True, True, False, True, True, True, True) Game.ForceThirdPerson() RegisterForSingleUpdateGameTime(0.05) ; sets when studying will be complete WHILE (bStudying) && (playerref.GetSitState() == 3) playerref.PlayIdle(IdleChairRead) Utility.Wait(10.0) playerref.PlayIdle(IdleChairPageTurn) EndWhile EndEvent Event OnUpdateGameTime() {Called when the required study time is completed.} ;;; Include anything that needs to happen at study completion here. Debug.Notification("OnUpdateGameTime Called") UnregisterForUpdate() Debug.Notification("Unregistered For update") bStudying = False Debug.Notification("bStudying = False") Int ListSize = CentralQuest.GSL.GetSize() Int Index = 0 While Index < ListSize Form Entry = CentralQuest.GSL.GetAt(Index) If (Entry as Spell) PlayerRef.AddSpell(Entry as Spell) EndIf EndWhile Index += 1 Game.EnablePlayerControls() GoToState("Studied") ; leave studying state so OnRead can trigger again EndEvent EndState That OnUpdateGameTime event is just never happening! I don't know how to fix this, do any of you?
Guest Posted December 7, 2016 Posted December 7, 2016 How you trigger for the first time the status "Studying"? What is the object that has this script attached to it? And you are doing an active loop. It is difficult to stop it by asking for an event.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.