Saxxon91 Posted March 22, 2013 Share Posted March 22, 2013 (edited) Question's in the title, basically i have two quests done that you get from the same person. I want to have the second one become avalible a few days after finishing the first, I've tried looking into it myself but to be honest I don't really know where to start. If anyone can help me out it would be greatly appreciated. And I made the title to long... Wonderful! Edited March 22, 2013 by Saxxon91 Link to comment Share on other sites More sharing options...
nonplusultra Posted March 22, 2013 Share Posted March 22, 2013 create a third quest for a script, there you have to use a variable and the gamedayspassed global Link to comment Share on other sites More sharing options...
Saxxon91 Posted March 22, 2013 Author Share Posted March 22, 2013 I honestly have no Idea how to use GameDaysPassed... If it's not too much trouble can I see an example of how it's used, or at least point me to an example of where it's used in the game. Link to comment Share on other sites More sharing options...
llamaRCA Posted March 22, 2013 Share Posted March 22, 2013 create a third quest for a script, there you have to use a variable and the gamedayspassed global It doesn't have to be a third quest. You can do the scripting in the second quest script. @Saxxon - when you finish the first quest start a timer that goes for however many days you need it to. Like nonplusultra says you'll want to use gamedayspassed. I'll give you an example of what I've done for one of my quests. I want a quest to wait for seven days before it starts. The first bit is in the stage results script of a quest. It runs when I set stage in a dialogue results script. The second bit is in the quest script for the quest I'm delaying. I've declared my variables there and the timer runs in gamemode and it will, in this specific case, add a dialogue topic and increment the variable for me after seven days. You want to do something else there, but I've left it as is so you can see what I've done. In the Stage results script of the quest: Set AWillowWeddingQuest.WannaWedding to 1 Set AWillowWeddingQuest.DaysTimer to GameDaysPassed In the quest script: ;;;;Delay between end of AWLP quest and beginning of wedding quest If WannaWedding == 1 If GameDaysPassed - DaysTimer >= 7 AddTopic AWDWQIntroPresent Set WannaWedding to 2 endif endif (Okay, what's the point of putting it in the code box if it wipes out my indenting?) This is the scripting for the timer. After seven days, for this example, some stuff happens. Where I've done AddTopic and Set my variable to 2 you'd start your quest and do whatever else you want to do. :smile: llama Link to comment Share on other sites More sharing options...
nonplusultra Posted March 22, 2013 Share Posted March 22, 2013 Told him about a third quest, because up to the size of the mod, you'll need a generic quest anyway. So put the following script in a generic quest or the second quest scn scriptname short stage float cday begin GameMode if stage == 0 if getquestcompleted firstquest set cday to gamedayspassed + 3 ; change the number to the days that shall pass before doing the action set stage to 1 endif endif if stage == 1 if gamedayspassed > cday setstage secondquest 10 set stage to 2 endif endif end Link to comment Share on other sites More sharing options...
Saxxon91 Posted March 22, 2013 Author Share Posted March 22, 2013 Thanks guys, I've got it working now :biggrin: Link to comment Share on other sites More sharing options...
joshua121 Posted June 7, 2014 Share Posted June 7, 2014 Thank you nonplustra. This is exactly what I wanted to know too. I will have to credit you in my mod because you just made my ambush script possible. You rock. Link to comment Share on other sites More sharing options...
Recommended Posts