Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
SCR_BaseGameModeComponent Interface Reference

Interface for game mode extending components. More...

Inheritance diagram for SCR_BaseGameModeComponent:
[legend]

Public Member Functions

SCR_BaseGameMode GetGameMode ()
 
void OnGameEnd ()
 Called on all machines when the world ends.
 
void OnGameStateChanged (SCR_EGameModeState state)
 Called when game mode state changes called on all machines.
 
void OnGameModeStart ()
 Called on every machine when game mode starts.
 
void OnGameModeEnd (SCR_GameModeEndData data)
 Called when game mode ends.
 
void OnPlayerConnected (int playerId)
 Called after a player is connected.
 
void OnPlayerAuditSuccess (int playerId)
 Event is called when player connecting Session hosting current Game Mode where is required authentication verification via.
 
void OnPlayerAuditFail (int playerId)
 Event is called when player connecting Session hosting current Game Mode AuditFail() call may be called under two occasions: 1) verification is required but failed (account is not valid, player is banned, internet issues) 2) player cannot be verified as authentication is not required or possible - where it may be valid behavior (server online connectivity turned off for example) Basically non-audited player cannot access persistency/ etc.
 
void OnPlayerAuditTimeouted (int playerId)
 Event is called when player connected to Session was kicked and did not reconnected in time This mean that slot reservation can be canceled.
 
void OnPlayerAuditRevived (int playerId)
 Event is called when player reconnected successfully back to Session after kick This mean that slot reservation need to be finished (closed).
 
void OnPlayerRegistered (int playerId)
 Called on every machine after a player is registered (identity, name etc.).
 
void OnPlayerDisconnected (int playerId, KickCauseCode cause, int timeout)
 Called after a player is disconnected.
 
void OnPlayerSpawned (int playerId, IEntity controlledEntity)
 Called after a player is spawned.
 
bool PreparePlayerEntity_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, SCR_SpawnData data, IEntity entity)
 
void OnSpawnPlayerEntityFailure_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, IEntity entity, SCR_SpawnData data, SCR_ESpawnResult reason)
 
void OnPlayerSpawnFinalize_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, SCR_SpawnData data, IEntity entity)
 
bool HandlePlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator instigator)
 See SCR_BaseGameMode.HandlePlayerKilled.
 
void OnPlayerKilled (notnull SCR_InstigatorContextData instigatorContextData)
 Called after a player gets killed.
 
void OnPlayerKilledHandled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator instigator)
 Called after player gets killed in cases where the kill was handled by the game mode, supressing the default OnPlayerKilled behaviour.
 
void OnPlayerDeleted (int playerId, IEntity player)
 Called after a player gets deleted.
 
void OnPlayerRoleChange (int playerId, EPlayerRole roleFlags)
 Called when player role changes.
 
void OnWorldPostProcess (World world)
 Called once loading of all entities of the world have been finished (still within the loading)
 
void HandleOnLoadoutAssigned (int playerID, SCR_BasePlayerLoadout assignedLoadout)
 What happens when a player is assigned a loadout.
 
void HandleOnFactionAssigned (int playerID, Faction assignedFaction)
 What happens when a player is assigned a faction.
 
void HandleOnSpawnPointAssigned (int playerID, SCR_SpawnPoint spawnPoint)
 What happens when a player is assigned a spawn point.
 
void OnControllableSpawned (IEntity entity)
 When a controllable entity is spawned, this event is raised.
 
void OnControllableDestroyed (notnull SCR_InstigatorContextData instigatorContextData)
 When a controllable entity is destroyed, this event is raised.
 
void OnControllableDeleted (IEntity entity)
 Prior to a controllable entity being DELETED, this event is raised.
 
void SCR_BaseGameModeComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
 

Protected Attributes

SCR_BaseGameMode m_pGameMode
 The game mode entity this component is attached to.
 

Detailed Description

Interface for game mode extending components.

Must be attached to a GameMode entity.

Constructor & Destructor Documentation

◆ SCR_BaseGameModeComponent()

void SCR_BaseGameModeComponent.SCR_BaseGameModeComponent ( IEntityComponentSource  src,
IEntity  ent,
IEntity  parent 
)
Parameters
[in]src
[in]ent
[in]parent

Member Function Documentation

◆ GetGameMode()

SCR_BaseGameMode SCR_BaseGameModeComponent.GetGameMode ( )
Returns
Returns game mode this component is attached to.

◆ HandleOnFactionAssigned()

void SCR_BaseGameModeComponent.HandleOnFactionAssigned ( int  playerID,
Faction  assignedFaction 
)

What happens when a player is assigned a faction.

Implemented in SCR_PlayerProfileManagerComponent.

◆ HandleOnLoadoutAssigned()

void SCR_BaseGameModeComponent.HandleOnLoadoutAssigned ( int  playerID,
SCR_BasePlayerLoadout  assignedLoadout 
)

What happens when a player is assigned a loadout.

◆ HandleOnSpawnPointAssigned()

void SCR_BaseGameModeComponent.HandleOnSpawnPointAssigned ( int  playerID,
SCR_SpawnPoint  spawnPoint 
)

