TangerineDog Posted October 5, 2016 Share Posted October 5, 2016 I normally use the internal variable pHourstoWait to set a timer, but it can only be set in increments of 1 hour. Is there a way to set a timer for a few minutes? Unfortunately, pMinutestoWait doesn't do the trick... Link to comment Share on other sites More sharing options...
PeterMartyr Posted October 5, 2016 Share Posted October 5, 2016 (edited) Use floats to get decimal point like 7 In Game Time Minutes is 0.1166666666666667 Edit Bool are either true or falseIntegers are whole numbers only 1, 2, 3, 4 etc etcFloats are numbers with decimals 1.5 0.5 0.00004 1.0 RegisterForUpdateGameTime(float afInterval) Edited October 5, 2016 by PeterMartyr Link to comment Share on other sites More sharing options...
TangerineDog Posted October 5, 2016 Author Share Posted October 5, 2016 The whole script is ScriptName ScriptSkooma01 extends activemagiceffectSpell Property SpellSkooma01 AutoSpell Property SpellSkooma02 AutoInt Property pHoursToWait AutoEvent OnUpdateGameTime(); debug.trace(self + "OnUpdateGameTime") Game.GetPlayer().RemoveSpell(SpellSkooma01) Game.GetPlayer().AddSpell(SpellSkooma02, false) Debug.Notification("The Skooma's effects are ceasing") EndEventEvent OnEffectStart(Actor akTarget, Actor akCaster) ; start timer RegisterForSingleUpdateGameTime(pHourstoWait) EndEvent, so I have to set the values in the properties in the CK. But it won't let me use floats... Link to comment Share on other sites More sharing options...
PeterMartyr Posted October 5, 2016 Share Posted October 5, 2016 Working on it .... wait Link to comment Share on other sites More sharing options...
PeterMartyr Posted October 5, 2016 Share Posted October 5, 2016 Here you go, Just ADD a NEW SCRIPT & remove the old one ScriptName ScriptForTangerineDog extends activemagiceffect Spell Property SpellSkooma01 Auto Spell Property SpellSkooma02 Auto Float Property pHoursToWait Auto Event OnUpdateGameTime() ; debug.trace(self + "OnUpdateGameTime") Game.GetPlayer().RemoveSpell(SpellSkooma01) Game.GetPlayer().AddSpell(SpellSkooma02, false) Debug.Notification("The Skooma's effects are ceasing") EndEvent Event OnEffectStart(Actor akTarget, Actor akCaster) ; start timer RegisterForSingleUpdateGameTime(pHourstoWait) EndEvent Link to comment Share on other sites More sharing options...
TangerineDog Posted October 6, 2016 Author Share Posted October 6, 2016 (edited) Good news: it definitely works. Bad news (not really): Now I have to figure out what float will get me the equivalent of 3 minutes set in the duration of an effect in my spell... Thank you! Edited October 6, 2016 by TangerineDog Link to comment Share on other sites More sharing options...
TangerineDog Posted October 6, 2016 Author Share Posted October 6, 2016 (edited) Well, strangely enough, a float of 1.0 is only a few real life seconds short... 0.o? Edited October 6, 2016 by TangerineDog Link to comment Share on other sites More sharing options...
FrankFamily Posted October 7, 2016 Share Posted October 7, 2016 Unless you have your timescale messed up 1.0 (one ingame hour) should be 3 minutes or so. Regarding the figuring out... you just divide the minutes by 60 to get the hours, as in: 3 min/60 minutes per hour = 0.05 hours Link to comment Share on other sites More sharing options...
Recommended Posts