JuicyPwner Posted January 11, 2021 Share Posted January 11, 2021 (edited) Hello, earlier today I had attempted to try have the script be able to *wait* until 3 days once Player activates the condition heres a sample (unmarked quest btw) scn samplescript int sampleStage; 1=obtain note for npc; 2=if player has unique condition met, allow dialogue with npc to give ingredient; 3=stage when entering dialogue, set selectday to gamedayspassed; 4=stage when ending dialogue player gave ingredient wait 3 days until the product is made by npc; 5=product is done, return to npc to get rewards and product float selectday (i think i did int too just to test, still didnt work) if samplestage==1 if gethasnote samplenoteREF == 1set samplestage to 2endifendif if samplestage==3set selectday to gamedayspassedendif if samplestage == 4if gamedayspassed-selectday >=3set samplestage to 5endifendif end So everything above saved, its just the functionality never worked. I had specific dialogue where if you asked the NPC after him telling you to wait (stage 4), he *should* tell you hes not finished but it never came up and I knew every condition was satisfied, I believe I did the function gamedayspassed wrong, and while I redid this instance to not use the function (just do it all at once in dialogue without any timer) I really would like to be able to have a timer set for it for a later version. If anyone could give some tips that would be great edit: I think i found a solution but still if anyone has any tips it would be cool, got the following from geck wiki: If all you want to know is if it is a new day (strictly meaning that the 12:00am boundary has been crossed), save the current GameDaysPassed into a SHORT variable (lastDay) and then when you want to do your comparison, create a SHORT (currentDay) and set it to the current GameDaysPassed. If (currentDay - lastDay) >= 1, then a day has passed. By storing GameDaysPassed in SHORT variables you trim off the factional hours that live in the decimal places. If you use floats instead of SHORTs you will essentially be checking if "24 hours has passed" rather than, "is it the next day."I think with this I should be able to detect if 3 days go by, short FirstDay set FirstDay to GameDaysPassed if samplestage==4if (gamedayspassed-firstday) >=3set samplestage to 5endifendifend but then again the wiki says it only detects if 24 hours have passed :/ Edited January 11, 2021 by JuicyPwner Link to comment Share on other sites More sharing options...
ashtonlp101 Posted January 11, 2021 Share Posted January 11, 2021 (edited) GamedaysPassed only seems to function if you set a specified date. If you don't specify the date, it defaults to October 13, 2281. So it's running off of since you started the game, at least to my understanding. What I think you need to do is set "selectday" to gameday, not gamedayspassed. Edited January 11, 2021 by ashtonlp101 Link to comment Share on other sites More sharing options...
clanky4 Posted January 12, 2021 Share Posted January 12, 2021 (edited) Day time passage is weird in the GECK. Most vanilla scripts that deal with it use an internal value to keep track of it. The only ones that I know of and have thoroughly looked at were the assassin squad scripts. Which are a HUGE mess and really difficult to understand. Here is an example script that I've tried to make as easy to understand as possible. It sets a quests stage to 20 three days after it was set to 10: scn ThreeDayQuestScript short DoOnce ;set istartday values once short DoOnceA ;do the thing once int iStartDay ; the start day begin GameMode if getstage ThreeDayQuest == 10 ;whatever stage you want to have three days pass from if DoOnce == 0;set iStartDay set DoOnce to 1 set iStartDay to GameDaysPassed endif if GameDaysPassed - iStartDay >= 3 && DoOnceA == 0 ;three days have passed and this hasn't happened yet set DoOnceA to 1 setstage ThreeDayQuest 20 ;whatever effect you want to happen endif endif End Edited January 12, 2021 by clanky4 1 Link to comment Share on other sites More sharing options...
Recommended Posts