RogerRed Posted May 22, 2023 Share Posted May 22, 2023 I made a recharge enchantment spell and wanted to give it a 12 or 8 hour cooldown and I don't know how to go about it, any assistance would be appreciated. Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted May 23, 2023 Share Posted May 23, 2023 The GetSecondsPassed function should do the job https://en.uesp.net/wiki/Oblivion_Mod:Script_Functions Link to comment Share on other sites More sharing options...
RomanR Posted May 23, 2023 Share Posted May 23, 2023 (edited) Also reading global variables GameHour and GameDay (to check time going trough midnight) should do the job too. However, you propably need to use OBSE function SetCanCastPower as in vanilla you can cast a Greater Power only once per 24 hours. If your spell being a Greater Power isn't a neccessity, Lesser Power isn't restricted to this 24h limit. Edited May 23, 2023 by RomanR Link to comment Share on other sites More sharing options...
RogerRed Posted May 23, 2023 Author Share Posted May 23, 2023 Thanks for both your suggestions but I found just the exact thing I was looking for. It was SetPowerTimer. I put it in ScriptEffectStart portion of the script like so. user.SetPowerTimer RechargeSpell1 1200The timescale in the vanilla game goes from 0 to 3600 with 3600 equaling 24 hours so that 1200 equals 8 hours, Making it so that spell can be cast three times a day. Link to comment Share on other sites More sharing options...
Recommended Posts