Difference between revisions of "Talk:Reset - Quest"
no edit summary
imported>Fg109 m (I really need better proofreading skills) |
imported>Jsquirrel |
||
Line 40: | Line 40: | ||
Neither the [[Reset - Quest|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 - ObjectReference|OnReset]] block to show up. The calls to [[Stop - Quest|Stop]] and [[Start - Quest|Start]] did work in both scripts. Also, as noted in the [[OnReset_-_ObjectReference#Notes|OnReset notes]], the message in the OnReset block is never shown, even when the quest is restarted successfully. --[[User:Fg109|Fg109]] 15:39, 15 June 2012 (EDT) | Neither the [[Reset - Quest|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 - ObjectReference|OnReset]] block to show up. The calls to [[Stop - Quest|Stop]] and [[Start - Quest|Start]] did work in both scripts. Also, as noted in the [[OnReset_-_ObjectReference#Notes|OnReset notes]], the message in the OnReset block is never shown, even when the quest is restarted successfully. --[[User:Fg109|Fg109]] 15:39, 15 June 2012 (EDT) | ||
Interesting. I'm using CK version 1.6.89.0 (current version from Steam) and game version 1.6.89.0.6 (also from Steam). | |||
In my quest, an NPC hides a book in a chest at a certain time each day, if it is not already there (using a custom package). The player then gets asked by another NPC to find the book, advancing through a quest line that leads the player to eventually drop the book back on the table where it belongs. Dropping the book leads to this code being executed (much simplified version): | |||
<source lang="papyrus">Event onContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) | |||
Quest q = self.GetOwningQuest() | |||
if ((akOldContainer == Game.GetPlayer()) && !akNewContainer && (q.GetStage() == 150)) | |||
q.SetObjectiveCompleted(40) | |||
q.SetStage(0) | |||
q.Reset() | |||
endIf | |||
endEvent</source> | |||
I am not using the OnReset event, though, and when I added OnReset()-Code it didn't fire for me either. But I can see in my quest log in-game that the quest has been reset and thus the diary can be hidden again. Note also that my quest does not complete while it is in the hide-find-return loop. It repeats until you catch the thief in the act, which is the only way to complete the quest. -- [[User:Jsquirrel|Jsquirrel]] |