void ADomination::DefaultTimer() { Super::DefaultTimer(); if (HasMatchStarted() && !HasMatchEnded()) { float c = 0.2; if (TimeLimit > 0) { // Award more points toward the end of the match if (DomGameState->GetRemainingTime() < 0.25 * TimeLimit) { if (DomGameState->GetRemainingTime() < 0.1 * TimeLimit){ c = 0.8; } else{ c = 0.4; } } } for (uint8 cp = 0; cp < CDomPoints.Num(); cp++) { ScoreTeam(cp, c); } } }
void ASGameMode::StartMatch() { if (!HasMatchStarted()) { GetWorldTimerManager().SetTimer(TimerHandle_BotSpawns, this, &ASGameMode::SpawnBotHandler, 5.0f, true); } Super::StartMatch(); }
void ASGameMode::StartMatch() { if (!HasMatchStarted()) { /* Spawn a new bot every 5 seconds (bothandler will opt-out based on his own rules for example to only spawn during night time) */ GetWorldTimerManager().SetTimer(TimerHandle_BotSpawns, this, &ASGameMode::SpawnBotHandler, BotSpawnInterval, true); } Super::StartMatch(); }