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

This component should be attached to a PlayerController. More...

Inheritance diagram for SCR_PlayerLoadoutComponent:
[legend]

Public Member Functions

PlayerController GetPlayerController ()
 
int GetPlayerId ()
 
SCR_BasePlayerLoadout GetLoadout ()
 
OnPlayerLoadoutRequestInvoker GetOnCanPlayerLoadoutRequestInvoker_O ()
 
OnPlayerLoadoutRequestInvoker GetOnCanPlayerLoadoutRequestInvoker_S ()
 
OnPlayerLoadoutResponseInvoker GetOnCanPlayerLoadoutResponseInvoker_O ()
 
OnPlayerLoadoutResponseInvoker GetOnCanPlayerLoadoutResponseInvoker_S ()
 
OnPlayerLoadoutRequestInvoker GetOnPlayerLoadoutRequestInvoker_O ()
 
OnPlayerLoadoutRequestInvoker GetOnPlayerLoadoutRequestInvoker_S ()
 
OnPlayerLoadoutResponseInvoker GetOnPlayerLoadoutResponseInvoker_O ()
 
OnPlayerLoadoutResponseInvoker GetOnPlayerLoadoutResponseInvoker_S ()
 
SCR_BasePlayerLoadout GetAssignedLoadout ()
 Authority.
 
bool RequestLoadout (SCR_BasePlayerLoadout loadout)
 Sends a request to get assignedf provided loadout.
 
bool CanRequestLoadout (SCR_BasePlayerLoadout loadout)
 Sends a can-ask request to the authority.
 

Protected Member Functions

SCR_SpawnLockComponent GetLock ()
 
SCR_PlayerFactionAffiliationComponent GetPlayerFactionAffiliationComponent ()
 
bool IsOwner ()
 
bool IsProxy ()
 
override void OnPostInit (IEntity owner)
 
override void OnDelete (IEntity owner)
 
void OnFactionChanged (FactionAffiliationComponent owner, Faction old, Faction current)
 
void Rpc_RequestLoadout_S (int loadoutIndex)
 Ask the authority to assign provided loadout.
 
bool AssignLoadout_S (int loadoutIndex)
 
void SendRequestLoadoutResponse_S (int loadoutIndex, bool response)
 Authority: Sends response to the owner whether loadout assignation was successfull or not.
 
void RequestLoadoutResponse_O (int loadoutIndex, bool response)
 Owner: Response from the authority about whether loadout was set successfully or not.
 
void Rpc_CanRequestLoadout_S (int loadoutIndex)
 Ask the authority to whether provided loadout can be assigned.
 
bool CanAssignLoadout_S (int loadoutIndex)
 Authority: Returns whether provided loadout can be assigned for this player.
 
bool IsLoadoutUseableByFaction (SCR_BasePlayerLoadout loadout, Faction faction)
 
void SendCanRequestLoadoutResponse_S (int loadoutIndex, bool response)
 Authority: Sends response to the owner whether loadout assignation can be done or not.
 
void CanRequestLoadoutResponse_O (int loadoutIndex, bool response)
 Owner: Response from the authority about whether loadout was set successfully or not.
 

Protected Attributes

SCR_BasePlayerLoadout m_Loadout
 Assigned loadout index. Relevant to authority only.
 
ref OnPlayerLoadoutRequestInvoker m_OnCanPlayerLoadoutRequestInvoker_O = new OnPlayerLoadoutRequestInvoker()
 
ref OnPlayerLoadoutRequestInvoker m_OnCanPlayerLoadoutRequestInvoker_S = new OnPlayerLoadoutRequestInvoker()
 
ref OnPlayerLoadoutResponseInvoker m_OnCanPlayerLoadoutResponseInvoker_O = new OnPlayerLoadoutResponseInvoker()
 
ref OnPlayerLoadoutResponseInvoker m_OnCanPlayerLoadoutResponseInvoker_S = new OnPlayerLoadoutResponseInvoker()
 
ref OnPlayerLoadoutRequestInvoker m_OnPlayerLoadoutRequestInvoker_O = new OnPlayerLoadoutRequestInvoker()
 
ref OnPlayerLoadoutRequestInvoker m_OnPlayerLoadoutRequestInvoker_S = new OnPlayerLoadoutRequestInvoker()
 
ref OnPlayerLoadoutResponseInvoker m_OnPlayerLoadoutResponseInvoker_O = new OnPlayerLoadoutResponseInvoker()
 
ref OnPlayerLoadoutResponseInvoker m_OnPlayerLoadoutResponseInvoker_S = new OnPlayerLoadoutResponseInvoker()
 

Detailed Description

This component should be attached to a PlayerController.

It manages player-specific loadout and the communication between player and authority regarding so.

Member Function Documentation

◆ AssignLoadout_S()

bool SCR_PlayerLoadoutComponent.AssignLoadout_S ( int  loadoutIndex)
protected

◆ CanAssignLoadout_S()

