RealDocs

AGameStateBase::HasMatchStarted

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

Description

Returns true once the game mode has called its match-started callbacks. In `AGameStateBase` the default implementation mirrors `HasBegunPlay`; `AGameState` overrides it to track the `InProgress` match state.

Caveats & Gotchas

  • The base class `AGameStateBase` default implementation simply returns `HasBegunPlay()`. If you need granular match phase tracking (WaitingToStart / InProgress / etc.), use `AGameState` which tracks a proper match state machine.
  • Blueprints in different classes may call this expecting full match-state semantics — document clearly in your subclass if you override the behaviour.

Signature

UFUNCTION(BlueprintCallable, Category=GameState)
ENGINE_API virtual bool HasMatchStarted() const

Return Type

bool

Examples

Check if match has started before spawning collectibles Blueprint
Event BeginPlay Get Game State Return Value Cast To AGameStateBase Object Cast Failed As Game State Base As Game State Base Has Match Started Target is Game State Base Target Return Value Branch Condition Condition True False
Edit Blueprint graph Check if match has started before spawning collectibles
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
Prevent spawning before match start C++
bool AMyGameMode::CanSpawnPlayer(AController* Controller) const
{
    AGameStateBase* GS = GetGameState<AGameStateBase>();
    return GS && GS->HasMatchStarted();
}

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.