Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
SCR_GameModeEndData Interface Reference

Serializable end game date replicated to all users. More...

Public Member Functions

int GetEndReason ()
 Returns reason why game mode ended.
 
int GetWinnerId ()
 If game mode has a winning player, their id can be delivered via this prop.
 
void GetWinnerIds (out notnull array< int > winnerIds)
 Fill provided array with list of all winners.
 
int GetWinnerFactionId ()
 If game mode has a winning faction, their id can be delivered via this prop.
 
void GetFactionWinnerIds (out notnull array< int > winnerIds)
 Fill provided array with list of all winners.
 

Static Public Member Functions

static SCR_GameModeEndData CreateSimple (EGameOverTypes reason=EGameOverTypes.ENDREASON_UNDEFINED, int winnerId=-1, int winnerFactionId=-1)
 Creates and returns new end data.
 
static SCR_GameModeEndData Create (EGameOverTypes reason=EGameOverTypes.ENDREASON_UNDEFINED, array< int > winnerIds=null, array< int > winnerFactionIds=null)
 Creates and returns new end data with multiple potential winner(s).
 
static bool Extract (SCR_GameModeEndData prop, ScriptCtx hint, SSnapSerializerBase snapshot)
 
static bool Inject (SSnapSerializerBase snapshot, ScriptCtx hint, SCR_GameModeEndData prop)
 
static void Encode (SSnapSerializerBase snapshot, ScriptCtx hint, ScriptBitSerializer packet)
 
static bool Decode (ScriptBitSerializer packet, ScriptCtx hint, SSnapSerializerBase snapshot)
 
static bool SnapCompare (SSnapSerializerBase lhs, SSnapSerializerBase rhs, ScriptCtx hint)
 
static bool PropCompare (SCR_GameModeEndData prop, SSnapSerializerBase snapshot, ScriptCtx hint)
 

Detailed Description

Serializable end game date replicated to all users.

Member Function Documentation

◆ Create()

static SCR_GameModeEndData SCR_GameModeEndData.Create ( EGameOverTypes  reason = EGameOverTypes::ENDREASON_UNDEFINED,
array< int >  winnerIds = null,
array< int >  winnerFactionIds = null 
)
static

Creates and returns new end data with multiple potential winner(s).

◆ CreateSimple()

static SCR_GameModeEndData SCR_GameModeEndData.CreateSimple ( EGameOverTypes  reason = EGameOverTypes::ENDREASON_UNDEFINED,
int  winnerId = -1,
int  winnerFactionId = -1 
)
static

Creates and returns new end data.

◆ Decode()

static bool SCR_GameModeEndData.Decode ( ScriptBitSerializer  packet,
ScriptCtx  hint,
SSnapSerializerBase  snapshot 
)
static

◆ Encode()

static void SCR_GameModeEndData.Encode ( SSnapSerializerBase  snapshot,
ScriptCtx  hint,
ScriptBitSerializer  packet 
)
static

◆ Extract()

static bool SCR_GameModeEndData.Extract ( SCR_GameModeEndData  prop,
ScriptCtx  hint,
SSnapSerializerBase  snapshot 
)
static

◆ GetEndReason()

int SCR_GameModeEndData.GetEndReason ( )

Returns reason why game mode ended.

Can be left empty or implemented as desired per game mode specialization.

Reserved values: -1: ENDREASON_UNDEFINED: Undefined -2: ENDREASON_TIMELIMIT: Time limit reached -3: ENDREASON_SCORELIMIT: Score limit reached -4: ENDREASON_DRAW: Game ends in draw -5: ENDREASON_SERVER_RESTART: On server being restarted

◆ GetFactionWinnerIds()

void SCR_GameModeEndData.GetFactionWinnerIds ( out notnull array< int >  winnerIds)

Fill provided array with list of all winners.

◆ GetWinnerFactionId()

int SCR_GameModeEndData.GetWinnerFactionId ( )

If game mode has a winning faction, their id can be delivered via this prop.

Can be left empty or implemented as desired per game mode specialization.

◆ GetWinnerId()

int SCR_GameModeEndData.GetWinnerId ( )

If game mode has a winning player, their id can be delivered via this prop.

Can be left empty or implemented as desired per game mode specialization.

◆ GetWinnerIds()

void SCR_GameModeEndData.GetWinnerIds ( out notnull array< int >  winnerIds)

Fill provided array with list of all winners.

◆ Inject()

static bool SCR_GameModeEndData.Inject ( SSnapSerializerBase  snapshot,
ScriptCtx  hint,
SCR_GameModeEndData  prop 
)
static

◆ PropCompare()

static bool SCR_GameModeEndData.PropCompare ( SCR_GameModeEndData  prop,
SSnapSerializerBase  snapshot,
ScriptCtx  hint 
)
static

◆ SnapCompare()

static bool SCR_GameModeEndData.SnapCompare ( SSnapSerializerBase  lhs,
SSnapSerializerBase  rhs,
ScriptCtx  hint 
)
static

The documentation for this interface was generated from the following file: