dieangel68 Posted December 2, 2010 Share Posted December 2, 2010 This piece of script is not saving, the geck gives no errors but it's just... not saving. scn kdcMiaDialogScript Script short MiaTalked ; 1 = Player talked to Mia at least once (open the shop option). short MiaHiredCompanion ; 1 = Player hired Mia short NPCHungerLevel ; 100 = Starving short NPCThirstLevel ; 100 = Dehidration short NPCSleepLevel ; 100 = Sleep deprivation short NPCHungerRate ; 5 short NPCThirstRate ; 5 short NPCSleepRate ; 5 short MiaCompanionWait ; 1 = Player told Mia to wait short MiaMentionCaravan ; 1 = Player knows that Mia Plays Caravan. short MiaMentionPipBoy ; 1 = Player knows that Mia has a broken pipboy short MiaBootSectorCharged ; 1 = Bootloader has been charged in the pipboy short init; float tick_length; float next_tick; short current_day; ;This instruction block execute every single frame begin GameMode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;INIT BLOCK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; if init == 0 set tick_length to 0.5 ;HALF AN HOUR (INGAME) set next_tick to GetCurrentTime + tick_length set current_day to GameDaysPassed set init to 1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAIN LOOP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; elseif MiaHiredCompanion == 1 ;With this mechanic, if the player fast forward, it should compensate ;by executing the function as many time as needed to catch up with the time. if GetCurrentTime >= next_tick or GameDaysPassed < current_day ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;NEEDS DEGRADATION;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; set NPCHungerLevel to NPCHungerLevel + NPCHungerRate set NPCThirstLevel to NPCThirstLevel + NPCThirstRate set NPCSleepLevel to NPCSleepLevel + NPCSleepRate set next_tick to next_tick + tick_length if GameDaysPassed < current_day and GetCurrentTime < next_tick ;If we notice that we are one day later and time is wrong we do a 24 hours flyback to set the clock to the proper position for the next tick set current_day to current_day + 1 set next_tick to next_tick - 24 endif endif endif end Link to comment Share on other sites More sharing options...
ObLars Posted December 2, 2010 Share Posted December 2, 2010 You have multiple Script names scn kdcMiaDialogScript Script Remove the last script. ;) Link to comment Share on other sites More sharing options...
dieangel68 Posted December 2, 2010 Author Share Posted December 2, 2010 You have multiple Script names scn kdcMiaDialogScript Script Remove the last script. ;) Man do i feel dumb now... Second question... is there a "smarter" way to make this convoluted hunger/thirst/sleep timer system than using a gamemode block? Link to comment Share on other sites More sharing options...
ObLars Posted December 2, 2010 Share Posted December 2, 2010 You have multiple Script names scn kdcMiaDialogScript Script Remove the last script. ;) Man do i feel dumb now... Second question... is there a "smarter" way to make this convoluted hunger/thirst/sleep timer system than using a gamemode block? Good question, haha. I say, if it works - Go for it! :laugh: I really lack the know-how on that part. :wacko: Link to comment Share on other sites More sharing options...
TallgeeseIV Posted December 2, 2010 Share Posted December 2, 2010 i don't think so, you're doing it the same way i do, and the way i've seen everyone else do it. it's unfortunate that there isn't a timer based blocktype, haha. Link to comment Share on other sites More sharing options...
dieangel68 Posted December 2, 2010 Author Share Posted December 2, 2010 Turns out it was my "and/or" operators (gotta use && and || instead) So the way i'm doing is the only way to trigger a function at a regular "ingame" time and do catchup in case of fast travel/wait/sleep? Link to comment Share on other sites More sharing options...
Deleted1744345User Posted December 3, 2010 Share Posted December 3, 2010 If you want the scripts to stop failing to compile, then I recommend the GECK PowerUp for New Vegas as it solves that problem. It also solve a bunch of other problems with the GECK, so it is a must-have. I don't mod without it, and neither should anyone else. Link to comment Share on other sites More sharing options...
dieangel68 Posted December 3, 2010 Author Share Posted December 3, 2010 (edited) Thank you for the tips! Also... What would be the best way to apply a malus due to dehidration/hunger/sleep deprivation, can we add a perk to a NPC for example? i'm trying to apply stats malus to my npc while they are in starvation. Edited December 3, 2010 by dieangel68 Link to comment Share on other sites More sharing options...
Recommended Posts