Difference between revisions of "User:Rasikko"

Jump to navigation Jump to search
407 bytes removed ,  19:21, 25 April 2018
m
Undo revision 51770 by Rasikko (talk)impossible to make edits on a phone.
imported>Rasikko
imported>Rasikko
m (Undo revision 51770 by Rasikko (talk)impossible to make edits on a phone.)
Line 57: Line 57:
Various functions for calculating time in skyrim. Most use [[GetCurrentGameTime - Utility]] as it returns the total game days passed. Making it easier for conversions.<br><br>
Various functions for calculating time in skyrim. Most use [[GetCurrentGameTime - Utility]] as it returns the total game days passed. Making it easier for conversions.<br><br>
This function has GetCurrentGameTime live up to its name. Will return the in-game time, instead of days passed. At least 1 day has to have passed.  
This function has GetCurrentGameTime live up to its name. Will return the in-game time, instead of days passed. At least 1 day has to have passed.  
<source lang=”papyrus”>
Float Function GetTimeSpanDuration(Float currentTime, Int laterTime)
; Returns the number of hours between a later time and the current time.
Int hrOfDay = ((currentTime - currentTime as int) * 24) as int
If hrOfDay > 0 && hrOfDay < 23 && laterTime > 12
  return  laterTime + 12 - hrOfDay
elseif hrOfDay < 12 && laterTime < 12
  return laterTime - hrOfDay
EndFunction</source>
<source lang="papyrus">
<source lang="papyrus">
Float Function GetCurrentGameTimeExtended() Global
Float Function GetCurrentGameTimeExtended() Global
Anonymous user

Navigation menu