Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_CharacterFactionAffiliationComponent Interface Reference
Inheritance diagram for SCR_CharacterFactionAffiliationComponent:
FactionAffiliationComponent GameComponent

Public Member Functions

bool HasPerceivedFaction ()
 
SCR_ECharacterDisguiseType GetCharacterDisguiseType ()
 
Faction GetPerceivedFaction ()
 
int GetCharacterOutfitValues (out notnull map< Faction, int > outfitFactionValues)
 
int GetCharacterOutfitData (out notnull set< SCR_OutfitFactionDataHolder > outfitFactionData)
 paramp[out] Get Set of all outfit data. This data
 
void AddFactionOutfitValue (notnull Faction faction, int value, bool updateFaction=true)
 Change a specific faction outfit value.
 
void AddFactionOutfitValue (SCR_OutfitFactionDataHolder outfitFactionHolder, bool updateFaction=true)
 Called by SCR_ItemOutfitFactionComponent when item was added to a slot.
 
void RemoveFactionOutfitValue (notnull Faction faction, int value, bool updateFaction=true)
 Change a specific faction outfit value.
 
void RemoveFactionOutfitValue (SCR_OutfitFactionDataHolder outfitFactionHolder, bool updateFaction=true)
 Called by SCR_ItemOutfitFactionComponent when item was removed from slot.
 
void OnNoFactionSlottedItemChanged (bool addedToSlot, IEntity item, bool updateFaction=true)
 Called by SCR_CharacterInventoryStorageComponent when a slotted item is added/removed.
 
void RecalculateOutfitFaction ()
 Recalculates the perceived faction. Called when the Pervceived faction type is changed and after init. Replicates the faction change if server.
 
bool IsCharacterWearingFullOutfit ()
 
ScriptInvokerFaction GetOnOnPerceivedFactionChanged ()
 
void InitPlayerOutfitFaction_S ()
 Called by SCR_PerceivedFactionManagerComponent when player is spawned. Is not called for Non-Players.
 
void DisableUpdatingPerceivedFaction_S ()
 Disables perceived faction from updating after the character is destroyed or dead.
 
void ~SCR_CharacterFactionAffiliationComponent ()
 
- 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

void OnPerceivedFactionOutfitTypeChanged (SCR_EPerceivedFactionOutfitType newType)
 
void ChangeFactionOutfitValue (Faction faction, int value, bool updateFaction=true)
 
int CalculatePerceivedFactionIndex ()
 Takes all outfit data and returns the faction index of the perceived faction depending on the Perceived faction type set in the manager.
 
void SetPerceivedFaction_S (int OutfitFaction)
 
void SetPerceivedFactionForAI (bool resetToNull=false)
 
void OnPerceivedFactionChangesAffectsAIChanged (bool affectsAI)
 
void OnPerceivedFactionChanged ()
 
void InitPlayerOutfitFaction ()
 
void DisableUpdatingPerceivedFaction ()
 
- 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

Faction m_PerceivedFaction
 
int m_iOutfitFactionIndex = -1
 
ref map< Faction, int > m_mOutfitFactionValues = new map<Faction, int>()
 
ref set< SCR_OutfitFactionDataHolderm_CurrentOutfitData = new set<SCR_OutfitFactionDataHolder>()
 
ref ScriptInvokerFaction m_OnPerceivedFactionChanged
 
SCR_PerceivedFactionManagerComponent m_PerceivedManager
 
SCR_ECharacterDisguiseType m_eDisguiseType = SCR_ECharacterDisguiseType.DEFAULT_FACTION
 
bool m_bHasPerceivedFaction
 
PerceivableComponent m_PerceivableComponent
 

Constructor & Destructor Documentation

◆ ~SCR_CharacterFactionAffiliationComponent()

void SCR_CharacterFactionAffiliationComponent.~SCR_CharacterFactionAffiliationComponent ( )

Member Function Documentation

◆ AddFactionOutfitValue() [1/2]

