AGameStateBase::HasMatchEnded
#include "GameFramework/GameStateBase.h"
Access: public
Specifiers: virtualUFUNCTIONBlueprintCallableconst
Description
Returns true if the match can be considered over. The base implementation always returns false — you must override it in a subclass to define end conditions.
Caveats & Gotchas
- • The base class always returns `false`. Forgetting to override this in your `AGameStateBase` subclass means AI or Blueprint logic that polls `HasMatchEnded()` will never see the match end.
- • `AGameState` does NOT override this either — it tracks states like `WaitingPostMatch` but its `HasMatchEnded()` still returns false unless you override it yourself.
Signature
UFUNCTION(BlueprintCallable, Category = Game)
ENGINE_API virtual bool HasMatchEnded() const Return Type
bool Example
Override to track a winning condition C++
bool AMyGameState::HasMatchEnded() const
{
return bWinnerDeclared;
} Tags
Version History
Introduced in: 4.14
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?