Talk:SetCurrentStageID - Quest

From the CreationKit Wiki
Jump to navigation Jump to search
 Quest Property ExampleQuest Auto
 MiscObject Property ExampleKey Auto
 Function DoThis()
   If Game.GetPlayer().GetItemCount(ExampleKey) && ExampleQuest.GetStage()== 10
     ExampleQuest.SetStage(20)
   EndIf
 EndFunction

--Sollar 06:17, 12 June 2012 (EDT)

SetStage will return a false false under following conditions: - Quest has no stages and has to be started - Quest has stages but the startup stage is 0 and has to be started

Even it is returning false, those quests will be started and the correct stage will be set. It will return false, however. Conclusion: If you want to use SetStage()'s return value don't use it on non started quests otherwise you get false result. Use Quest.Start() instead because that is returning True in those cases. Heromaster (talk) 2014-10-29T15:58:09 (EDT)