void SCR_CharacterFactionAffiliationComponent.AddFactionOutfitValue ( notnull Faction faction,
int value,
bool updateFaction = true )

Change a specific faction outfit value.

Parameters
[in]factionFaction to change value of
[in]valueValue added
[in]updateFactionIf perceived faction should be recalculated and replicated

◆ AddFactionOutfitValue() [2/2]

void SCR_CharacterFactionAffiliationComponent.AddFactionOutfitValue ( SCR_OutfitFactionDataHolder outfitFactionHolder,
bool updateFaction = true )

Called by SCR_ItemOutfitFactionComponent when item was added to a slot.

Parameters
[in]outfitFactionHolderOutfit data holder
[in]updateFactionIf perceived faction should be recalculated and replicated

◆ CalculatePerceivedFactionIndex()

int SCR_CharacterFactionAffiliationComponent.CalculatePerceivedFactionIndex ( )
protected

Takes all outfit data and returns the faction index of the perceived faction depending on the Perceived faction type set in the manager.

Can return -1 if Faction is unknown

◆ ChangeFactionOutfitValue()

void SCR_CharacterFactionAffiliationComponent.ChangeFactionOutfitValue ( Faction faction,
int value,
bool updateFaction = true )
protected

◆ DisableUpdatingPerceivedFaction()

void SCR_CharacterFactionAffiliationComponent.DisableUpdatingPerceivedFaction ( )
protected

◆ DisableUpdatingPerceivedFaction_S()

void SCR_CharacterFactionAffiliationComponent.DisableUpdatingPerceivedFaction_S ( )

Disables perceived faction from updating after the character is destroyed or dead.

◆ GetCharacterDisguiseType()

SCR_ECharacterDisguiseType SCR_CharacterFactionAffiliationComponent.GetCharacterDisguiseType ( )
Returns
What is the relationship between character faction and the perceived faction

◆ GetCharacterOutfitData()

int SCR_CharacterFactionAffiliationComponent.GetCharacterOutfitData ( out notnull set< SCR_OutfitFactionDataHolder > outfitFactionData)

paramp[out] Get Set of all outfit data. This data

◆ GetCharacterOutfitValues()

int SCR_CharacterFactionAffiliationComponent.GetCharacterOutfitValues ( out notnull map< Faction, int > outfitFactionValues)
Parameters
[out]Mapof Faction with the value each faction currently has
Returns
Count of entries in Map

◆ GetOnOnPerceivedFactionChanged()

ScriptInvokerFaction SCR_CharacterFactionAffiliationComponent.GetOnOnPerceivedFactionChanged ( )
Returns
On Perceived Faction changed script invoker. Called when players perceived faction changes

◆ GetPerceivedFaction()

Faction SCR_CharacterFactionAffiliationComponent.GetPerceivedFaction ( )
Returns
Get current perceived faction. If HasPerceivedFaction is false it will return default faction instead

◆ HasPerceivedFaction()

bool SCR_CharacterFactionAffiliationComponent.HasPerceivedFaction ( )
Returns
If This character's perceived faction is updated and replicated

◆ InitPlayerOutfitFaction()

void SCR_CharacterFactionAffiliationComponent.InitPlayerOutfitFaction ( )
protected

◆ InitPlayerOutfitFaction_S()

void SCR_CharacterFactionAffiliationComponent.InitPlayerOutfitFaction_S ( )

Called by SCR_PerceivedFactionManagerComponent when player is spawned. Is not called for Non-Players.

◆ IsCharacterWearingFullOutfit()

bool SCR_CharacterFactionAffiliationComponent.IsCharacterWearingFullOutfit ( )
Returns
True if Character is wearing both a jacket and a pants

◆ OnNoFactionSlottedItemChanged()

void SCR_CharacterFactionAffiliationComponent.OnNoFactionSlottedItemChanged ( bool addedToSlot,
IEntity item,
bool updateFaction = true )

