Difference between revisions of "User:Rasikko"

Jump to navigation Jump to search
716 bytes added ,  03:26, 12 February 2018
imported>Rasikko
imported>Rasikko
Line 178: Line 178:
     return riseTime
     return riseTime
EndFuntion
EndFuntion
</source>
<br/>
Same above, but for Masser's setting time.
<source lang="papyrus">
Float Function GetMasserSetTime() Global
    ; Returns the time that Masser sets. If the current time is passed the moonset time,
    ; will return the number of hours til the next moonset.
    Float daysPassed = Utility.GetCurrentGameTime()
    Float hoursPerDay = 24.00
    Float setTime = 4.00 ; 4AM
    Float currentHour = (daysPassed - daysPassed as int) * hoursPerDay
    if daysPassed >= 1.0
if currentHour > setTime
  ; let's say its 8AM ~ 24 - ( 8 - 4) = 20
  setTime = hoursPerDay - (currentHour - setTime)
  return setTime
else
  return setTime
        endif
    endif
    return setTime
EndFunction
</source>
</source>


Anonymous user

Navigation menu