FTurnBasedMatch

[FTurnBasedMatch](API\Plugins\OnlineSubsystem\Interfaces\FTurnBasedMatch) contains all of the information about an in-progress turn based match

Windows
MacOS
Linux

References

Module

OnlineSubsystem

Header

/Engine/Plugins/Online/OnlineSubsystem/Source/Public/Interfaces/OnlineTurnBasedInterface.h

Include

#include "Interfaces/OnlineTurnBasedInterface.h"

Syntax

class FTurnBasedMatch

Remarks

FTurnBasedMatch contains all of the information about an in-progress turn based match

Destructors

Name Description

Public function Virtual

~FTurnBasedMatch()

Functions

Name Description

Public function Virtual

void

 

EndMatch

(
    FEndMatchSignature QuitMatchCallbac...,
    EMPMatchOutcome::Outcome LocalPlaye...,
    EMPMatchOutcome::Outcome OtherPlaye...
)

Ends the match while setting the match outcome (win/loss/tie) for all players

Public function Virtual

void

 

EndTurnWithMatchData

(
    const TArray< uint8 >& MatchData,
    int32 TurnTimeoutInSeconds,
    FUploadMatchDataSignature EndTurnCa...
)

End the turn and upload MatchData.

Public function Virtual Const

int32

 

GetCurrentPlayerIndex()

Get the index of the current player in the match's list of participants

Public function Virtual Const

int32

 

GetLocalPlayerIndex()

Get the index of the local player in the match's list of participants

Public function Virtual Const

bool

 

GetMatchData

(
    TArray< uint8 >& OutMatchData
)

Put the match data into OutMatchData, returning whether or not the operation was successful

Public function Virtual Const

FString

 

GetMatchID()

Returns the Match ID for this match

Public function Virtual Const

EMPMatchOutc...

 

GetMatchOutcomeForPlayer

(
    int32 PlayerIndex
)

Get the outcome of the match (won/lost/quit/etc.) for the player with PlayerIndex

Public function Virtual Const

int32

 

GetNumberOfPlayers()

Get the number of players in the match

Public function Virtual Const

bool

 

GetPlayerDisplayName

(
    int32 PlayerIndex,
    FString& Name
)

Get the user-friendly display name for the given player.

Public function Virtual Const

bool

 

HasMatchData()

HasMatchData is for when you want to know if the match has data, without getting at the data

Public function Virtual

void

 

QuitMatch

(
    EMPMatchOutcome::Outcome Outcome,
    int32 TurnTimeoutInSeconds,
    FQuitMatchSignature QuitMatchCallba...
)

Leave the match, providing an outcome for the player

Public function Virtual

void

 

ReloadMatchData

(
    FDownloadMatchDataSignature Downloa...
)

Request a reload of the match's data.

Public function Virtual

void

 

SetMatchData

(
    const TArray< uint8 >& NewMatchDat...,
    FUploadMatchDataSignature EndTurnCa...
)

Update the data for the match with the data provided

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss