AGameModeBase::HasMatchEnded
#include "GameFramework/GameModeBase.h"
Access: public
Specifiers: virtualENGINE_APIUFUNCTIONBlueprintCallableconst
Description
Returns true if the match can be considered over. In AGameModeBase this always returns false; AGameMode overrides it to check for the WaitingPostMatch state.
Caveats & Gotchas
- • In AGameModeBase the base implementation returns false unconditionally. If you are not using AGameMode's match-state machine you must override this to reflect your own end condition.
- • Clients should check AGameStateBase::HasMatchEnded() rather than querying the game mode directly, since GameMode does not exist on clients.
Signature
UFUNCTION(BlueprintCallable, Category=Game)
virtual bool HasMatchEnded() const Return Type
bool Examples
Poll for match end on Tick and print a message when over
Blueprint
Override for a custom end condition C++
bool AMyGameMode::HasMatchEnded() const
{
return bWinnerDetermined || Super::HasMatchEnded();
} Tags
Version History
Introduced in: 4.14
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?