Legotrash Posted October 20, 2012 Share Posted October 20, 2012 No matter what I do I can't make GameDayspassed to work for me.The simplest of examples would be fine as long as it is working.Here's my last attempt: scn DayTesting short Timeshort doOnce Begin Gamemode If doOnce == 0 set Time to GameDaysPassed set doOnce to 1 EndIf If (GetGlobalValue GameDayspassed == (Time +1)) MessageBox "Boo!" EndIf End Nevermind if the box will keep on popping,all I care is to make GameDaysPassed to work and I've tried everything I could find online.Btw,if it's done right,it should be working while sleeping or waiting,right? Link to comment Share on other sites More sharing options...
Hickory Posted October 20, 2012 Share Posted October 20, 2012 Try this: ScriptName DayTesting Short CurrentDay Begin GameMode If <Trigger to set current day> Set CurrentDay to GameDaysPassed EndIf If <game day trigger check here> If GameDaysPassed == ( CurrentDay + 1 ) MessageBox "Boo" ElseIf GameDaysPassed > ( CurrentDay + 1 ) Set CurrentDay to GameDaysPassed ;If current day has passed, reset the trigger EndIf EndIf Link to comment Share on other sites More sharing options...
Legotrash Posted October 21, 2012 Author Share Posted October 21, 2012 Thank you very much Hickory but once again nothing.I can't understand why it doesn't work.I never had problems with getsecondspassed and they're pretty similar. Link to comment Share on other sites More sharing options...
Hickory Posted October 21, 2012 Share Posted October 21, 2012 Thank you very much Hickory but once again nothing.I can't understand why it doesn't work.I never had problems with getsecondspassed and they're pretty similar. That's really odd. This is a *working* script with GameDaysPassed being used. It's from the Arch Mage's regenerating chest. See what you can figure out from that. ScriptName MG19Script ;This script handles variable for quest MG19Alchemy ;control of item placement is handled by MG19ChestScript short ingredvar short dayspassed short update float hourtimer float currentday float daycheck Begin Gamemode if ( update > 0 ) if ( currentday != GameDaysPassed ) set dayspassed to ( dayspassed + 1 ) set currentday to GameDaysPassed set daycheck to GameDaysPassed endif endif End Begin Menumode if ( update > 0 ) if ( currentday != GameDaysPassed ) set dayspassed to ( dayspassed + 1 ) set currentday to GameDaysPassed endif endif End Link to comment Share on other sites More sharing options...
Legotrash Posted October 21, 2012 Author Share Posted October 21, 2012 I'm such a dummy...!When my first attempts failed I decided to make an extra,testing script for this but I forgot to attach it to a quest. :facepalm: Sorry for the trouble Hickory and thank you very much! I was about to quit the idea of using this function but seeing that it should be working made me insist. :thumbsup: Link to comment Share on other sites More sharing options...
Hickory Posted October 21, 2012 Share Posted October 21, 2012 I'm such a dummy...!When my first attempts failed I decided to make an extra,testing script for this but I forgot to attach it to a quest. :facepalm: Sorry for the trouble Hickory and thank you very much! I was about to quit the idea of using this function but seeing that it should be working made me insist. :thumbsup: It's no trouble, and don't feel bad, either -- we ALL make mistakes... it's how we learn. :thumbsup: Link to comment Share on other sites More sharing options...
Recommended Posts