Arma Reforger Script API
|
Interface for game mode extending components. More...
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. | |
Interface for game mode extending components.
Must be attached to a GameMode entity.
void SCR_BaseGameModeComponent.SCR_BaseGameModeComponent | ( | IEntityComponentSource | src, |
IEntity | ent, | ||
IEntity | parent | ||
) |
[in] | src | |
[in] | ent | |
[in] | parent |
SCR_BaseGameMode SCR_BaseGameModeComponent.GetGameMode | ( | ) |
void SCR_BaseGameModeComponent.HandleOnFactionAssigned | ( | int | playerID, |
Faction | assignedFaction | ||
) |
What happens when a player is assigned a faction.
Implemented in SCR_PlayerProfileManagerComponent.
void SCR_BaseGameModeComponent.HandleOnLoadoutAssigned | ( | int | playerID, |
SCR_BasePlayerLoadout | assignedLoadout | ||
) |
What happens when a player is assigned a loadout.
void SCR_BaseGameModeComponent.HandleOnSpawnPointAssigned | ( | int | playerID, |
SCR_SpawnPoint | spawnPoint | ||
) |
What happens when a player is assigned a spawn point.
bool SCR_BaseGameModeComponent.HandlePlayerKilled | ( | int | playerId, |
IEntity | playerEntity, | ||
IEntity | killerEntity, | ||
notnull Instigator | instigator | ||
) |
See SCR_BaseGameMode.HandlePlayerKilled.
Implemented in SCR_PossessingManagerComponent.
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.
[in] | entity | Entity about to be deleted |
Implemented in SCR_PossessingManagerComponent.
void SCR_BaseGameModeComponent.OnControllableDestroyed | ( | notnull SCR_InstigatorContextData | instigatorContextData | ) |
When a controllable entity is destroyed, this event is raised.
[in] | instigatorContextData | Holds the data of the victim and killer |
Implemented in SCR_XPHandlerComponent, SCR_DataCollectorComponent, SCR_PossessingManagerComponent, SCR_NotificationSenderComponent, and SCR_TutorialGamemodeComponent.
void SCR_BaseGameModeComponent.OnControllableSpawned | ( | IEntity | entity | ) |
When a controllable entity is spawned, this event is raised.
[in] | entity | Spawned entity that raised this event |
void SCR_BaseGameModeComponent.OnGameEnd | ( | ) |
Called on all machines when the world ends.
Implemented in SCR_DataCollectorComponent, and SCR_RestoreEditorModesComponent.
void SCR_BaseGameModeComponent.OnGameModeEnd | ( | SCR_GameModeEndData | data | ) |
Called when game mode ends.
[in] | data | End game data with game logic. |
Implemented in SCR_DataCollectorComponent, SCR_SaveLoadComponent, SCR_ScoringSystemComponent, and SCR_GameOverScreenManagerComponent.
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.
void SCR_BaseGameModeComponent.OnGameStateChanged | ( | SCR_EGameModeState | state | ) |
Called when game mode state changes called on all machines.
[in] | state | New state game mode transitioned into. |
Implemented in SCR_BaseGameModeStateComponent.
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.
[in] | playerId | is index of player in game, equal to the one assigned at PlayerController |
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).
[in] | playerId | is index of player in game, equal to the one assigned at PlayerController |
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.
[in] | playerId | is index of player in game, equal to the one assigned at PlayerController |
Implemented in SCR_DataCollectorComponent, SCR_PlayerListedAdminManagerComponent, and SCR_ArsenalManagerComponent.
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.
[in] | playerId | is index of player in game, equal to the one assigned at PlayerController |
Implemented in SCR_ReconnectComponent.
void SCR_BaseGameModeComponent.OnPlayerConnected | ( | int | playerId | ) |
Called after a player is connected.
Server-only.
[in] | playerId | PlayerId of connected player. |
Implemented in SCR_VotingManagerComponent, SCR_DataCollectorComponent, SCR_PlayerSpawnPointManagerComponent, and SCR_WaveRespawnTimerComponent.
void SCR_BaseGameModeComponent.OnPlayerDeleted | ( | int | playerId, |
IEntity | player | ||
) |
Called after a player gets deleted.
[in] | playerId | Player ID |
[in] | player | Player entity |
Implemented in SCR_RespawnTimerComponent, and SCR_WaveRespawnTimerComponent.
void SCR_BaseGameModeComponent.OnPlayerDisconnected | ( | int | playerId, |
KickCauseCode | cause, | ||
int | timeout | ||
) |
Called after a player is disconnected.
[in] | playerId | PlayerId of disconnected player. |
[in] | cause | Reason player disconnected |
[in] | timeout | Timeout 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.
void SCR_BaseGameModeComponent.OnPlayerKilled | ( | notnull SCR_InstigatorContextData | instigatorContextData | ) |
Called after a player gets killed.
[in] | instigatorContextData | Holds the data of the victim and killer |
Implemented in SCR_PlayerProfileManagerComponent, SCR_XPHandlerComponent, SCR_DataCollectorComponent, SCR_CaptureAndHoldManager, SCR_PlayerSpawnPointManagerComponent, SCR_RespawnTimerComponent, SCR_WaveRespawnTimerComponent, and SCR_ScoringSystemComponent.
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().
[in] | playerId | PlayerId of victim player. |
[in] | playerEntity | Entity of victim player if any. |
[in] | killerEntity | Entity of killer instigator if any. |
[in] | instigator | Instigator of the kill |
void SCR_BaseGameModeComponent.OnPlayerRegistered | ( | int | playerId | ) |
Called on every machine after a player is registered (identity, name etc.).
Always called after OnPlayerConnected.
[in] | playerId | PlayerId of registered player. |
Implemented in SCR_VotingManagerComponent, SCR_RespawnTimerComponent, SCR_BaseScoringSystemComponent, SCR_NotificationSenderComponent, SCR_TutorialGamemodeComponent, and SCR_GroupsManagerComponent.
void SCR_BaseGameModeComponent.OnPlayerRoleChange | ( | int | playerId, |
EPlayerRole | roleFlags | ||
) |
Called when player role changes.
[in] | playerId | Player whose role is being changed. |
[in] | roleFlags | Roles as a flags |
void SCR_BaseGameModeComponent.OnPlayerSpawned | ( | int | playerId, |
IEntity | controlledEntity | ||
) |
Called after a player is spawned.
[in] | playerId | PlayerId of spawned player. |
[in] | controlledEntity | Spawned entity for this player. |
Implemented in SCR_DataCollectorComponent, and SCR_NotificationSenderComponent.
void SCR_BaseGameModeComponent.OnPlayerSpawnFinalize_S | ( | SCR_SpawnRequestComponent | requestComponent, |
SCR_SpawnHandlerComponent | handlerComponent, | ||
SCR_SpawnData | data, | ||
IEntity | entity | ||
) |
[in] | requestComponent | |
[in] | handlerComponent | |
[in] | data | |
[in] | entity |
Implemented in SCR_SpawnProtectionComponent, SCR_XPHandlerComponent, SCR_PlayerSpawnPointManagerComponent, SCR_WaveRespawnTimerComponent, and SCR_TutorialGamemodeComponent.
void SCR_BaseGameModeComponent.OnSpawnPlayerEntityFailure_S | ( | SCR_SpawnRequestComponent | requestComponent, |
SCR_SpawnHandlerComponent | handlerComponent, | ||
IEntity | entity, | ||
SCR_SpawnData | data, | ||
SCR_ESpawnResult | reason | ||
) |
[in] | requestComponent | |
[in] | handlerComponent | |
[in] | entity | |
[in] | data | |
[in] | reason |
Implemented in SCR_SpawnProtectionComponent.
void SCR_BaseGameModeComponent.OnWorldPostProcess | ( | World | world | ) |
Called once loading of all entities of the world have been finished (still within the loading)
[in] | world | Loaded world |
Implemented in SCR_TimeAndWeatherHandlerComponent.
bool SCR_BaseGameModeComponent.PreparePlayerEntity_S | ( | SCR_SpawnRequestComponent | requestComponent, |
SCR_SpawnHandlerComponent | handlerComponent, | ||
SCR_SpawnData | data, | ||
IEntity | entity | ||
) |
[in] | requestComponent | |
[in] | handlerComponent | |
[in] | data | |
[in] | entity |
Implemented in SCR_SpawnProtectionComponent.
|
protected |
The game mode entity this component is attached to.