Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_SpawnLogic Interface Reference
Inheritance diagram for SCR_SpawnLogic:
SCR_AutoSpawnLogic SCR_MenuSpawnLogic SCR_TutorialSpawnLogic

Public Member Functions

void OnInit (SCR_RespawnSystemComponent owner)
 
void OnPlayerRegistered_S (int playerId)
 
void OnPlayerAuditSuccess_S (int playerId)
 
void OnPlayerDisconnected_S (int playerId, KickCauseCode cause, int timeout)
 
void OnPlayerSpawnRequest_S (SCR_SpawnRequestComponent requestComponent)
 
void OnPlayerSpawnResponse_S (SCR_SpawnRequestComponent requestComponent, SCR_ESpawnResult response)
 
void OnPlayerSpawned_S (int playerId, IEntity entity)
 
void OnPlayerEntityChanged_S (int playerId, IEntity previousEntity, IEntity newEntity)
 
void OnPlayerKilled_S (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer)
 
void OnPlayerDeleted_S (int playerId, bool isDisconnect)
 
void StoreControlledEntityIds (notnull SCR_PlayerController playerController, UUID playerCharacterId, UUID controlledCharacterId)
 
SCR_RespawnComponent GetPlayerRespawnComponent_S (int playerId)
 
SCR_RespawnComponent GetLocalPlayerRespawnComponent ()
 
SCR_PlayerFactionAffiliationComponent GetPlayerFactionComponent_S (int playerId)
 
SCR_PlayerLoadoutComponent GetPlayerLoadoutComponent_S (int playerId)
 

Protected Member Functions

void SetupPersistenceCollections (SCR_RespawnSystemComponent owner)
 Override with your own collection name if customized.
 
void OnPlayerSpawnFailed_S (int playerId)
 
void OnPlayerEntityLost_S (int playerId)
 Called whenever provided player loses controlled entity, this can occur e.g.
 
void NotifyPlayerReadyForSpawn (int playerId)
 Notify the target player that they are ready for spawn.
 
void ApplyPendingPosession (int playerId)
 
void ExcuteInitialLoadOrSpawn_S (int playerId)
 
void RequestPlayerData_S (int playerId)
 
void OnPlayerDataLoaded_S (EPersistenceStatusCode statusCode, Managed result, bool isLast, Managed context)
 
void OnPlayerCharacterLoaded_S (EPersistenceStatusCode statusCode, Managed result, bool isLast, Managed context)
 
void OnControlledCharacterAvailable (Managed instance, PersistenceDeferredDeserializeTask task, bool expired, Managed context)
 
bool ConsumeControlledEntityIds (notnull SCR_PlayerController playerController, out UUID playerCharacterId, out UUID controlledCharacterId)
 
bool ForgetControlledEntityIds (notnull SCR_PlayerController playerController)
 
void DoInitialSpawn_S (int playerId)
 
void DoSpawn_S (int playerId)
 Implement the actual spawn behaviour.
 
bool ResolveReconnection (int playerId)
 Resolves spawn using the SCR_ReconnectComponent for player of given playerId.
 
bool HandlePlayFromCamera ()
 

Protected Attributes

SCR_ESpawnLogicDisconnectBehaviour m_eDisconnectPlayerControllerBehaviour
 
SCR_ESpawnLogicDisconnectBehaviour m_eDisconnectCharacterBehaviour
 
SCR_RespawnSystemComponent m_RespawnSystem
 
SCR_PersistenceSystem m_Persistence
 
PersistenceCollection m_PlayerCollection
 
PersistenceCollection m_CharacterCollection
 
ref array< ref Tuple3< SCR_PlayerController, UUID, UUID > > m_aStoredControlledEntityIds = {}
 
ref map< int, UUID > m_mPendingPosessions = new map<int, UUID>()
 

Static Protected Attributes

static vector s_vPlayFromCameraPos
 
static vector s_vPlayFromCameraYpr
 

Member Function Documentation

◆ ApplyPendingPosession()

void SCR_SpawnLogic.ApplyPendingPosession ( int playerId)
protected

◆ ConsumeControlledEntityIds()

bool SCR_SpawnLogic.ConsumeControlledEntityIds ( notnull SCR_PlayerController playerController,
out UUID playerCharacterId,
out UUID controlledCharacterId )
protected

◆ DoInitialSpawn_S()

void SCR_SpawnLogic.DoInitialSpawn_S ( int playerId)
protected

◆ DoSpawn_S()

void SCR_SpawnLogic.DoSpawn_S ( int playerId)
protected

Implement the actual spawn behaviour.

Implemented in SCR_AutoSpawnLogic, and SCR_MenuSpawnLogic.

◆ ExcuteInitialLoadOrSpawn_S()

void SCR_SpawnLogic.ExcuteInitialLoadOrSpawn_S ( int playerId)
protected

◆ ForgetControlledEntityIds()

bool SCR_SpawnLogic.ForgetControlledEntityIds ( notnull SCR_PlayerController playerController)
protected

◆ GetLocalPlayerRespawnComponent()

SCR_RespawnComponent SCR_SpawnLogic.GetLocalPlayerRespawnComponent ( )

◆ GetPlayerFactionComponent_S()

SCR_PlayerFactionAffiliationComponent SCR_SpawnLogic.GetPlayerFactionComponent_S ( int playerId)

◆ GetPlayerLoadoutComponent_S()

SCR_PlayerLoadoutComponent SCR_SpawnLogic.GetPlayerLoadoutComponent_S ( int playerId)

◆ GetPlayerRespawnComponent_S()

SCR_RespawnComponent SCR_SpawnLogic.GetPlayerRespawnComponent_S ( int playerId)

◆ HandlePlayFromCamera()

