If you wanted, you could even add script to avarage it over, say, the previous second, so it wouldn't change so frequently. You would want an array of previous values and an integer to determine where you are up to.
So, if you want to check fifty frames, create a real array of size 50, called prevframes, and create an integer called frameno. Add a draw actor on your text number actor,
- Code: Select all
prevframes[frameno] = real_fps;
frameno += 1;
if (frameno >= 50)
{
int i;
double addframe = 0;
for (i = 0; i < 50; i ++)
{
addframe += prevframes[i];
}
textNumber = addframe / 50;
frameno = 0;
}
I have not tested this, but it should work.