Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_RespawnSystemComponent.c File Reference

Go to the source code of this file.

Data Structures

class  SCR_RespawnSystemComponentClass
 

Functions

SCR_RespawnSystemComponentClass RespawnSystemComponentClass ComponentEditorProps (icon:HYBRID_COMPONENT_ICON)
 

Function Documentation

◆ ComponentEditorProps()

SCR_RespawnSystemComponentClass RespawnSystemComponentClass ComponentEditorProps ( icon:HYBRID_COMPONENT_ICON  )

Scripted implementation that handles spawning and respawning of players. Should be attached to a GameMode entity.

Parent entity's rpl component

Parameters
[in]requestComponent
[in]response
[in]data
Returns
an instance of RespawnSystemComponent
either a valid Faction of local player character or null

Access to replication component

Parameters
[in]loadout
Returns

Try to get player faction from PlayerRespawnInfo If faction index is within valid bounds, return Faction otherwise null

UI management

Close all menus operated by Respawn System

Simple getter for other

Close all menus operated by Respawn System

Set respawn enabled Server only

Parameters
[in]enableSpawningset respawn enabled or not
[in]enableSpawning
Returns
true if respawn is enabled, false otherwise
true if faction change is allowed by the game mode, false otherwise.
script invoker which is called when server enables or disables respawn

Authority only: Whenever a SCR_SpawnHandlerComponent receives a request from SCR_SpawnRequestComponent that needs to verify whether a player can spawn in addition to the SCR_SpawnHandlerComponent logic (per-case logic), this method is called to allow handling logic on a global scale.

Parameters
[in]requestComponentThe player request component (instigator).
[in]handlerComponentThe handler that passes the event to this manager.
[in]dataThe data passed from the request
[out]resultReason why respawn is disabled. Note that if returns true the reason will always be OK
Returns
true If request is allowed, false otherwise.

Authority only: During the spawn process (after validation pass), the SCR_SpawnHandlerComponent can opt to prepare spawned entity. This process first happens on affiliated SCR_SpawnHandlerComponent and if it succeeds, it additionally raises this method, which can prepare entity on a global scale. (E.g. game mode logic) Preparation can still fail (e.g. desire to seat a character, but an error occurs) and by returning false the sender is informed of such failure and can respond accordingly.

Parameters
[in]requestComponentInstigator of the request.
[in]handlerComponentHandler that processed the request.
[in]dataThe payload of the request.
[in]entitySpawned (or generally assigned) entity to be prepared.
Returns
true on success (continue to next step), fail on failure (terminate spawn process).

Authority only: During the spawn process the SCR_SpawnHandlerComponent can opt to handle changes of previous (and next) controlled (or newly spawned) entity for the given player. Such process additionally raises this method, which can handle entity changes on a global scale. (E.g. game mode logic).

Parameters
[in]requestComponentInstigator of the request.
[in]handlerComponentHandler that processed the request.
[in]previousEntityPreviously controlled entity. (May be null)
[in]newEntityEntity to be controlled.
[in]dataThe payload of the request.

Authority only: Whenever a request to spawn is denied by the authority, this callback is raised.

Authority only: Whenever a SCR_SpawnHandlerComponent processes a spawn request and finished the finalization stage (awaits finalization, passes control to client) this method is called. This is the final step in the respawn process and after this point the owner of SCR_SpawnRequestComponent is spawned.

Parameters
[in]requestComponentInstigator of the request.
[in]handlerComponentHandler that processed the request.
[in]dataThe payload of the request.
[in]entitySpawned (or generally assigned) entity.
[in]playerId
[in]playerId
[in]cause
[in]timeout
[in]playerId
[in]playerEntity
[in]killerEntity
[in]killer
[in]playerId
Returns

Definition at line 7 of file SCR_RespawnSystemComponent.c.