Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_CharacterHitZone Interface Reference
Inheritance diagram for SCR_CharacterHitZone:
[legend]

Public Member Functions

override void OnDamage (notnull BaseDamageContext damageContext)
 Called after damage multipliers and thresholds are applied to received impacts and damage is applied to hitzone.
 
override float ComputeEffectiveDamage (notnull BaseDamageContext damageContext, bool isDOT)
 Calculates the amount of damage a hitzone will receive.
 
float GetArmorProtectionValue (EDamageType damageType)
 Get strength of protection from armor attribute on prefab of clothing item.
 
bool IsCovered ()
 Whether hitzone submeshes are hidden with clothing.
 
override void OnDamageStateChanged (EDamageState newState, EDamageState previousDamageState, bool isJIP)
 Called when the damage state changes.
 
void AddBloodToClothes (float immediateBloodEffect=0)
 
void SetWoundedSubmesh (bool wounded)
 
void UpdateSubmeshes ()
 Manage wounds submeshes.
 
float GetMaxBleedingRate ()
 
override EHitZoneGroup GetHitZoneGroup ()
 Hit zone group getter to be overridden.
 
EBandagingAnimationBodyParts GetBodyPartToHeal ()
 
- Public Member Functions inherited from SCR_RegeneratingHitZone
float CalculatePassiveRegenDPS (bool considerRegenScale=true)
 Returns the desired regeneration speed in damage per second for this hitzone.
 
float GetHitZoneDamageOverTime (EDamageType targetDamageType)
 Get current total damage per second of this hitZone.
 
override void OnHealthSet ()
 HealthSet could have decreased health, so passive regeneration is planned.
 
void ToggleHitZoneAutoRegenOnHealthSet (bool doRegen)
 Permanently disable/enable the automatic start of regeneration on this hitzone when manually setting it's health Use this when setting health on characters that should not heal, such as scripted gameplay events.
 
- Public Member Functions inherited from SCR_HitZone
EHitZoneGroup GetHitZoneGroup ()
 Hit zone group getter to be overridden.
 
ScriptInvokerVoid GetOnHealthChanged (bool createNew=true)
 Get event called when hitzone damage changes.
 
ScriptInvoker GetOnDamageStateChanged (bool createNew=true)
 Get event called when hitzone damage state changes.
 
IEntity GetOwner ()
 
override float ComputeEffectiveDamage (notnull BaseDamageContext damageContext, bool isDOT)
 Calculates the amount of damage a hitzone will receive.
 
void DrawDebug ()
 
void ApplyDamagePassRules (notnull BaseDamageContext damageContext)
 
void HandlePassedDamage (notnull BaseDamageContext damageContext)
 
- Public Member Functions inherited from HitZone
proto external float GetBaseDamageMultiplier ()
 
proto external bool HasColliderNodes ()
 
proto external int GetColliderDescriptorIndex (int colliderID)
 
proto external float GetDamageMultiplier (EDamageType dmgType)
 
proto external float GetDamageReduction ()
 
proto external float GetDamageThreshold ()
 
proto external int GetAllColliderNames (out notnull array< string > colliderNames)
 
proto external void SetDamageOverTime (EDamageType dmgType, float dps)
 Sets damage over time for this particular hitzone.
 
proto external float GetDamageOverTime (EDamageType dmgType)
 
proto external int GetNumColliderDescriptors ()
 
proto external HitZoneContainerComponent GetHitZoneContainer ()
 
proto external void SetHealth (float health)
 
proto external void SetHealthScaled (float health)
 
proto external void SetMaxHealth (float maxHealth, ESetMaxHealthFlags flag=ESetMaxHealthFlags.NONE)
 
proto external float GetHealth ()
 
proto external float GetHealthScaled ()
 
proto external float GetDamageStateThreshold (EDamageState damageState)
 
proto external float GetMaxHealth ()
 
proto external string GetName ()
 
proto external EDamageState GetDamageState ()
 
proto external float GetCriticalDamageThreshold ()
 
proto external EDamageState GetPreviousDamageState ()
 
proto external void HandleDamage (float damage, int damageType, IEntity instigator)
 
proto external bool IsProxy ()
 
proto external int GetColliderIDs (out notnull array< int > outIDs)
 Returns all collider IDs attached to this hitzone.
 
proto bool TryGetColliderDescription (IEntity owner, int descIndex, out vector transformLS[4], out int boneIndex, out int nodeID)
 
proto bool TryGetColliderDescriptionFromName (IEntity owner, string colliderName, out vector transformLS[4], out int boneIndex, out int nodeID)
 
void OnInit (IEntity pOwnerEntity, GenericComponent pManagerComponent)
 Call OnInit method from script.
 
void OnDamage (notnull BaseDamageContext damageContext)
 Called when the damage has been dealt by the server, doesn't get called for DOT.
 
float ComputeEffectiveDamage (notnull BaseDamageContext damageContext, bool isDOT)
 Calculates the amount of damage a hitzone will receive.
 

Protected Attributes

float m_fBleedingRateScale
 
ref array< string > m_aDamageSubmeshes
 
ref array< ref LoadoutAreaTypem_aBleedingAreas
 
ECharacterHitZoneGroup m_eHitZoneGroup
 
EBandagingAnimationBodyParts m_eBandageAnimationBodyPart
 
bool m_bIsWounded
 
