Difference between revisions of "GetSecondsPassed"

Jump to navigation Jump to search
196 bytes added ,  18:16, 25 December 2008
no edit summary
imported>DragoonWraith
(note about GameDaysPassed - anyone care to check if this was true in Oblivion?)
imported>Quetzilla
Line 1: Line 1:
Link to TES4 Construction Set Wiki: [http://cs.elderscrolls.com/constwiki/index.php/GetSecondsPassed GetSecondsPassed].
Link to TES4 Construction Set Wiki: [http://cs.elderscrolls.com/constwiki/index.php/GetSecondsPassed GetSecondsPassed].


In Fallout 3, [[:Category:Time Functions|GameDaysPassed]] is a float with enough precision to accurately measure the passage of seconds, which can be used as an alternative to GetSeconds Passed. Consider:
In Fallout 3, [[:Category:Time Functions|GameDaysPassed]] is a float with enough precision to accurately measure the passage of seconds, which can be used as an alternative to GetSecondsPassed. Consider:
<pre>float MyTimer
<pre>float MyTimer


Line 31: Line 31:
end</pre>
end</pre>
It is also slightly more efficient to use GameDaysPassed because you do not need to update a variable every frame, you only have to do the check - saving the script an operation. A minor note, but nonetheless notable.
It is also slightly more efficient to use GameDaysPassed because you do not need to update a variable every frame, you only have to do the check - saving the script an operation. A minor note, but nonetheless notable.
However, for cases where the timer needs to be accurate to fractions of a second, GetSecondsPassed is the best choice (it returns fractions of seconds, even if the name implies units of seconds).


[[Category:Functions]]
[[Category:Functions]]
[[Category:Time Functions]]
[[Category:Time Functions]]
Anonymous user

Navigation menu