bool SCR_PlayerLoadoutComponent.CanAssignLoadout_S ( int  loadoutIndex)
protected

Authority: Returns whether provided loadout can be assigned for this player.

Parameters
[in]loadoutIndex

◆ CanRequestLoadout()

bool SCR_PlayerLoadoutComponent.CanRequestLoadout ( SCR_BasePlayerLoadout  loadout)

Sends a can-ask request to the authority.

Parameters
[in]loadout
Returns
True if request was sent, false if request was caught (on owner, still!) because it was invalid. NOTE: This is not the final result of the assignation. That result is can be listened to by hooking onto GetOnCanPlayerLoadoutResponseInvoker(), successful request will have a response of SCR_ESpawnResult.OK.

◆ CanRequestLoadoutResponse_O()

void SCR_PlayerLoadoutComponent.CanRequestLoadoutResponse_O ( int  loadoutIndex,
bool  response 
)
protected

Owner: Response from the authority about whether loadout was set successfully or not.

Parameters
[in]loadoutIndex
[in]response

◆ GetAssignedLoadout()

SCR_BasePlayerLoadout SCR_PlayerLoadoutComponent.GetAssignedLoadout ( )

Authority.

Returns
assigned loadout for this player.

◆ GetLoadout()

SCR_BasePlayerLoadout SCR_PlayerLoadoutComponent.GetLoadout ( )
Returns
player faction affiliation, if any is present.

◆ GetLock()

SCR_SpawnLockComponent SCR_PlayerLoadoutComponent.GetLock ( )
protected
Returns
owner PlayerController lock component (if any).

◆ GetOnCanPlayerLoadoutRequestInvoker_O()

OnPlayerLoadoutRequestInvoker SCR_PlayerLoadoutComponent.GetOnCanPlayerLoadoutRequestInvoker_O ( )
Returns
an invoker that is invoked after this component requests a loadout change from the authority.

◆ GetOnCanPlayerLoadoutRequestInvoker_S()

OnPlayerLoadoutRequestInvoker SCR_PlayerLoadoutComponent.GetOnCanPlayerLoadoutRequestInvoker_S ( )
Returns
an invoker that is invoked after this component requests a loadout change from the authority.

◆ GetOnCanPlayerLoadoutResponseInvoker_O()

OnPlayerLoadoutResponseInvoker SCR_PlayerLoadoutComponent.GetOnCanPlayerLoadoutResponseInvoker_O ( )
Returns
an invoker that is invoked after this component receives a response from the authority regarding loadout change.

◆ GetOnCanPlayerLoadoutResponseInvoker_S()

OnPlayerLoadoutResponseInvoker SCR_PlayerLoadoutComponent.GetOnCanPlayerLoadoutResponseInvoker_S ( )
Returns
an invoker that is invoked after this component receives a response from the authority regarding loadout change.

◆ GetOnPlayerLoadoutRequestInvoker_O()

OnPlayerLoadoutRequestInvoker SCR_PlayerLoadoutComponent.GetOnPlayerLoadoutRequestInvoker_O ( )
Returns
an invoker that is invoked after this component requests a loadout change from the authority.

◆ GetOnPlayerLoadoutRequestInvoker_S()

OnPlayerLoadoutRequestInvoker SCR_PlayerLoadoutComponent.GetOnPlayerLoadoutRequestInvoker_S ( )
Returns
an invoker that is invoked after this component requests a loadout change from the authority.

◆ GetOnPlayerLoadoutResponseInvoker_O()

OnPlayerLoadoutResponseInvoker SCR_PlayerLoadoutComponent.GetOnPlayerLoadoutResponseInvoker_O ( )
Returns
an invoker that is invoked after this component receives a response from the authority regarding loadout change.

◆ GetOnPlayerLoadoutResponseInvoker_S()

OnPlayerLoadoutResponseInvoker SCR_PlayerLoadoutComponent.GetOnPlayerLoadoutResponseInvoker_S ( )
Returns
an invoker that is invoked after this component receives a response from the authority regarding loadout change.

◆ GetPlayerController()

PlayerController SCR_PlayerLoadoutComponent.GetPlayerController ( )
Returns
owner PlayerController this component is attached to.

◆ GetPlayerFactionAffiliationComponent()

SCR_PlayerFactionAffiliationComponent SCR_PlayerLoadoutComponent.GetPlayerFactionAffiliationComponent ( )
protected
Returns
player faction affiliation, if any is present.

◆ GetPlayerId()

int SCR_PlayerLoadoutComponent.GetPlayerId ( )
Returns
owner player PlayerController id.

◆ IsLoadoutUseableByFaction()

bool SCR_PlayerLoadoutComponent.IsLoadoutUseableByFaction ( SCR_BasePlayerLoadout  loadout,
Faction  faction 
)
protected
Parameters
[in]loadout
[in]faction
Returns
whether the provided loadout is useable by the provided faction (if provided).

◆ IsOwner()

bool SCR_PlayerLoadoutComponent.IsOwner ( )
protected

◆ IsProxy()

