Talk:Reset - Quest
Revision as of 14:42, 15 June 2012 by imported>Fg109 (I really need better proofreading skills)
On my custom quest, Quest.Reset() is working fine. Maybe it got fixed or it is only broken for standard quests? -- Jsquirrel
- Quite strange then... it doesn't work for me. I'm using the CK version 1.5.24 and Skyrim is version 1.6.89.0.
This is the code I used to test:
Scriptname fg109TestQuestScript extends Quest
Event OnInit()
Debug.Notification("Quest was initialized.")
RegisterForSingleUpdate(10)
EndEvent
Event OnReset()
Utility.Wait(1)
Debug.Notification("Quest was reset.")
EndEvent
Event OnUpdate()
Debug.Notification("Quest is updating.")
if (Game.GetPlayer().IsSneaking())
Stop()
Utility.Wait(1)
Start()
else
Reset()
endif
EndEvent
Scriptname fg109TestMEScript extends ActiveMagicEffect
Quest Property fg109TestQuest Auto
Event OnEffectStart(Actor akTarget, Actor akCaster)
Debug.Notification("Attempting to restart the quest.")
if (akTarget.IsSneaking())
fg109TestQuest.Stop()
Utility.Wait(1)
fg109TestQuest.Start()
else
fg109TestQuest.Reset()
endif
EndEvent
Neither the Reset in the quest script nor the one in the magic effect script caused the message in either the OnInit block nor the message in the OnReset block to show up. The calls to Stop and Start did work in both scripts. Also, as noted in the OnReset notes, the message in the OnReset block is never shown, even when the quest is restarted successfully. --Fg109 15:39, 15 June 2012 (EDT)