TheXXI Posted February 26 Share Posted February 26 (edited) I use the code: Scriptname TXXIElisifRomance01StartScript extends Quest Quest Property CurrentQuest Auto Quest Property SubscriptionQuest Auto Event OnInit() PO3_Events_Form.RegisterForQuestStage(Self, SubscriptionQuest) Debug.MessageBox("RegisterForQuestStage") EndEvent Event OnQuestStageChange(Quest akQuest, int newStage) Debug.MessageBox("OnQuestStageChange") if (akQuest == SubscriptionQuest) Debug.MessageBox("Quest: " + akQuest.GetName() + ", new stage: " + newStage) endif EndEvent The script itself has been added to the quest and it has the following property: Only the first MessageBox("RegisterForQuestStage") works for me. I change the quest Favor252 stages using setstage, but OnQuestStageChange is not called. What could be the problem? Edited February 26 by TheXXI Link to comment Share on other sites More sharing options...
PeterMartyr Posted February 27 Share Posted February 27 Try debugging it with debug code... to see it works with a slight delay, between messages, or to the console or trace Scriptname TXXIElisifRomance01StartScript extends Quest Quest Property CurrentQuest Auto Quest Property SubscriptionQuest Auto Event OnInit() PO3_Events_Form.RegisterForQuestStage(Self, SubscriptionQuest) Debug.MessageBox("RegisterForQuestStage") ; [Debug] utility wait here 5 sec (don't use wait menu mode, I trying to pause it intil you close the message box) ; [Debug] set SubscriptionQuest Quest Stage test "amount" ; [debug] option but helpful, check to see the stage was set ; maybe another pause for message boxes, ever thought of debugging to trace or console EndEvent Event OnQuestStageChange(Quest akQuest, int newStage) Debug.MessageBox("OnQuestStageChange") if (akQuest == SubscriptionQuest) Debug.MessageBox("Quest: " + akQuest.GetName() + ", new stage: " + newStage) else ; [debug] Message well it fire a least ¯\_(ツ)_/¯ getting there :) endif EndEvent did you set the stage, to test it, correctly, if not, to quote Mythbusters "Here your Problem" your missing your testing assertions. So to speak... that do the actual testing with a Yay OR Nay Debug code should return either a success or utter failure, it really helps to track down the problem, FYI it fired, why is the quest stage not working? It also helps with not going in game and running around over and over, that really time consuming and non productive Link to comment Share on other sites More sharing options...
PeterMartyr Posted February 27 Share Posted February 27 I just want to add, does this really prove the registration, or is a statement Debug.MessageBox("RegisterForQuestStage") the prove nothing? At best it only asserts the OnInIt Event has fired, when it comes to problem solving Link to comment Share on other sites More sharing options...
Recommended Posts