Okay--so I'm coding lots of fun little cut scenes for my Gruedorf project. And sometimes it seems like Render and Showpage process my entities and copy them to the screen, and sometimes it seems like they don't.
Here's a sample of code where they don't work:
wait(50);
EntityMove(e_sheriff, "u5l0w30r0w30l0w30r0w30d0");
while(entitymoving(e_sheriff)) {
Render();
ShowPage();
}
And here's a sample of code where they do:
wait(25);
EntityMove(e_sheriff, "l0w30r0w30l0w30r0w30u0");
while(entitymoving(e_sheriff)) {
Render();
ShowPage();
}
The entitymoving function just returns entity.movecode[whatever] == 3, which should be if the entity is currently moving according to a script, right? I can't think of any better way to check whether an entity is moving or not.
But thing is: I don't see why the game copies the entity's state to the screen as expected in the second example and not in the first. There's this weird lurch in the entity's movement in the first example and I just don't see any reason for that to be happening. The v3 logs show that it's going into the loop each time, but for some reason the loop isn't doing what it must the first time? Does it have something to do with my wait() function (which pretty much just waits according to the passed number of timer ticks?)
Is there some weird thing about movecodes and ShowPage() that I just don't know? About 75% of the time this code works fine, but there's that other 25% of horrible lurching--does anyone know what's going on? I can not fathom this madness, William