- Protected Attributes inherited from SCR_RegeneratingHitZone
float m_fFullRegenerationTime
 
bool m_bAutoRegenOnHealthSet = true
 
- Protected Attributes inherited from SCR_HitZone
ref array< ref SCR_DamagePassRulem_aDamagePassRules
 
float m_fFireMultiplier
 
ref ScriptInvokerVoid m_OnHealthChanged
 
ref ScriptInvoker m_OnDamageStateChanged
 

Static Protected Attributes

static const float DAMAGE_TO_BLOOD_MULTIPLIER = 1.3
 

Additional Inherited Members

override void OnHealthSet ()
 Called when damage changes.
 
override void OnDamageStateChanged (EDamageState newState, EDamageState previousDamageState, bool isJIP)
 Called when the damage state changes.
 
- Protected Member Functions inherited from HitZone
void OnHealthSet ()
 Called when damage changes.
 
void OnMaxHealthChanged ()
 Called when max damage changes.
 
void OnDamageStateChanged (EDamageState newState, EDamageState previousDamageState, bool isJIP)
 Called when damage state changes.
 

Member Function Documentation

◆ AddBloodToClothes()

void SCR_CharacterHitZone.AddBloodToClothes ( float  immediateBloodEffect = 0)

◆ ComputeEffectiveDamage()

override float SCR_CharacterHitZone.ComputeEffectiveDamage ( notnull BaseDamageContext  damageContext,
bool  isDOT 
)

Calculates the amount of damage a hitzone will receive.

Parameters
damageType- damage type
rawDamage- incoming damage, without any modifiers taken into account
hitEntity- damaged entity
struckHitZone- hitzone to damage
damageSource- projectile
damageSourceGunner- damage source instigator
damageSourceParent- damage source parent entity (soldier, vehicle)
hitMaterial- hit surface physics material
colliderID- collider ID - if it exists
hitTransform- hit position, direction and normal
impactVelocity- projectile velocity in time of impact
nodeID- bone index in mesh obj
isDOT- true if this is a calculation for DamageOverTime

Implements SCR_HitZone.

◆ GetArmorProtectionValue()

float SCR_CharacterHitZone.GetArmorProtectionValue ( EDamageType  damageType)

Get strength of protection from armor attribute on prefab of clothing item.

◆ GetBodyPartToHeal()

EBandagingAnimationBodyParts SCR_CharacterHitZone.GetBodyPartToHeal ( )

◆ GetHitZoneGroup()

override EHitZoneGroup SCR_CharacterHitZone.GetHitZoneGroup ( )

Hit zone group getter to be overridden.

Returns
Hit zone group

Implements SCR_HitZone.

◆ GetMaxBleedingRate()

float SCR_CharacterHitZone.GetMaxBleedingRate ( )
Parameters
[in]considerRegenScaleconsider the Gamemaster's tweaked modifier for the regenerationDPS
Returns
the desired regeneration speed in damage per second for this hit zone

◆ IsCovered()

bool SCR_CharacterHitZone.IsCovered ( )

Whether hitzone submeshes are hidden with clothing.

◆ OnDamage()

override void SCR_CharacterHitZone.OnDamage ( notnull BaseDamageContext  damageContext)

Called after damage multipliers and thresholds are applied to received impacts and damage is applied to hitzone.

This is also called when transmitting the damage to parent hitzones!

Parameters
typeType of damage
damageAmount of damage received
struckHitZoneOriginal hitzone that got dealt damage, as this might be transmitted damage.
instigatorDamage source instigator (soldier, vehicle, ...)
hitTransform[hitPosition, hitDirection, hitNormal]
speedProjectile speed in time of impact
colliderIDID of the collider receiving damage
nodeIDID of the node of the collider receiving damage

Implements HitZone.

◆ OnDamageStateChanged()

override void SCR_CharacterHitZone.OnDamageStateChanged ( EDamageState  newState,
EDamageState  previousDamageState,
bool  isJIP 
)

Called when the damage state changes.

Implements SCR_HitZone.

Implemented in SCR_CharacterHeadHitZone.

◆ SetWoundedSubmesh()

void SCR_CharacterHitZone.SetWoundedSubmesh ( bool  wounded)

◆ UpdateSubmeshes()

void SCR_CharacterHitZone.UpdateSubmeshes ( )

Manage wounds submeshes.

Member Data Documentation

◆ DAMAGE_TO_BLOOD_MULTIPLIER

const float SCR_CharacterHitZone.DAMAGE_TO_BLOOD_MULTIPLIER = 1.3
staticprotected

◆ m_aBleedingAreas

ref array<ref LoadoutAreaType> SCR_CharacterHitZone.m_aBleedingAreas
protected

◆ m_aDamageSubmeshes

ref array<string> SCR_CharacterHitZone.m_aDamageSubmeshes
protected

◆ m_bIsWounded

bool SCR_CharacterHitZone.m_bIsWounded
protected

◆ m_eBandageAnimationBodyPart

EBandagingAnimationBodyParts SCR_CharacterHitZone.m_eBandageAnimationBodyPart
protected

◆ m_eHitZoneGroup

ECharacterHitZoneGroup SCR_CharacterHitZone.m_eHitZoneGroup
protected

◆ m_fBleedingRateScale

float SCR_CharacterHitZone.m_fBleedingRateScale
protected

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