[question] add timer with callback

+
[question] add timer with callback

PHP:
import final function AddTimer ( ... ) : int;

public timer function LoopTimer( dt : float, id : int )
{
    doSomething();
}

AddTimer('LoopTimer', 0.01f, true);
LoopTimer(0.01f, 0);

i've tried all those variations, cannot create a timer with callback function. any ideas? ;o
 
Last edited:
PHP:
public timer function LoopTimer( dt : float, id : int )
{
    doSomething();
}

AddTimer('LoopTimer', 0.01f, true);

have you tried putting it in a class that already use timers? C4Player for example
read more here
 
have you tried putting it in a class that already use timers? C4Player for example
read more here

nope, i need it before the player is even spawned, and that's probably the issue. before the world is initialized.

which seems to also be why i can't play music other than main menu and credits either, the world has to be initialized, and assets/soundbanks loaded. of course, i could try hacking the soundbanks.xml file and cooking a mod for that.
 
Last edited:
Top Bottom