Called by SCR_CharacterInventoryStorageComponent when a slotted item is added/removed.

If Perceived faction type is FULL_OUTFIT will check if both jacket and pants are still there

Parameters
[in]addedToSlotIf the item was added or removed
[in]itemItem added or removed
[in]updateFactionIf perceived faction should be recalculated and replicated

◆ OnPerceivedFactionChanged()

void SCR_CharacterFactionAffiliationComponent.OnPerceivedFactionChanged ( )
protected

◆ OnPerceivedFactionChangesAffectsAIChanged()

void SCR_CharacterFactionAffiliationComponent.OnPerceivedFactionChangesAffectsAIChanged ( bool affectsAI)
protected

◆ OnPerceivedFactionOutfitTypeChanged()

void SCR_CharacterFactionAffiliationComponent.OnPerceivedFactionOutfitTypeChanged ( SCR_EPerceivedFactionOutfitType newType)
protected

◆ RecalculateOutfitFaction()

void SCR_CharacterFactionAffiliationComponent.RecalculateOutfitFaction ( )

Recalculates the perceived faction. Called when the Pervceived faction type is changed and after init. Replicates the faction change if server.

◆ RemoveFactionOutfitValue() [1/2]

void SCR_CharacterFactionAffiliationComponent.RemoveFactionOutfitValue ( notnull Faction faction,
int value,
bool updateFaction = true )

Change a specific faction outfit value.

Parameters
[in]factionFaction to change value of
[in]valueValue removed
[in]updateFactionIf perceived faction should be recalculated and replicated

◆ RemoveFactionOutfitValue() [2/2]

void SCR_CharacterFactionAffiliationComponent.RemoveFactionOutfitValue ( SCR_OutfitFactionDataHolder outfitFactionHolder,
bool updateFaction = true )

Called by SCR_ItemOutfitFactionComponent when item was removed from slot.

Parameters
[in]outfitFactionHolderOutfit data holder
[in]updateFactionIf perceived faction should be recalculated and replicated

◆ SetPerceivedFaction_S()

void SCR_CharacterFactionAffiliationComponent.SetPerceivedFaction_S ( int OutfitFaction)
protected

◆ SetPerceivedFactionForAI()

void SCR_CharacterFactionAffiliationComponent.SetPerceivedFactionForAI ( bool resetToNull = false)
protected

Member Data Documentation

◆ m_bHasPerceivedFaction

bool SCR_CharacterFactionAffiliationComponent.m_bHasPerceivedFaction
protected

◆ m_CurrentOutfitData

ref set<SCR_OutfitFactionDataHolder> SCR_CharacterFactionAffiliationComponent.m_CurrentOutfitData = new set<SCR_OutfitFactionDataHolder>()
protected

◆ m_eDisguiseType

SCR_ECharacterDisguiseType SCR_CharacterFactionAffiliationComponent.m_eDisguiseType = SCR_ECharacterDisguiseType.DEFAULT_FACTION
protected

◆ m_iOutfitFactionIndex

int SCR_CharacterFactionAffiliationComponent.m_iOutfitFactionIndex = -1
protected

◆ m_mOutfitFactionValues

ref map<Faction, int> SCR_CharacterFactionAffiliationComponent.m_mOutfitFactionValues = new map<Faction, int>()
protected

◆ m_OnPerceivedFactionChanged

ref ScriptInvokerFaction SCR_CharacterFactionAffiliationComponent.m_OnPerceivedFactionChanged
protected

◆ m_PerceivableComponent

PerceivableComponent SCR_CharacterFactionAffiliationComponent.m_PerceivableComponent
protected

◆ m_PerceivedFaction

Faction SCR_CharacterFactionAffiliationComponent.m_PerceivedFaction
protected

◆ m_PerceivedManager

SCR_PerceivedFactionManagerComponent SCR_CharacterFactionAffiliationComponent.m_PerceivedManager
protected

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