Jump to content

Set a timer for minutes?


Recommended Posts

Use floats to get decimal point like 7 In Game Time Minutes is 0.1166666666666667

 

Edit

 

Bool are either true or false

Integers are whole numbers only 1, 2, 3, 4 etc etc

Floats are numbers with decimals 1.5 0.5 0.00004 1.0

 

RegisterForUpdateGameTime(float afInterval)

Edited by PeterMartyr
Link to comment
Share on other sites

The whole script is

ScriptName ScriptSkooma01 extends activemagiceffect

Spell Property SpellSkooma01 Auto
Spell Property SpellSkooma02 Auto
Int 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

, 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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...