AGameStateBase::HasMatchStarted
#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
Prevent spawning before match start C++
bool AMyGameMode::CanSpawnPlayer(AController* Controller) const
{
AGameStateBase* GS = GetGameState<AGameStateBase>();
return GS && GS->HasMatchStarted();
} Tags
Version History
Introduced in: 4.14
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?