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

Dummy communicator for RespawnSystem. More...

Inheritance diagram for SCR_RespawnComponent:
[legend]

Public Member Functions

OnRespawnReadyInvoker GetOnRespawnReadyInvoker_O ()
 
OnCanRespawnRequestInvoker GetOnCanRespawnRequestInvoker_O ()
 
OnCanRespawnRequestInvoker GetOnCanRespawnRequestInvoker_S ()
 
OnCanRespawnResponseInvoker GetOnCanRespawnResponseInvoker_O ()
 
OnCanRespawnResponseInvoker GetOnCanRespawnResponseInvoker_S ()
 
OnRespawnRequestInvoker GetOnRespawnRequestInvoker_O ()
 
OnRespawnRequestInvoker GetOnRespawnRequestInvoker_S ()
 
OnRespawnResponseInvoker GetOnRespawnResponseInvoker_O ()
 
OnRespawnResponseInvoker GetOnRespawnResponseInvoker_S ()
 
OnRespawnRequestInvoker GetOnRespawnFinalizeBeginInvoker_O ()
 When the spawn process reaches it end, the authority notifies the client about the last state starting ("finalization").
 
RplComponent GetRplComponent ()
 
bool RequestClearPlayerFaction ()
 
bool RequestClearPlayerLoadout ()
 
void RequestClearPlayerSpawnPoint ()
 
bool RequestPlayerLoadout (SCR_BasePlayerLoadout loadout)
 
bool RequestPlayerFaction (Faction faction)
 
bool RequestPlayerSpawnPoint (SCR_SpawnPoint spawnPoint)
 
void RequestPlayerSuicide ()
 
void NotifyReadyForSpawn_S ()
 Authority: Send notification to this player that they are ready to spawn.
 
void RequestQuickRespawn ()
 
void RequestRespawn ()
 
override void OnPostInit (IEntity owner)
 Called after all components are initialized.
 
override void OnDelete (IEntity owner)
 Called during EOnInit.
 
bool RequestSpawn (SCR_SpawnData data)
 Request a spawn with the provided data.
 
bool CanSpawn (SCR_SpawnData data)
 Request an authority confirmation whether spawn with the provided data is possible.
 
void SCR_RespawnComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
 
- Public Member Functions inherited from RespawnComponent
proto external void NotifySpawn (IEntity spawnedEntity)
 Notify the underlying system that this respawn component has spawned/is taking over the provided entity.
 
proto external PlayerController GetPlayerController ()
 Returns the player controller this respawn component is attached to.
 
- Public Member Functions inherited from GameComponent
bool OnTicksOnRemoteProxy ()
 

Static Public Member Functions

static ScriptInvokerVoid SGetOnLocalPlayerSpawned ()
 Called when player spawns locally.
 
static SCR_RespawnComponent GetInstance ()
 
static SCR_RespawnComponent SGetLocalRespawnComponent ()
 Find SCR_RespawnComponent affiliated with the local player.
 
static SCR_RespawnComponent SGetPlayerRespawnComponent (int playerId)
 Authority only: Find SCR_RespawnComponent affiliated with the provided player by their Id.
 

Protected Member Functions

void RequestPlayerLoadoutIndex (int loadoutIndex)
 
void RequestPlayerFactionIndex (int factionIndex)
 
void RequestPlayerSpawnPointIdentity (RplId spawnPointIdentity)
 
void Rpc_NotifyReadyForSpawn_O ()
 
void RegisterRespawnRequestComponents (IEntity owner)
 Register all SCR_SpawnRequestComponent found in the hierarchy.
 
SCR_SpawnRequestComponent GetRequestComponent (SCR_SpawnData data)
 Find a request component based on provided data instance type.
 
- Protected Member Functions inherited from RespawnComponent
void OnInit (IEntity owner)
 Called during EOnInit.
 
void OnDelete (IEntity owner)
 Called during EOnInit.
 
void OnPostInit (IEntity owner)
 Called after all components are initialized.
 
void OnDiag (IEntity owner, float timeSlice)
 Called during EOnDiag.
 
void OnFrame (IEntity owner, float timeSlice)
 Called during EOnFrame.
 

Protected Attributes

PlayerController m_PlayerController
 Parent entity (owner) - has to be a player controller for RPCs.
 
RplComponent m_RplComponent
 Parent entity's rpl component.
 
