RealDocs

AGameStateBase::GetPlayerRespawnDelay

function Engine Blueprint Since 4.14
#include "GameFramework/GameStateBase.h"
Access: public Specifiers: virtualUFUNCTIONBlueprintCallableconst

Description

Returns how many seconds a player must wait before being allowed to respawn. The base class returns `0.0f`; override to implement per-player or game-phase-dependent respawn timers.

Caveats & Gotchas

  • The base implementation always returns `0.0f`. Nothing in the engine automatically enforces this delay — your game mode is responsible for reading this value and blocking respawn accordingly.
  • Per-player delays (e.g. longer respawns for high-kill streaks) require storing per-controller state; the controller pointer alone is not enough to derive context without additional bookkeeping.

Signature

UFUNCTION(BlueprintCallable, Category=GameState)
ENGINE_API virtual float GetPlayerRespawnDelay(AController* Controller) const

Parameters

Name Type Description Default
Controller AController* The controller for which the respawn delay should be determined.

Return Type

float

Example

Flat respawn delay based on game phase C++
float AMyGameState::GetPlayerRespawnDelay(AController* Controller) const
{
    return bIsSuddenDeath ? 10.0f : 3.0f;
}

Version History

Introduced in: 4.14

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.