Here's the repeatedly_execute function of a module :
Character* charPool[NPC_MAXCHAR]; //some code somewhere else puts Characters there
function repeatedly_execute()
{
int i=0;
while (i<NPC_MAXCHAR) { //we iterate through all possible NPC's
if (!charPool[i].Moving) { //only if the character has stopped walking
int x = Random(320); int y = Random(200);
charPool[i].Walk(x, y, eNoBlock, eWalkableAreas); //THIS LINE IS CALLED AT EVERY GAME CYCLE!!!
}
i++;
}
}
It turns out the line commente "//THIS LINE..." is called at every game cycle. A walk action keeps being initiated. I don't understand why : Character.Moving should be false as soon as the character starts walking?!?
I've recycled this old empty thread for a new purpose so I'm bumping it. Apologies if it confuses the mods.
OK found it. The character was stuck outside a walkable area, so it couldn't move, so "moving" was always false.