ref map< TypeName, SCR_SpawnRequestComponentm_mRequestComponents = new map<TypeName, SCR_SpawnRequestComponent>()
 List of all request components - children of this component, stored by their assigned type.
 
ref OnRespawnReadyInvoker m_OnRespawnReadyInvoker_O = new OnRespawnReadyInvoker()
 
ref OnCanRespawnRequestInvoker m_OnCanRespawnRequestInvoker_O = new OnCanRespawnRequestInvoker()
 
ref OnCanRespawnRequestInvoker m_OnCanRespawnRequestInvoker_S = new OnCanRespawnRequestInvoker()
 
ref OnCanRespawnResponseInvoker m_OnCanRespawnResponseInvoker_O = new OnCanRespawnResponseInvoker()
 
ref OnCanRespawnResponseInvoker m_OnCanRespawnResponseInvoker_S = new OnCanRespawnResponseInvoker()
 
ref OnRespawnRequestInvoker m_OnRespawnRequestInvoker_O = new OnRespawnRequestInvoker()
 
ref OnRespawnRequestInvoker m_OnRespawnRequestInvoker_S = new OnRespawnRequestInvoker()
 
ref OnRespawnResponseInvoker m_OnRespawnResponseInvoker_O = new OnRespawnResponseInvoker()
 
ref OnRespawnResponseInvoker m_OnRespawnResponseInvoker_S = new OnRespawnResponseInvoker()
 
ref OnRespawnRequestInvoker m_OnRespawnFinalizeBeginInvoker_O = new OnRespawnRequestInvoker()
 

Detailed Description

Dummy communicator for RespawnSystem.

Must be attached to PlayerController entity.

Constructor & Destructor Documentation

◆ SCR_RespawnComponent()

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

Member Function Documentation

◆ CanSpawn()

bool SCR_RespawnComponent.CanSpawn ( SCR_SpawnData  data)

Request an authority confirmation whether spawn with the provided data is possible.

The request is partially validated on client before transmission to the authority occurs. It is then further evaluated and processed by a SCR_RespawnHandlerComponent corresponding to each SCR_SpawnRequestComponent.

Notable callbacks:

  • GetOnCanRespawnRequestInvoker_O -> Raised on owner request ('sender' has asked)
  • GetOnCanRespawnResponseInvoker_O -> Raised on owner response (authority has responded or in certain cases early reject is done by self)
  • GetOnCanRespawnRequestInvoker_S -> Authority received request from this component
  • GetOnCanRespawnResponseInvoker_S -> Authority dispatched response to this component
    Parameters
    [in]data
    Returns
    Returns true if the request was dispatched into the system, false if there was an error on the requesting side. Such case can occur e.g. when there is a missing respawn handler for provided data type or similar.

◆ GetInstance()

static SCR_RespawnComponent SCR_RespawnComponent.GetInstance ( )
static
Returns

◆ GetOnCanRespawnRequestInvoker_O()

OnCanRespawnRequestInvoker SCR_RespawnComponent.GetOnCanRespawnRequestInvoker_O ( )
Returns
an invoker that is invoked after this component sends a can-request.

◆ GetOnCanRespawnRequestInvoker_S()

OnCanRespawnRequestInvoker SCR_RespawnComponent.GetOnCanRespawnRequestInvoker_S ( )
Returns
an invoker that is invoked after this component sends a can-request.

◆ GetOnCanRespawnResponseInvoker_O()

OnCanRespawnResponseInvoker SCR_RespawnComponent.GetOnCanRespawnResponseInvoker_O ( )
Returns
an invoker that is invoked after this component receives a response from the authority about prior sent ask can-request.

◆ GetOnCanRespawnResponseInvoker_S()

OnCanRespawnResponseInvoker SCR_RespawnComponent.GetOnCanRespawnResponseInvoker_S ( )
Returns
an invoker that is invoked after this component receives a response from teh authority about prior sent ask can-request.

◆ GetOnRespawnFinalizeBeginInvoker_O()

OnRespawnRequestInvoker SCR_RespawnComponent.GetOnRespawnFinalizeBeginInvoker_O ( )

When the spawn process reaches it end, the authority notifies the client about the last state starting ("finalization").

This is the last state after which the player gains control of the desired controllable, or receives a response (see GetOnRespawnResponseInvoker_O) about a possible (rare?) failure.

◆ GetOnRespawnReadyInvoker_O()

OnRespawnReadyInvoker SCR_RespawnComponent.GetOnRespawnReadyInvoker_O ( )
Returns
an invoker that is invoked after this player is "ready" to spawn. (E.g. open deployment menu)