bool SCR_SpawnLogic.HandlePlayFromCamera ( )
protected

◆ NotifyPlayerReadyForSpawn()

void SCR_SpawnLogic.NotifyPlayerReadyForSpawn ( int playerId)
protected

Notify the target player that they are ready for spawn.

Useful for cases of manual spawning, e.g. when user should open respawn menu and similar.

◆ OnControlledCharacterAvailable()

void SCR_SpawnLogic.OnControlledCharacterAvailable ( Managed instance,
PersistenceDeferredDeserializeTask task,
bool expired,
Managed context )
protected

◆ OnInit()

void SCR_SpawnLogic.OnInit ( SCR_RespawnSystemComponent owner)

◆ OnPlayerAuditSuccess_S()

void SCR_SpawnLogic.OnPlayerAuditSuccess_S ( int playerId)

Implemented in SCR_AutoSpawnLogic, and SCR_MenuSpawnLogic.

◆ OnPlayerCharacterLoaded_S()

void SCR_SpawnLogic.OnPlayerCharacterLoaded_S ( EPersistenceStatusCode statusCode,
Managed result,
bool isLast,
Managed context )
protected

◆ OnPlayerDataLoaded_S()

void SCR_SpawnLogic.OnPlayerDataLoaded_S ( EPersistenceStatusCode statusCode,
Managed result,
bool isLast,
Managed context )
protected

◆ OnPlayerDeleted_S()

void SCR_SpawnLogic.OnPlayerDeleted_S ( int playerId,
bool isDisconnect )

◆ OnPlayerDisconnected_S()

void SCR_SpawnLogic.OnPlayerDisconnected_S ( int playerId,
KickCauseCode cause,
int timeout )

◆ OnPlayerEntityChanged_S()

void SCR_SpawnLogic.OnPlayerEntityChanged_S ( int playerId,
IEntity previousEntity,
IEntity newEntity )

◆ OnPlayerEntityLost_S()

void SCR_SpawnLogic.OnPlayerEntityLost_S ( int playerId)
protected

Called whenever provided player loses controlled entity, this can occur e.g.

when a player dies or their entity is deleted.

Implemented in SCR_AutoSpawnLogic, and SCR_MenuSpawnLogic.

◆ OnPlayerKilled_S()

void SCR_SpawnLogic.OnPlayerKilled_S ( int playerId,
IEntity playerEntity,
IEntity killerEntity,
notnull Instigator killer )

◆ OnPlayerRegistered_S()

void SCR_SpawnLogic.OnPlayerRegistered_S ( int playerId)

◆ OnPlayerSpawned_S()

void SCR_SpawnLogic.OnPlayerSpawned_S ( int playerId,
IEntity entity )

Implemented in SCR_TutorialSpawnLogic.

◆ OnPlayerSpawnFailed_S()

void SCR_SpawnLogic.OnPlayerSpawnFailed_S ( int playerId)
protected

Implemented in SCR_AutoSpawnLogic.

◆ OnPlayerSpawnRequest_S()

void SCR_SpawnLogic.OnPlayerSpawnRequest_S ( SCR_SpawnRequestComponent requestComponent)

◆ OnPlayerSpawnResponse_S()

void SCR_SpawnLogic.OnPlayerSpawnResponse_S ( SCR_SpawnRequestComponent requestComponent,
SCR_ESpawnResult response )

◆ RequestPlayerData_S()

void SCR_SpawnLogic.RequestPlayerData_S ( int playerId)
protected

◆ ResolveReconnection()

bool SCR_SpawnLogic.ResolveReconnection ( int playerId)
protected

Resolves spawn using the SCR_ReconnectComponent for player of given playerId.

If such player is eligible for spawning this way, action is taken and true is returned on success (entity given over), false otherwise.

Parameters
playerIdPlayer
Returns
True if existing entity was re-assigned to him

◆ SetupPersistenceCollections()

void SCR_SpawnLogic.SetupPersistenceCollections ( SCR_RespawnSystemComponent owner)
protected

Override with your own collection name if customized.

◆ StoreControlledEntityIds()

void SCR_SpawnLogic.StoreControlledEntityIds ( notnull SCR_PlayerController playerController,
UUID playerCharacterId,
UUID controlledCharacterId )

Member Data Documentation

◆ m_aStoredControlledEntityIds

ref array<ref Tuple3<SCR_PlayerController, UUID, UUID> > SCR_SpawnLogic.m_aStoredControlledEntityIds = {}
protected

◆ m_CharacterCollection

PersistenceCollection SCR_SpawnLogic.m_CharacterCollection
protected

◆ m_eDisconnectCharacterBehaviour

SCR_ESpawnLogicDisconnectBehaviour SCR_SpawnLogic.m_eDisconnectCharacterBehaviour
protected

◆ m_eDisconnectPlayerControllerBehaviour

SCR_ESpawnLogicDisconnectBehaviour SCR_SpawnLogic.m_eDisconnectPlayerControllerBehaviour
protected

◆ m_mPendingPosessions

ref map<int, UUID> SCR_SpawnLogic.m_mPendingPosessions = new map<int, UUID>()
protected

◆ m_Persistence

SCR_PersistenceSystem SCR_SpawnLogic.m_Persistence
protected

◆ m_PlayerCollection

PersistenceCollection SCR_SpawnLogic.m_PlayerCollection
protected

◆ m_RespawnSystem

SCR_RespawnSystemComponent SCR_SpawnLogic.m_RespawnSystem
protected

◆ s_vPlayFromCameraPos

vector SCR_SpawnLogic.s_vPlayFromCameraPos
staticprotected

◆ s_vPlayFromCameraYpr

vector SCR_SpawnLogic.s_vPlayFromCameraYpr
staticprotected

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