ArmsSamedi Posted June 16 Posted June 16 Hey, I'm not very competent with scripting but I've usually been very good with figuring it out myself, but this time i'm a little stumped. I wound up writing this quest so that it needed two instances of wait time, I tried to script the quest like this Scriptname ARMS03_ColtA102_UpdateGameTime extends Quest Quest Property ARMS03_ColtA102 Auto Event OnUpdateGameTime() if (ARMS03_ColtA102.GetStage(10)) UnregisterForUpdateGameTime() ARMS03_ColtA102.Setstage(20) else UnregisterForUpdateGameTime() ARMS03_ColtA102.Setstage(40) endif endEVENT but i keep getting the 'too many arguments passed' error. this setup worked in other if/else examples i've seen, so I'm assuming it's an issue with the UpdateGameTime event?
PeterMartyr Posted June 16 Posted June 16 (edited) I can only fix what I can see, but get stage has no parameters and it returns a value to compare, that were the too many args error came from Scriptname ARMS03_ColtA102_UpdateGameTime extends Quest Quest Property ARMS03_ColtA102 Auto Event OnUpdateGameTime() if (ARMS03_ColtA102.GetStage() == 10) ARMS03_ColtA102.Setstage(20) else ARMS03_ColtA102.Setstage(40) endif UnregisterForUpdateGameTime() EndEvent instead of calling unregister twice, do it once at the bottom too Edit not sure about this, but the script name and the quest name implies they are this Quest as this Script , which makes the code this. Scriptname ARMS03_ColtA102_UpdateGameTime extends Quest Event OnUpdateGameTime() if (Self.GetStage() == 10) Self.Setstage(20) else Self.Setstage(40) endif Self.UnregisterForUpdateGameTime() EndEvent It does not need a property to Self, but take this with a grain of salt, I am not sure of your naming convention Edited June 16 by PeterMartyr extra detail
PeterMartyr Posted June 16 Posted June 16 43 minutes ago, ArmsSamedi said: it needed two instances of wait time BTW you can not register for two of the same types of update, on the second call, you just update the existing update, registerForUpdate(60) registerForUpadte(30) means it only has one update that is now in 30 seconds
ArmsSamedi Posted June 16 Author Posted June 16 Thank you! I honestly had no idea you could just put Self instead of the quest property
PeterMartyr Posted June 16 Posted June 16 there is a caveat with that the script need to be right tab of the quest it is calling
Recommended Posts