◆ GetOnRespawnRequestInvoker_O()

OnRespawnRequestInvoker SCR_RespawnComponent.GetOnRespawnRequestInvoker_O ( )
Returns
an invoker that is invoked after this component sends a respawn request.

◆ GetOnRespawnRequestInvoker_S()

OnRespawnRequestInvoker SCR_RespawnComponent.GetOnRespawnRequestInvoker_S ( )
Returns
an invoker that is invoked after this component sends a respawn request.

◆ GetOnRespawnResponseInvoker_O()

OnRespawnResponseInvoker SCR_RespawnComponent.GetOnRespawnResponseInvoker_O ( )
Returns
an invoker that is invoked after this component receives a respawn request response from the authority.

◆ GetOnRespawnResponseInvoker_S()

OnRespawnResponseInvoker SCR_RespawnComponent.GetOnRespawnResponseInvoker_S ( )
Returns
an invoker that is invoked after this component receives a respawn request response from the authority.

◆ GetRequestComponent()

SCR_SpawnRequestComponent SCR_RespawnComponent.GetRequestComponent ( SCR_SpawnData  data)
protected

Find a request component based on provided data instance type.

Parameters
[in]data
Returns

◆ GetRplComponent()

RplComponent SCR_RespawnComponent.GetRplComponent ( )
Returns

◆ NotifyReadyForSpawn_S()

void SCR_RespawnComponent.NotifyReadyForSpawn_S ( )

Authority: Send notification to this player that they are ready to spawn.

◆ OnDelete()

override void SCR_RespawnComponent.OnDelete ( IEntity  owner)

Called during EOnInit.

Parameters
ownerEntity this component is attached to.

Implements RespawnComponent.

◆ OnPostInit()

override void SCR_RespawnComponent.OnPostInit ( IEntity  owner)

Called after all components are initialized.

Parameters
ownerEntity this component is attached to.

Implements RespawnComponent.

◆ RegisterRespawnRequestComponents()

void SCR_RespawnComponent.RegisterRespawnRequestComponents ( IEntity  owner)
protected

Register all SCR_SpawnRequestComponent found in the hierarchy.

Parameters
[in]owner

◆ RequestClearPlayerFaction()

bool SCR_RespawnComponent.RequestClearPlayerFaction ( )

◆ RequestClearPlayerLoadout()

bool SCR_RespawnComponent.RequestClearPlayerLoadout ( )

◆ RequestClearPlayerSpawnPoint()

void SCR_RespawnComponent.RequestClearPlayerSpawnPoint ( )

◆ RequestPlayerFaction()

bool SCR_RespawnComponent.RequestPlayerFaction ( Faction  faction)

◆ RequestPlayerFactionIndex()

void SCR_RespawnComponent.RequestPlayerFactionIndex ( int  factionIndex)
protected

◆ RequestPlayerLoadout()

bool SCR_RespawnComponent.RequestPlayerLoadout ( SCR_BasePlayerLoadout  loadout)

◆ RequestPlayerLoadoutIndex()

void SCR_RespawnComponent.RequestPlayerLoadoutIndex ( int  loadoutIndex)
protected

◆ RequestPlayerSpawnPoint()

bool SCR_RespawnComponent.RequestPlayerSpawnPoint ( SCR_SpawnPoint  spawnPoint)

◆ RequestPlayerSpawnPointIdentity()

void SCR_RespawnComponent.RequestPlayerSpawnPointIdentity ( RplId  spawnPointIdentity)
protected

◆ RequestPlayerSuicide()

void SCR_RespawnComponent.RequestPlayerSuicide ( )

◆ RequestQuickRespawn()

void SCR_RespawnComponent.RequestQuickRespawn ( )

◆ RequestRespawn()

void SCR_RespawnComponent.RequestRespawn ( )

◆ RequestSpawn()

bool SCR_RespawnComponent.RequestSpawn ( SCR_SpawnData  data)

Request a spawn with the provided data.

The request is partially validated on client before transmission to the authority occurs. It is then further evaluated and processed by a SCR_RespawnHandlerComponent corresponding to each SCR_SpawnRequestComponent.

