I ticked the Show sky in the lighting tab and FXLightRegionCaveBlueSkylight which gives a, ehm, skylight.
int i = 0Event OnUpdate() if ( i == 4 ) ;Do stuff at only 1/4 of the normal intervals endifi++;everything elseEndevent
bool CheckPosition = falsebool CheckHealth = falseEvent OnUpdate() if ( CheckPosition ) ;Do stuff to check position endif if ( Checkhealth) ;Do stuff to check health endif if ( CheckPosition || CheckHealth ) RegisterForSingleUpdate(interval) endifEndevent
Event OnHitGoToState("Busy")if.....endifGoToState("")GoToState("Busy")if....endifGoToState("")EndEvent
GlobalVariable Property GameDaysPassed AutoActor Property PlayerRef AutoSpell[] Property SpellArray Auto{ Holds spellsMake sure other arrays match by index}Int[] Property UpdateIntervalArray Auto{ Array which stores the update intervals for each slotOnly really needed if cooldown differs}Float[] Property TimeToEnableArray Auto{ Array which stores the "game hours passed" time at which to enable the Spell(Fill this with as many 0.0s as there are spell slots)0.0 would mean spell slot is currently active}Function Init() ; Call this from something ; Quest start up maybe? RegisterForSingleUpdateGameTime(1)EndFunctionFunction BeginCooldown(Int NthSlot){ Call this whenever the spell gets used} int aiIndex = NthSlot - 1 float afInterval = (UpdateIntervalArray[aiIndex] as Float) / 24.0 ; Convert to float in game days ; Remove Spell ; or whatever it is you need to do PlayerRef.RemoveSpell(SpellArray[aiIndex]) TimeToEnableArray[aiIndex] = GameDaysPassed.GetValue() + afInterval ; May need some casts here...EndFunctionbool[] Function ResetCooldowns() float afGameDaysPassed = GameDaysPassed.GetValue() int aiIndex = 0 bool[] returnArray = new bool[8] ; or however many slots you have While aiIndex < SpellArray.Length float afTimeToEnable = TimeToEnableArray[aiIndex] If (afGameDaysPassed > afTimeToEnable) && (afTimeToEnable > 0) ; Cooldown has expired, Reset ; or however you enable spell slots again PlayerRef.AddSpell(SpellArray[aiIndex], false) ; Reset TimeToEnable for this slot TimeToEnableArray[aiIndex] = 0 returnArray[aiIndex] = True EndIf aiIndex += 1 EndWhile return returnArrayEndFunctionEvent OnUpdateGameTime() ResetCooldowns() ; Optionally can return an array of bools indicating which slots were reset RegisterForSingleUpdateGameTime(1)EndEvent
Event OnHitGoToState("Busy")if.....endifGoToState("")GoToState("Busy")if....endifGoToState("")EndEvent