I don't need to test my programs. I have an error-correcting modem.

User talk:Bob gneu

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 10:51, 20 November 2012 by Bob gneu (Talk | contribs) (Created page with '=== Timer like behavior using Tick === <uscript>class myClass extends Actor; var float tLastCheck; var float tInterval; event Tick(float dt) { tLastCheck += dt; …')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Timer like behavior using Tick[edit]

class myClass 
    extends Actor;
 
var float tLastCheck;
var float tInterval;
 
event Tick(float dt)
{
    tLastCheck += dt;
 
    if (tLastCheck < tInterval)
        return;
 
    tLastCheck -= tInterval;
    // do something here;
}
 
defaultproperties
{
    tInterval = 5.0f // 5 seconds
}