I'd try something like this (untested), if you're sure there'll be a time limit (maybe put some code in onLevelBegin to ensure that):
Code:
bool atLeastOneRedPlayerAlive() {
for (uint i = 0; i < 32; ++i) {
jjPLAYER@ play = jjPlayers[i];
if (play.team == TEAM::RED && play.isInGame)
return true;
}
return false;
}
void onGameStop(bool firstTime) {
if (!jjIsServer) return;
if (firstTime) return;
if (jjGameState == GAME::PAUSED) return;
if (atLeastOneRedPlayerAlive())
//somehow indicate that you think blue lost
}
__________________
|