Difference between revisions of "GetCurrentGameTime - Utility"

imported>Plplecuyer
(Created page with 'Category:Scripting Category:Papyrus '''Member of:''' Utility Script Obtains the current game time in terms of game days passed (same as the global variable) == Synt…')
 
Tag: Reverted
Line 15: Line 15:
== Return Value ==
== Return Value ==
The current game time in terms of "game days passed".
The current game time in terms of "game days passed".
== Return Value ==
No it DOES NOT
It returns a fractional value, NOT an EXACT Integer.
The comparison operators "<" and ">" will work but "==" WILL FAIL most of the time.
You must use a rounding function to cast the returned value to an exact integer i.e.
        ( day == Math.Floor(Utility.GetCurrentGameTime())  )
or maybe
        ( day == Math.Ceil(Utility.GetCurrentGameTime())  )


== Examples ==
== Examples ==
Anonymous user