Difference between revisions of "Talk:Reset - Quest"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Jsquirrel
(Created page with "On my custom quest, Quest.Reset() is working fine. Maybe it got fixed or it is only broken for standard quests? -- Jsquirrel")
 
imported>Fg109
Line 1: Line 1:
On my custom quest, Quest.Reset() is working fine. Maybe it got fixed or it is only broken for standard quests? -- Jsquirrel
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:
<source lang="papyrus">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</source>
<source lang="papyrus">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</source>
Neither the [[Reset - Quest|Reset]] in the quest script nor the one in the magic effect script caused the message in the either the [[OnInit]] block nor the message in the [[OnReset - ObjectReference|OnReset]] to show up.  The calls to [[Stop - Quest|Stop]] and [[Start - Quest|Start]] did work in both scripts. --[[User:Fg109|Fg109]] 15:39, 15 June 2012 (EDT)

Revision as of 14:39, 15 June 2012

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 the either the OnInit block nor the message in the OnReset to show up. The calls to Stop and Start did work in both scripts. --Fg109 15:39, 15 June 2012 (EDT)