What happens when a player is assigned a spawn point.

◆ HandlePlayerKilled()

bool SCR_BaseGameModeComponent.HandlePlayerKilled ( int  playerId,
IEntity  playerEntity,
IEntity  killerEntity,
notnull Instigator  instigator 
)

◆ OnControllableDeleted()

void SCR_BaseGameModeComponent.OnControllableDeleted ( IEntity  entity)

Prior to a controllable entity being DELETED, this event is raised.

Controllable entity is such that has BaseControllerComponent and can be possessed either by a player, an AI or stay unpossessed.

Parameters
[in]entityEntity about to be deleted

Implemented in SCR_PossessingManagerComponent.

◆ OnControllableDestroyed()

void SCR_BaseGameModeComponent.OnControllableDestroyed ( notnull SCR_InstigatorContextData  instigatorContextData)

When a controllable entity is destroyed, this event is raised.

Parameters
[in]instigatorContextDataHolds the data of the victim and killer

Implemented in SCR_XPHandlerComponent, SCR_DataCollectorComponent, SCR_PossessingManagerComponent, SCR_NotificationSenderComponent, and SCR_TutorialGamemodeComponent.

◆ OnControllableSpawned()

void SCR_BaseGameModeComponent.OnControllableSpawned ( IEntity  entity)

When a controllable entity is spawned, this event is raised.

Parameters
[in]entitySpawned entity that raised this event

◆ OnGameEnd()

void SCR_BaseGameModeComponent.OnGameEnd ( )

Called on all machines when the world ends.

Implemented in SCR_DataCollectorComponent, and SCR_RestoreEditorModesComponent.

◆ OnGameModeEnd()

void SCR_BaseGameModeComponent.OnGameModeEnd ( SCR_GameModeEndData  data)

Called when game mode ends.

Parameters
[in]dataEnd game data with game logic.

Implemented in SCR_DataCollectorComponent, SCR_SaveLoadComponent, SCR_ScoringSystemComponent, and SCR_GameOverScreenManagerComponent.

◆ OnGameModeStart()

void SCR_BaseGameModeComponent.OnGameModeStart ( )

Called on every machine when game mode starts.

This can be immediate (if no pre-game period is set) or can happen after a certain delay, as deemed appropriate by the authority.

Implemented in SCR_DataCollectorComponent, and SCR_TutorialGamemodeComponent.

◆ OnGameStateChanged()

void SCR_BaseGameModeComponent.OnGameStateChanged ( SCR_EGameModeState  state)

Called when game mode state changes called on all machines.

Parameters
[in]stateNew state game mode transitioned into.

Implemented in SCR_BaseGameModeStateComponent.

◆ OnPlayerAuditFail()

void SCR_BaseGameModeComponent.OnPlayerAuditFail ( int  playerId)

Event is called when player connecting Session hosting current Game Mode AuditFail() call may be called under two occasions: 1) verification is required but failed (account is not valid, player is banned, internet issues) 2) player cannot be verified as authentication is not required or possible - where it may be valid behavior (server online connectivity turned off for example) Basically non-audited player cannot access persistency/ etc.

related functionality provided by online services.

Parameters
[in]playerIdis index of player in game, equal to the one assigned at PlayerController

◆ OnPlayerAuditRevived()

void SCR_BaseGameModeComponent.OnPlayerAuditRevived ( int  playerId)

Event is called when player reconnected successfully back to Session after kick This mean that slot reservation need to be finished (closed).

Parameters
[in]playerIdis index of player in game, equal to the one assigned at PlayerController

◆ OnPlayerAuditSuccess()

void SCR_BaseGameModeComponent.OnPlayerAuditSuccess ( int  playerId)

Event is called when player connecting Session hosting current Game Mode where is required authentication verification via.

platform services AuditSuccess() call specifically mean this verification was successful Basically audited player has access to persistency/ etc. related functionality provided by online services.

Parameters
[in]playerIdis index of player in game, equal to the one assigned at PlayerController

Implemented in SCR_DataCollectorComponent, SCR_PlayerListedAdminManagerComponent, and SCR_ArsenalManagerComponent.

◆ OnPlayerAuditTimeouted()

void SCR_BaseGameModeComponent.OnPlayerAuditTimeouted ( int  playerId)

Event is called when player connected to Session was kicked and did not reconnected in time This mean that slot reservation can be canceled.

Parameters
[in]playerIdis index of player in game, equal to the one assigned at PlayerController

Implemented in SCR_ReconnectComponent.

◆ OnPlayerConnected()

void SCR_BaseGameModeComponent.OnPlayerConnected ( int  playerId)

Called after a player is connected.

Server-only.

Parameters
[in]playerIdPlayerId of connected player.

Implemented in SCR_VotingManagerComponent, SCR_DataCollectorComponent, SCR_PlayerSpawnPointManagerComponent, and SCR_WaveRespawnTimerComponent.

◆ OnPlayerDeleted()

void SCR_BaseGameModeComponent.OnPlayerDeleted ( int  playerId,
IEntity  player 
)

Called after a player gets deleted.

