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

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

Inheritance diagram for SCR_PlayerFactionAffiliationComponent:
[legend]

Public Member Functions

PlayerController GetPlayerController ()
 
int GetPlayerId ()
 
OnPlayerFactionRequestInvoker GetOnCanPlayerFactionRequestInvoker_O ()
 
OnPlayerFactionRequestInvoker GetOnCanPlayerFactionRequestInvoker_S ()
 
OnPlayerFactionResponseInvoker GetOnCanPlayerFactionResponseInvoker_O ()
 
OnPlayerFactionResponseInvoker GetOnCanPlayerFactionResponseInvoker_S ()
 
OnPlayerFactionRequestInvoker GetOnPlayerFactionRequestInvoker_O ()
 
OnPlayerFactionRequestInvoker GetOnPlayerFactionRequestInvoker_S ()
 
OnPlayerFactionResponseInvoker GetOnPlayerFactionResponseInvoker_O ()
 
OnPlayerFactionResponseInvoker GetOnPlayerFactionResponseInvoker_S ()
 
bool RequestFaction (Faction faction)
 Sends a request to get assignedf provided faction.
 
bool CanRequestFaction (Faction faction)
 Sends a can-ask request to the authority.
 
- Public Member Functions inherited from SCR_FactionAffiliationComponent
void ClearAffiliatedFaction ()
 
ScriptInvoker GetOnFactionUpdate ()
 
OnFactionChangedInvoker GetOnFactionChanged ()
 
- Public Member Functions inherited from FactionAffiliationComponent
proto external IEntity GetOwner ()
 Returns the entity owning the component.
 
proto external Faction GetAffiliatedFaction ()
 Returns the affiliated faction or null if none.
 
proto external Faction GetDefaultAffiliatedFaction ()
 Returns the default affiliated faction or null if none.
 
proto external void SetAffiliatedFaction (Faction faction)
 Sets the affiliated faction to the provided one or clears current one if null.
 
proto external void SetAffiliatedFactionByKey (FactionKey factionKey)
 Sets affiliated faction by the faction identifier as registered in FactionManager.
 
proto external FactionKey GetDefaultFactionKey ()
 
proto external FactionKey GetAffiliatedFactionKey ()
 
- Public Member Functions inherited from GameComponent
bool OnTicksOnRemoteProxy ()
 

Protected Member Functions

SCR_SpawnLockComponent GetLock ()
 
bool IsOwner ()
 
bool IsProxy ()
 
override void OnPostInit (IEntity owner)
 Called after all components are initialized.
 
void Rpc_RequestFaction_S (int factionIndex)
 Ask the authority to assign provided faction.
 
bool SetFaction_S (Faction faction)
 Authority: Handles request on the authority:
 
void SendRequestFactionResponse_S (int factionIndex, bool response)
 Authority: Sends response to the owner whether faction assignation was successfull or not.
 
void RequestFactionResponse_O (int factionIndex, bool response)
 Owner: Response from the authority about whether faction was set successfully or not.
 
void Rpc_CanRequestFaction_S (int factionIndex)
 Ask the authority to whether provided faction can be assigned.
 
bool CanRequestFaction_S (Faction faction)
 Authority: Handles ask request on the authority:
 
void SendCanRequestFactionResponse_S (int factionIndex, bool response)
 Authority: Sends response to the owner whether faction assignation can be done or not.
 
void CanRequestFactionResponse_O (int factionIndex, bool response)
 Owner: Response from the authority about whether faction was set successfully or not.
 
- Protected Member Functions inherited from SCR_FactionAffiliationComponent
override void OnFactionChanged (Faction previous, Faction current)
 
- Protected Member Functions inherited from FactionAffiliationComponent
void OnPostInit (IEntity owner)
 Called after all components are initialized.
 
void OnCompartmentEntering (IEntity vehicle, IEntity occupant, BaseCompartmentSlot compartment, bool move)
 
void OnCompartmentEntered (IEntity vehicle, IEntity occupant, BaseCompartmentSlot compartment, bool move)
 
void OnCompartmentLeft (IEntity vehicle, IEntity occupant, BaseCompartmentSlot compartment, bool move)
 
void OnFactionChanged (Faction previous, Faction current)
 

Protected Attributes

ref OnPlayerFactionRequestInvoker m_OnCanPlayerFactionRequestInvoker_O = new OnPlayerFactionRequestInvoker()
 
ref OnPlayerFactionRequestInvoker m_OnCanPlayerFactionRequestInvoker_S = new OnPlayerFactionRequestInvoker()
 