Notable callbacks:

  • GetOnRespawnRequestInvoker_O -> Raised on owner request ('sender' has asked)
  • GetOnRespawnResponseInvoker_O -> Raised on owner response (authority has responded or in certain cases early reject is done by self)
  • GetOnRespawnRequestInvoker_S -> Authority received request from this component
  • GetOnRespawnResponseInvoker_S -> Authority dispatched response to this component
    Parameters
    [in]data
    Returns
    Returns true if the request was dispatched into the system, false if there was an error on the requesting side. Such case can occur e.g. when there is a missing respawn handler for provided data type or similar.

◆ Rpc_NotifyReadyForSpawn_O()

void SCR_RespawnComponent.Rpc_NotifyReadyForSpawn_O ( )
protected

◆ SGetLocalRespawnComponent()

static SCR_RespawnComponent SCR_RespawnComponent.SGetLocalRespawnComponent ( )
static

Find SCR_RespawnComponent affiliated with the local player.

Returns null if no PlayerController exists.

Returns
SCR_RespawnComponent instance for local player or null if none is present.

◆ SGetOnLocalPlayerSpawned()

static ScriptInvokerVoid SCR_RespawnComponent.SGetOnLocalPlayerSpawned ( )
static

Called when player spawns locally.

Returns

◆ SGetPlayerRespawnComponent()

static SCR_RespawnComponent SCR_RespawnComponent.SGetPlayerRespawnComponent ( int  playerId)
static

Authority only: Find SCR_RespawnComponent affiliated with the provided player by their Id.

Parameters
[in]playerIdId of target player corresponding to id in PlayerController/PlayerManager. Returns null if no PlayerController exists.
Returns
SCR_RespawnComponent instance for target player or null if none is present.

Member Data Documentation

◆ m_mRequestComponents

ref map<TypeName, SCR_SpawnRequestComponent> SCR_RespawnComponent.m_mRequestComponents = new map<TypeName, SCR_SpawnRequestComponent>()
protected

List of all request components - children of this component, stored by their assigned type.

See also:SCR_SpawnRequestComponent.GetDataType()

◆ m_OnCanRespawnRequestInvoker_O

ref OnCanRespawnRequestInvoker SCR_RespawnComponent.m_OnCanRespawnRequestInvoker_O = new OnCanRespawnRequestInvoker()
protected

◆ m_OnCanRespawnRequestInvoker_S

ref OnCanRespawnRequestInvoker SCR_RespawnComponent.m_OnCanRespawnRequestInvoker_S = new OnCanRespawnRequestInvoker()
protected

◆ m_OnCanRespawnResponseInvoker_O

ref OnCanRespawnResponseInvoker SCR_RespawnComponent.m_OnCanRespawnResponseInvoker_O = new OnCanRespawnResponseInvoker()
protected

◆ m_OnCanRespawnResponseInvoker_S

ref OnCanRespawnResponseInvoker SCR_RespawnComponent.m_OnCanRespawnResponseInvoker_S = new OnCanRespawnResponseInvoker()
protected

◆ m_OnRespawnFinalizeBeginInvoker_O

ref OnRespawnRequestInvoker SCR_RespawnComponent.m_OnRespawnFinalizeBeginInvoker_O = new OnRespawnRequestInvoker()
protected

◆ m_OnRespawnReadyInvoker_O

ref OnRespawnReadyInvoker SCR_RespawnComponent.m_OnRespawnReadyInvoker_O = new OnRespawnReadyInvoker()
protected

◆ m_OnRespawnRequestInvoker_O

ref OnRespawnRequestInvoker SCR_RespawnComponent.m_OnRespawnRequestInvoker_O = new OnRespawnRequestInvoker()
protected

◆ m_OnRespawnRequestInvoker_S

ref OnRespawnRequestInvoker SCR_RespawnComponent.m_OnRespawnRequestInvoker_S = new OnRespawnRequestInvoker()
protected

◆ m_OnRespawnResponseInvoker_O

ref OnRespawnResponseInvoker SCR_RespawnComponent.m_OnRespawnResponseInvoker_O = new OnRespawnResponseInvoker()
protected

◆ m_OnRespawnResponseInvoker_S

ref OnRespawnResponseInvoker SCR_RespawnComponent.m_OnRespawnResponseInvoker_S = new OnRespawnResponseInvoker()
protected

◆ m_PlayerController

PlayerController SCR_RespawnComponent.m_PlayerController
protected

Parent entity (owner) - has to be a player controller for RPCs.

◆ m_RplComponent

RplComponent SCR_RespawnComponent.m_RplComponent
protected

Parent entity's rpl component.


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