Parameters
[in]playerIdPlayer ID
[in]playerPlayer entity

Implemented in SCR_RespawnTimerComponent, and SCR_WaveRespawnTimerComponent.

◆ OnPlayerDisconnected()

void SCR_BaseGameModeComponent.OnPlayerDisconnected ( int  playerId,
KickCauseCode  cause,
int  timeout 
)

Called after a player is disconnected.

Parameters
[in]playerIdPlayerId of disconnected player.
[in]causeReason player disconnected
[in]timeoutTimeout for when players are allowed to connect again. -1 means Ban without an assigned timeout

Implemented in SCR_PlayerProfileManagerComponent, SCR_XPHandlerComponent, SCR_VotingManagerComponent, SCR_DataCollectorComponent, SCR_PlayerListedAdminManagerComponent, SCR_PossessingManagerComponent, SCR_PlayerSpawnPointManagerComponent, SCR_BaseScoringSystemComponent, SCR_NotificationSenderComponent, SCR_GroupsManagerComponent, and SCR_MapMarkerManagerComponent.

◆ OnPlayerKilled()

void SCR_BaseGameModeComponent.OnPlayerKilled ( notnull SCR_InstigatorContextData  instigatorContextData)

◆ OnPlayerKilledHandled()

void SCR_BaseGameModeComponent.OnPlayerKilledHandled ( int  playerId,
IEntity  playerEntity,
IEntity  killerEntity,
notnull Instigator  instigator 
)

Called after player gets killed in cases where the kill was handled by the game mode, supressing the default OnPlayerKilled behaviour.

See also SCR_BaseGameMode.HandlePlayerKilled().

Parameters
[in]playerIdPlayerId of victim player.
[in]playerEntityEntity of victim player if any.
[in]killerEntityEntity of killer instigator if any.
[in]instigatorInstigator of the kill

◆ OnPlayerRegistered()

void SCR_BaseGameModeComponent.OnPlayerRegistered ( int  playerId)

Called on every machine after a player is registered (identity, name etc.).

Always called after OnPlayerConnected.

Parameters
[in]playerIdPlayerId of registered player.

Implemented in SCR_VotingManagerComponent, SCR_RespawnTimerComponent, SCR_BaseScoringSystemComponent, SCR_NotificationSenderComponent, SCR_TutorialGamemodeComponent, and SCR_GroupsManagerComponent.

◆ OnPlayerRoleChange()

void SCR_BaseGameModeComponent.OnPlayerRoleChange ( int  playerId,
EPlayerRole  roleFlags 
)

Called when player role changes.

Parameters
[in]playerIdPlayer whose role is being changed.
[in]roleFlagsRoles as a flags

◆ OnPlayerSpawned()

void SCR_BaseGameModeComponent.OnPlayerSpawned ( int  playerId,
IEntity  controlledEntity 
)

Called after a player is spawned.

Parameters
[in]playerIdPlayerId of spawned player.
[in]controlledEntitySpawned entity for this player.

Implemented in SCR_DataCollectorComponent, and SCR_NotificationSenderComponent.

◆ OnPlayerSpawnFinalize_S()

void SCR_BaseGameModeComponent.OnPlayerSpawnFinalize_S ( SCR_SpawnRequestComponent  requestComponent,
SCR_SpawnHandlerComponent  handlerComponent,
SCR_SpawnData  data,
IEntity  entity 
)
Parameters
[in]requestComponent
[in]handlerComponent
[in]data
[in]entity

Implemented in SCR_SpawnProtectionComponent, SCR_XPHandlerComponent, SCR_PlayerSpawnPointManagerComponent, SCR_WaveRespawnTimerComponent, and SCR_TutorialGamemodeComponent.

◆ OnSpawnPlayerEntityFailure_S()

void SCR_BaseGameModeComponent.OnSpawnPlayerEntityFailure_S ( SCR_SpawnRequestComponent  requestComponent,
SCR_SpawnHandlerComponent  handlerComponent,
IEntity  entity,
SCR_SpawnData  data,
SCR_ESpawnResult  reason 
)
Parameters
[in]requestComponent
[in]handlerComponent
[in]entity
[in]data
[in]reason

Implemented in SCR_SpawnProtectionComponent.

◆ OnWorldPostProcess()

void SCR_BaseGameModeComponent.OnWorldPostProcess ( World  world)

Called once loading of all entities of the world have been finished (still within the loading)

Parameters
[in]worldLoaded world

Implemented in SCR_TimeAndWeatherHandlerComponent.

◆ PreparePlayerEntity_S()

bool SCR_BaseGameModeComponent.PreparePlayerEntity_S ( SCR_SpawnRequestComponent  requestComponent,
SCR_SpawnHandlerComponent  handlerComponent,
SCR_SpawnData  data,
IEntity  entity 
)
Parameters
[in]requestComponent
[in]handlerComponent
[in]data
[in]entity
Returns

Implemented in SCR_SpawnProtectionComponent.

Member Data Documentation

◆ m_pGameMode

SCR_BaseGameMode SCR_BaseGameModeComponent.m_pGameMode
protected

The game mode entity this component is attached to.


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