ref OnPlayerFactionResponseInvoker m_OnCanPlayerFactionResponseInvoker_O = new OnPlayerFactionResponseInvoker()
 
ref OnPlayerFactionResponseInvoker m_OnCanPlayerFactionResponseInvoker_S = new OnPlayerFactionResponseInvoker()
 
ref OnPlayerFactionRequestInvoker m_OnPlayerFactionRequestInvoker_O = new OnPlayerFactionRequestInvoker()
 
ref OnPlayerFactionRequestInvoker m_OnPlayerFactionRequestInvoker_S = new OnPlayerFactionRequestInvoker()
 
ref OnPlayerFactionResponseInvoker m_OnPlayerFactionResponseInvoker_O = new OnPlayerFactionResponseInvoker()
 
ref OnPlayerFactionResponseInvoker m_OnPlayerFactionResponseInvoker_S = new OnPlayerFactionResponseInvoker()
 

Additional Inherited Members

- Static Public Member Functions inherited from SCR_FactionAffiliationComponent
static void SetFaction (IEntity owner, Faction faction)
 Set faction.
 

Detailed Description

This component should be attached to a PlayerController.

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

Member Function Documentation

◆ CanRequestFaction()

bool SCR_PlayerFactionAffiliationComponent.CanRequestFaction ( Faction  faction)

Sends a can-ask request to the authority.

NOTE: This is not the final result of the assignation. That result is can be listened to by hooking onto GetOnCanPlayerFactionResponseInvoker(), successful request will have a response of SCR_ESpawnResult.OK.

Parameters
[in]faction
Returns
true if request was sent, false if request was caught (on owner, still!) because it was invalid.

◆ CanRequestFaction_S()

bool SCR_PlayerFactionAffiliationComponent.CanRequestFaction_S ( Faction  faction)
protected

Authority: Handles ask request on the authority:

Parameters
[in]faction
Returns
Returns true if faction can be assigned successfully.

◆ CanRequestFactionResponse_O()

void SCR_PlayerFactionAffiliationComponent.CanRequestFactionResponse_O ( int  factionIndex,
bool  response 
)
protected

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

Parameters
[in]factionIndex
[in]response

◆ GetLock()

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

◆ GetOnCanPlayerFactionRequestInvoker_O()

OnPlayerFactionRequestInvoker SCR_PlayerFactionAffiliationComponent.GetOnCanPlayerFactionRequestInvoker_O ( )
Returns
an invoker that is invoked after this component requests a faction change from the authority.

◆ GetOnCanPlayerFactionRequestInvoker_S()

OnPlayerFactionRequestInvoker SCR_PlayerFactionAffiliationComponent.GetOnCanPlayerFactionRequestInvoker_S ( )
Returns
an invoker that is invoked after this component requests a faction change from the authority.

◆ GetOnCanPlayerFactionResponseInvoker_O()

OnPlayerFactionResponseInvoker SCR_PlayerFactionAffiliationComponent.GetOnCanPlayerFactionResponseInvoker_O ( )
Returns
an invoker that is invoked after this component receives a response from the authority regarding faction change.

◆ GetOnCanPlayerFactionResponseInvoker_S()

OnPlayerFactionResponseInvoker SCR_PlayerFactionAffiliationComponent.GetOnCanPlayerFactionResponseInvoker_S ( )
Returns
an invoker that is invoked after this component receives a response from the authority regarding faction change.

◆ GetOnPlayerFactionRequestInvoker_O()

OnPlayerFactionRequestInvoker SCR_PlayerFactionAffiliationComponent.GetOnPlayerFactionRequestInvoker_O ( )
Returns
an invoker that is invoked after this component requests a faction change from the authority.

◆ GetOnPlayerFactionRequestInvoker_S()

OnPlayerFactionRequestInvoker SCR_PlayerFactionAffiliationComponent.GetOnPlayerFactionRequestInvoker_S ( )
Returns
an invoker that is invoked after this component requests a faction change from the authority.

◆ GetOnPlayerFactionResponseInvoker_O()

OnPlayerFactionResponseInvoker SCR_PlayerFactionAffiliationComponent.GetOnPlayerFactionResponseInvoker_O ( )
Returns
an invoker that is invoked after this component receives a response from the authority regarding faction change.

◆ GetOnPlayerFactionResponseInvoker_S()

OnPlayerFactionResponseInvoker SCR_PlayerFactionAffiliationComponent.GetOnPlayerFactionResponseInvoker_S ( )
Returns
an invoker that is invoked after this component receives a response from the authority regarding faction change.

