Is their an easy way to get a script attached to a magic effect to reset itself and start again after it finishes processing everything within the script?
Note: It cant have anything to do with the RegisterForUpdate or OnUpdate commands because both commands do not work with menumode.
The reason I am trying to get this to work is so that for every hour while the player is asleep a global value is increased, here is the script:
Event OnInit()
RegisterForSleep()
endevent
Event OnSleepStart(float afSleepStartTime, float afDesiredSleepEndTime)
GlobalPCIsSleeping.setvalue(1)
game.getplayer().AddPerk(PerkSetValue)
endevent
Event OnSleepStop(bool abInterrupted)
game.getplayer().RemovePerk(PerkSetValue)
GlobalPCIsSleeping.setvalue(0)
endevent
The perk which is added mods the global value and adds 1 every game hour.