bool SCR_PlayerLoadoutComponent.IsProxy ( )
protected

◆ OnDelete()

override void SCR_PlayerLoadoutComponent.OnDelete ( IEntity  owner)
protected

◆ OnFactionChanged()

void SCR_PlayerLoadoutComponent.OnFactionChanged ( FactionAffiliationComponent  owner,
Faction  old,
Faction  current 
)
protected

◆ OnPostInit()

override void SCR_PlayerLoadoutComponent.OnPostInit ( IEntity  owner)
protected

◆ RequestLoadout()

bool SCR_PlayerLoadoutComponent.RequestLoadout ( SCR_BasePlayerLoadout  loadout)

Sends a request to get assignedf provided loadout.

Parameters
[in]loadout
Returns
True if request was sent, false if request was caught (on owner, still!) because it was invalid. NOTE: This is not the final result of the assignation. That result is can be listened to by hooking onto GetOnPlayerLoadoutResponseInvoker(), successful request will have a response of SCR_ESpawnResult.OK.

◆ RequestLoadoutResponse_O()

void SCR_PlayerLoadoutComponent.RequestLoadoutResponse_O ( int  loadoutIndex,
bool  response 
)
protected

Owner: Response from the authority about whether loadout was set successfully or not.

Parameters
[in]loadoutIndex
[in]response

◆ Rpc_CanRequestLoadout_S()

void SCR_PlayerLoadoutComponent.Rpc_CanRequestLoadout_S ( int  loadoutIndex)
protected

Ask the authority to whether provided loadout can be assigned.

Parameters
[in]loadoutIndex

◆ Rpc_RequestLoadout_S()

void SCR_PlayerLoadoutComponent.Rpc_RequestLoadout_S ( int  loadoutIndex)
protected

Ask the authority to assign provided loadout.

Parameters
[in]loadoutIndex

◆ SendCanRequestLoadoutResponse_S()

void SCR_PlayerLoadoutComponent.SendCanRequestLoadoutResponse_S ( int  loadoutIndex,
bool  response 
)
protected

Authority: Sends response to the owner whether loadout assignation can be done or not.

Parameters
[in]loadoutIndex
[in]responseCan loadout be assigned?

◆ SendRequestLoadoutResponse_S()

void SCR_PlayerLoadoutComponent.SendRequestLoadoutResponse_S ( int  loadoutIndex,
bool  response 
)
protected

Authority: Sends response to the owner whether loadout assignation was successfull or not.

Parameters
[in]loadoutIndex
[in]responseWas loadout assigned?

Member Data Documentation

◆ m_Loadout

SCR_BasePlayerLoadout SCR_PlayerLoadoutComponent.m_Loadout
protected

Assigned loadout index. Relevant to authority only.

◆ m_OnCanPlayerLoadoutRequestInvoker_O

ref OnPlayerLoadoutRequestInvoker SCR_PlayerLoadoutComponent.m_OnCanPlayerLoadoutRequestInvoker_O = new OnPlayerLoadoutRequestInvoker()
protected

◆ m_OnCanPlayerLoadoutRequestInvoker_S

ref OnPlayerLoadoutRequestInvoker SCR_PlayerLoadoutComponent.m_OnCanPlayerLoadoutRequestInvoker_S = new OnPlayerLoadoutRequestInvoker()
protected

◆ m_OnCanPlayerLoadoutResponseInvoker_O

ref OnPlayerLoadoutResponseInvoker SCR_PlayerLoadoutComponent.m_OnCanPlayerLoadoutResponseInvoker_O = new OnPlayerLoadoutResponseInvoker()
protected

◆ m_OnCanPlayerLoadoutResponseInvoker_S

ref OnPlayerLoadoutResponseInvoker SCR_PlayerLoadoutComponent.m_OnCanPlayerLoadoutResponseInvoker_S = new OnPlayerLoadoutResponseInvoker()
protected

◆ m_OnPlayerLoadoutRequestInvoker_O

ref OnPlayerLoadoutRequestInvoker SCR_PlayerLoadoutComponent.m_OnPlayerLoadoutRequestInvoker_O = new OnPlayerLoadoutRequestInvoker()
protected

◆ m_OnPlayerLoadoutRequestInvoker_S

ref OnPlayerLoadoutRequestInvoker SCR_PlayerLoadoutComponent.m_OnPlayerLoadoutRequestInvoker_S = new OnPlayerLoadoutRequestInvoker()
protected

◆ m_OnPlayerLoadoutResponseInvoker_O

ref OnPlayerLoadoutResponseInvoker SCR_PlayerLoadoutComponent.m_OnPlayerLoadoutResponseInvoker_O = new OnPlayerLoadoutResponseInvoker()
protected

◆ m_OnPlayerLoadoutResponseInvoker_S

ref OnPlayerLoadoutResponseInvoker SCR_PlayerLoadoutComponent.m_OnPlayerLoadoutResponseInvoker_S = new OnPlayerLoadoutResponseInvoker()
protected

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