gob2 Posted February 11, 2019 Share Posted February 11, 2019 Every three in-game days I'd like to change a few custom global values, so a cell's lvl'd spawns "cycle" on or off depending on the day. For example: Integers a,b,c are used for "chance-none" values. On day one, a and b are set to "0" while c is set to "100". On day 2, a and c are "0" while b is "100", and day three sets a as "100" while b and c are zero. Something like that. Then it loops back to day one and so on indefinitely. Does this make sense? What's the best way to do this? How does something like this interact with sleeping/waiting? Thank you for checking this out. Link to comment Share on other sites More sharing options...
SKKmods Posted February 11, 2019 Share Posted February 11, 2019 (edited) A start game enabled quest with this script attached: GlobalVariable Property pGlobalChanceNoneA Auto Const Mandatory GlobalVariable Property pGlobalChanceNoneB Auto Const Mandatory GlobalVariable Property pGlobalChanceNoneC Auto Const Mandatory Int iSequence Event OnQuestInit() pGlobalChanceNoneA.SetValue(100) pGlobalChanceNoneB.SetValue(0) pGlobalChanceNoneC.SetValue(0) iSequence = 2 StartTimerGameTime(72, aiTimerID = 0) EndEvent Event OnTimerGameTime(int aiTimerID) If (iSequence == 1) pGlobalChanceNoneA.SetValue(100) pGlobalChanceNoneB.SetValue(0) pGlobalChanceNoneC.SetValue(0) iSequence = 2 ElseIf (iSequence == 2) pGlobalChanceNoneA.SetValue(0) pGlobalChanceNoneB.SetValue(100) pGlobalChanceNoneC.SetValue(0) iSequence = 3 ElseIf (iSequence = 3) pGlobalChanceNoneA.SetValue(0) pGlobalChanceNoneB.SetValue(0) pGlobalChanceNoneC.SetValue(100) iSequence = 1 EndIf StartTimerGameTime(72, aiTimerID = 0) EndEvent Edited February 11, 2019 by SKK50 Link to comment Share on other sites More sharing options...
gob2 Posted February 11, 2019 Author Share Posted February 11, 2019 Thank you. When I get home I'll try this out! Link to comment Share on other sites More sharing options...
Recommended Posts