Back to the Vavoom Forum Archives


Forum

How to stall in Vavoom C

Sat, 07 Oct 2006 01:02:56

TheCount

Is there any function that can delay execution by a specific amount of ticks? I'm looking for a function similar to the ACS function Delay(int). Is it possible? Thank you very much.
Sat, 07 Oct 2006 08:06:32

Janis Legzdinsh

No.
Sat, 07 Oct 2006 10:50:11

Crimson Wizard

Yet, there's a common way to make a timer. Assuming you have an Actor (some creature maybe), that need to be stopped for a moment and denied to perform any actions. You create new variable, say, float MyTimer. In appropriate moment you initialize it with 2.0 value (in seconds). Then, in Tick() function write following:
void Tick (float deltaTime)
{

      if (MyTimer > 0.0)
      {
            MyTimer -= deltaTime;
            return;
      }

...........
...........
}
Well, ofcourse it is a simple sample, perhaps it won't fit your needs exactly.

Back to the Vavoom Forum Archives