Hi, I have a problem in one script. I'm using OBSE 21 Beta3. I have a number of timers in a magic effect script, all work but 3 of them don't work as they should. They are countdown timers, and are set to the duration of an effect and have to reach zero so that the effect is removed. But in game they are very slow, it seems that 1 sec = 10 seconds. For a duration of 25 seconds that is fetched and set the timer to, the timer runs for 250 seconds instead. So I had to divide the timers by 10 (lines 11, 18 and 25), and they run in the correct time, but still I guess there's something wrong.. The timers are Burden1timer, Burden2timer and Burden3timer. The script updates normally, there aren't slowdowns, and DebugPrints outside the timers are printed very quickly in the console.
Another question (line 4) (I didn't find out on my own yet): if there is more than one effect that affects the target, effect '0' is the first one that was applied or the last one? And how can I get the duration of a precise effect (in my case of a burden effect)? For magnitude I can use GetTotalActiveEffectMagnitude, how can I do for duration? Right now GetNthActiveEffectCode and effect browsing the only solution I can see.
Here's the part of the script:
Spoiler if (HasMagicEffect rBurdenID) let fBurdenMagn := GetTotalActiveEffectMagnitude rBurdenID ; set fBurdenMagn to 150 let fBurdenDuration := GetNthActiveEffectDuration 0 debugprint "burden %.0f %.0f" fBurdenMagn fBurdenDuration DispelNthActiveEffect 0 set BurdenDispelled to 1 elseif BurdenDispelled if (Burden1Active == 0) set Burden1Active to 1 set Burden1timer to fBurdenDuration / 10 set BurdenDispelled to 0 elseif (player.GetAVC 20 < 50) Message "You aren't skilled enough in Alteration to burden this subject any further" set BurdenDispelled to 0 elseif (Burden2Active == 0) && (player.GetAVC 20 >= 50) set Burden2Active to 1 set Burden2timer to fBurdenDuration / 10 set BurdenDispelled to 0 elseif (player.GetAVC 20 < 100) Message "You aren't skilled enough in Alteration to burden this subject any further" set BurdenDispelled to 0 elseif (Burden3Active == 0) && (player.GetAVC 20 >= 100) set Burden3Active to 1 set Burden3timer to fBurdenDuration / 10 set BurdenDispelled to 0 elseif (Burden3Active == 1) Message "You can't burden this subject any further, he's been been battered enough." set BurdenDispelled to 0 endif endif if Burden1Active set Burden1timer to Burden1timer - ScriptEffectElapsedSeconds if (Burden1timer > 0) && (fBurden1 == 0) set fBurden1 to fBurdenMagn - fBurdenMagn * ( ( GetAV Willpower / 2 + GetAVC 64) / 150 ) debugprint "burden 1 %.0f" fBurden1 elseif (Burden1timer <= 0) set fBurden1 to 0 set Burden1Active to 0 endif endif if Burden2Active set Burden2timer to Burden2timer - ScriptEffectElapsedSeconds if (Burden2timer > 0) && (fBurden2 == 0) set fBurden2 to fBurdenMagn - fBurdenMagn * ( ( GetAV Willpower / 2 + GetAVC 64) / 150 ) debugprint "burden 2 %.0f" fBurden2 elseif (Burden2timer <= 0) set fBurden2 to 0 set Burden2Active to 0 endif endif if Burden3Active set Burden3timer to Burden3timer - ScriptEffectElapsedSeconds if (Burden3timer > 0) && (fBurden3 == 0) set fBurden3 to fBurdenMagn - fBurdenMagn * ( ( GetAV Willpower / 2 + GetAVC 64) / 150 ) debugprint "burden 3 %.0f" fBurden3 elseif (Burden3timer <= 0) set fBurden3 to 0 set Burden3Active to 0 endif endif
Thanks in advance