Arma Reforger Script API
|
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 () |
![]() | |
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 () |
![]() | |
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 () |
![]() | |
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_OutfitFactionDataHolder > | m_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 |
void SCR_CharacterFactionAffiliationComponent.~SCR_CharacterFactionAffiliationComponent | ( | ) |
void SCR_CharacterFactionAffiliationComponent.AddFactionOutfitValue | ( | notnull Faction | faction, |
int | value, | ||
bool | updateFaction = true ) |
Change a specific faction outfit value.
[in] | faction | Faction to change value of |
[in] | value | Value added |
[in] | updateFaction | If perceived faction should be recalculated and replicated |
void SCR_CharacterFactionAffiliationComponent.AddFactionOutfitValue | ( | SCR_OutfitFactionDataHolder | outfitFactionHolder, |
bool | updateFaction = true ) |
Called by SCR_ItemOutfitFactionComponent when item was added to a slot.
[in] | outfitFactionHolder | Outfit data holder |
[in] | updateFaction | If perceived faction should be recalculated and replicated |
|
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
|
protected |
|
protected |
void SCR_CharacterFactionAffiliationComponent.DisableUpdatingPerceivedFaction_S | ( | ) |
Disables perceived faction from updating after the character is destroyed or dead.
SCR_ECharacterDisguiseType SCR_CharacterFactionAffiliationComponent.GetCharacterDisguiseType | ( | ) |
int SCR_CharacterFactionAffiliationComponent.GetCharacterOutfitData | ( | out notnull set< SCR_OutfitFactionDataHolder > | outfitFactionData | ) |
paramp[out] Get Set of all outfit data. This data
int SCR_CharacterFactionAffiliationComponent.GetCharacterOutfitValues | ( | out notnull map< Faction, int > | outfitFactionValues | ) |
[out] | Map | of Faction with the value each faction currently has |
ScriptInvokerFaction SCR_CharacterFactionAffiliationComponent.GetOnOnPerceivedFactionChanged | ( | ) |
Faction SCR_CharacterFactionAffiliationComponent.GetPerceivedFaction | ( | ) |
bool SCR_CharacterFactionAffiliationComponent.HasPerceivedFaction | ( | ) |
|
protected |
void SCR_CharacterFactionAffiliationComponent.InitPlayerOutfitFaction_S | ( | ) |
Called by SCR_PerceivedFactionManagerComponent when player is spawned. Is not called for Non-Players.
bool SCR_CharacterFactionAffiliationComponent.IsCharacterWearingFullOutfit | ( | ) |
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
[in] | addedToSlot | If the item was added or removed |
[in] | item | Item added or removed |
[in] | updateFaction | If perceived faction should be recalculated and replicated |
|
protected |
|
protected |
|
protected |
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.
void SCR_CharacterFactionAffiliationComponent.RemoveFactionOutfitValue | ( | notnull Faction | faction, |
int | value, | ||
bool | updateFaction = true ) |
Change a specific faction outfit value.
[in] | faction | Faction to change value of |
[in] | value | Value removed |
[in] | updateFaction | If perceived faction should be recalculated and replicated |
void SCR_CharacterFactionAffiliationComponent.RemoveFactionOutfitValue | ( | SCR_OutfitFactionDataHolder | outfitFactionHolder, |
bool | updateFaction = true ) |
Called by SCR_ItemOutfitFactionComponent when item was removed from slot.
[in] | outfitFactionHolder | Outfit data holder |
[in] | updateFaction | If perceived faction should be recalculated and replicated |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |