Videniofthesith Posted January 26, 2011 Share Posted January 26, 2011 I want to setup a timer between 2 quests, AAitem and AAitem2. I want the timer to be at least 2 days but I haven't been able to get a working timer to start up or where to even put it when I am done. The Timer script is going to be a big part of this mod, just didn't know it was going to be this hard when I started it. Can anyone show me or write out a simple timer script for that? Link to comment Share on other sites More sharing options...
David Brasher Posted January 26, 2011 Share Posted January 26, 2011 (edited) Timers in Oblivion scripting language really stink. They will frustrate you and then betray you. It sounds like the best place for your timer would be in the quest script attached to quest AAitem2 assuming that it has the "Start Game Enabled" box checked or has had the quest enabled awhile before the point at which you expect the timer to begin keeping time. Below are the pertinent portions of a script from vanilla Shivering Isles. It gives you a quest message about a strange door opening in Niben Bay. scn SE01DoorScript short doOnce2 short startday Begin GameMode ;this section sets a journal to let the player know a door has appeared to the Shivering Isles if ( GetStageDone MQ01 90 == 1 ) if ( doOnce2 == 0 ) set startday to GameDaysPassed set doOnce2 to 1 endif endif if ( doOnce2 == 1 ) if ( GameDaysPassed >= ( startday + 1 ) ) if ( GetStage SE01Door == 0 ) SetStage SE01Door 10 endif endif endif End But this script is triggered by the installation of Shivering Isles or by the starting of a new character while Shivering Isles is installed. So what you need is something more like this complex of scripts: Result script on final stage of AAitem referring to quest variable "TimerVariable" in quest script AAitem2SCRIPT attached to quest AAitem2 which is "Start Game Enabled."Set AAitem2.TimerVariable to GamedaysPassed Quest script attached to quest AAItem2: SCN AAItem2SCRIPT ; Quest script attached to quest AAItem2 Short TimerVariable Begin Gamemode If GetStage AAitem2 < 5 If ( GamedaysPassed >= ( TimerVariable + 2 ) ) ; The number "2" in this line controls the number of days and sets it to 2 days. Setstage AAitem2 5 ; Where stage 5 gives the gamer instructions on doing the new quest. EndIf EndIf End Timers always betray you. I have not put the above script into a mod and tested it, so there are probably bugs. There always are when you start messing with timers. Be aware that timers in Oblivion are rather loose. Your 2-day timer might take 3 days to go off. You need to use >= in the scripts because if you use == then the script may fail to fire during day two and then when it has opportunity to fire on day three or day four, it will no longer be allowed to. Timers really stink and are no fun. If you need more help contact me. Edited January 26, 2011 by David Brasher Link to comment Share on other sites More sharing options...
Videniofthesith Posted January 26, 2011 Author Share Posted January 26, 2011 Alright! Thank YOU! I will try that out here in a few mins. Maybe you could help me with a few other scripts that are giving me problems. Say a follow package set to run during stage AAitem30 on aaaNirinaDracon Link to comment Share on other sites More sharing options...
Recommended Posts