◆ GetPlayerController()

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

◆ GetPlayerId()

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

◆ IsOwner()

bool SCR_PlayerFactionAffiliationComponent.IsOwner ( )
protected

◆ IsProxy()

bool SCR_PlayerFactionAffiliationComponent.IsProxy ( )
protected

◆ OnPostInit()

override void SCR_PlayerFactionAffiliationComponent.OnPostInit ( IEntity  owner)
protected

Called after all components are initialized.

Parameters
ownerEntity this component is attached to.

Implements FactionAffiliationComponent.

◆ RequestFaction()

bool SCR_PlayerFactionAffiliationComponent.RequestFaction ( Faction  faction)

Sends a request to get assignedf provided faction.

Parameters
[in]faction
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 GetOnPlayerFactionResponseInvoker(), successful request will have a response of SCR_ESpawnResult.OK.

◆ RequestFactionResponse_O()

void SCR_PlayerFactionAffiliationComponent.RequestFactionResponse_O ( int  factionIndex,
bool  response 
)
protected

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

Parameters
[in]factionIndex
[in]response

◆ Rpc_CanRequestFaction_S()

void SCR_PlayerFactionAffiliationComponent.Rpc_CanRequestFaction_S ( int  factionIndex)
protected

Ask the authority to whether provided faction can be assigned.

Parameters
[in]factionIndex

◆ Rpc_RequestFaction_S()

void SCR_PlayerFactionAffiliationComponent.Rpc_RequestFaction_S ( int  factionIndex)
protected

Ask the authority to assign provided faction.

Parameters
[in]factionIndex

◆ SendCanRequestFactionResponse_S()

void SCR_PlayerFactionAffiliationComponent.SendCanRequestFactionResponse_S ( int  factionIndex,
bool  response 
)
protected

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

Parameters
[in]factionIndex
[in]responseCan faction be assigned?

◆ SendRequestFactionResponse_S()

void SCR_PlayerFactionAffiliationComponent.SendRequestFactionResponse_S ( int  factionIndex,
bool  response 
)
protected

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

Parameters
[in]factionIndex
[in]responseWas faction assigned?

◆ SetFaction_S()

bool SCR_PlayerFactionAffiliationComponent.SetFaction_S ( Faction  faction)
protected

Authority: Handles request on the authority:

Parameters
[in]faction
Returns
true if request was processed successfully.

Member Data Documentation

◆ m_OnCanPlayerFactionRequestInvoker_O

ref OnPlayerFactionRequestInvoker SCR_PlayerFactionAffiliationComponent.m_OnCanPlayerFactionRequestInvoker_O = new OnPlayerFactionRequestInvoker()
protected

◆ m_OnCanPlayerFactionRequestInvoker_S

ref OnPlayerFactionRequestInvoker SCR_PlayerFactionAffiliationComponent.m_OnCanPlayerFactionRequestInvoker_S = new OnPlayerFactionRequestInvoker()
protected

◆ m_OnCanPlayerFactionResponseInvoker_O

ref OnPlayerFactionResponseInvoker SCR_PlayerFactionAffiliationComponent.m_OnCanPlayerFactionResponseInvoker_O = new OnPlayerFactionResponseInvoker()
protected

◆ m_OnCanPlayerFactionResponseInvoker_S

ref OnPlayerFactionResponseInvoker SCR_PlayerFactionAffiliationComponent.m_OnCanPlayerFactionResponseInvoker_S = new OnPlayerFactionResponseInvoker()
protected

◆ m_OnPlayerFactionRequestInvoker_O

ref OnPlayerFactionRequestInvoker SCR_PlayerFactionAffiliationComponent.m_OnPlayerFactionRequestInvoker_O = new OnPlayerFactionRequestInvoker()
protected

◆ m_OnPlayerFactionRequestInvoker_S

ref OnPlayerFactionRequestInvoker SCR_PlayerFactionAffiliationComponent.m_OnPlayerFactionRequestInvoker_S = new OnPlayerFactionRequestInvoker()
protected

◆ m_OnPlayerFactionResponseInvoker_O

ref OnPlayerFactionResponseInvoker SCR_PlayerFactionAffiliationComponent.m_OnPlayerFactionResponseInvoker_O = new OnPlayerFactionResponseInvoker()
protected

◆ m_OnPlayerFactionResponseInvoker_S

ref OnPlayerFactionResponseInvoker SCR_PlayerFactionAffiliationComponent.m_OnPlayerFactionResponseInvoker_S = new OnPlayerFactionResponseInvoker()
protected

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