View Single Post
Zah dud4h

JCF Member

Joined: Dec 2014

Posts: 28

Zah dud4h is doing well so far

Apr 14, 2015, 08:23 AM
Zah dud4h is offline
Reply With Quote
Quote:
Originally Posted by Violet CLM View Post
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
}
Thanks violet,now,is there something that sets the TLRS lives depending on how many people are playing?
__________________
.