Timing
From Unreal Wiki, The Unreal Engine Documentation Site
This article is a stub. You can help Unreal Wiki by expanding it. |
SetTimer is a function that sets a timer to call the given function at a set interval.
Here is function declaration from UT3:
<uscript> function SetTimer(
float inRate, optional bool inbLoop, // not optional in UT2004 optional Name inTimerFunc='Timer', // doesn't exist in UT2004 optional Object inObj // doesn't exist in UT2004
);</uscript>
inRate
- time interval, in gameplay seconds. IfinRate <= 0.0
, it'll reset the timer.inbLoop
- if false, it'll fire only once. Default to false.
inTimerFunc
- function name.inObj
- an optional argument to pass to that function.Timer
doesn't take any arguments, so it's usable only with custom functions. As a side note, this argument is never used in UT3.
How to make seconds real
Multiply rate by WorldInfo.TimeDilation
. Of course, this method isn't absolutely reliable,
as TimeDilation may change before timer fires.
See also