Arma Reforger Script API
|
Fractal destruction component. For objects that should shatter/splinter etc. More...
Additional Inherited Members | |
![]() | |
ScriptInvoker | GetOnDamageInvoker () |
Returns the on damage script invoker if one exists, otherwise creates one and returns it. | |
SCR_DestructionHitInfo | GetDestructionHitInfo (bool createNew=false) |
bool | ShouldDestroyParent () |
bool | GetDisablePhysicsOnDestroy () |
Returns whether the object should disable physics on destruction (before being deleted or changed) | |
bool | GetUndamaged () |
Returns whether the object is undamaged. | |
bool | GetDestroyed () |
Returns whether the object is destroyed. | |
void | RPC_DoSpawnAllDestroyEffects () |
Spawns destroy objects of children as well as own. | |
void | DeleteParentWithEffects () |
void | DeleteDestructibleDelayed () |
Deletion of the owner of this component which is going to be delayed by a frame to ensure proper excecution of invokers and RPC calls. | |
void | SetHitZoneHealth (float baseHealth, bool clearDamage=true) |
Sets the base health value of the hit zone (does not trigger destruction) | |
void | SetHitZoneDamage (float damage) |
Sets damage of the hit zone (does not trigger destruction) | |
SCR_DestructionHitInfo | CreateDestructionHitInfo (bool totalDestruction, float lastHealth, float hitDamage, EDamageType damageType, vector hitPosition, vector hitDirection, vector hitNormal) |
Creates and fills destruction hit info for the object. | |
bool | GetCanBeDamaged () |
Called when the object receives damage, return false if damage should be ignored. | |
void | QueueDestroy () |
Called when the object should be destroyed and various effects or other things need to be performed (actual destruction handled HandleDestruction()) | |
void | HandleDestruction () |
Handle destruction. | |
void | InitDestruction () |
Initialize destruction. | |
void | NetReceiveHitData (int hitIndex, EDamageType damageType, float damage, vector hitPosition, vector hitDirection) |
Receive encoded hit data from server. | |
void | NetReadInit (ScriptBitReader reader) |
Called when Item is initialized from replication stream. Carries the data from Master. | |
void | NetWriteInit (ScriptBitWriter writer) |
Called when Item is getting replicated from Master to Slave connection. | |
void | ReplicateDestructibleState (int damagePhase=0, bool silent=false) |
bool | IsProxy () |
Checks if this entity is locally owned. | |
override bool | FilterContact (IEntity owner, IEntity other, Contact contact) |
No contacts for chimeraCharacters. | |
override void | OnFilteredContact (IEntity owner, IEntity other, Contact contact) |
Only called if FilterContact returned true. | |
override void | OnDamage (notnull BaseDamageContext damageContext) |
bool | IsDestructionQueued () |
float | GetTotalDestructionThreshold () |
override void | OnPostInit (IEntity owner) |
Called after all components are initialized. | |
void | ~SCR_DestructionDamageManagerComponent () |
![]() | |
bool | IsRplReady () |
Check if replication loading is completed. Important for join in progress and when streaming entities in. | |
HitZone | GetHitZoneByName (string hitZoneName, bool caseSensitive=false) |
Get the HitZone that matches the provided name. | |
void | GetPhysicalHitZones (out notnull array< HitZone > physicalHitZones) |
Return hit zones with colliders assigned. | |
void | GetRegeneratingHitZones (out notnull array< SCR_RegeneratingHitZone > regeneratingHitZones) |
Return hit zones with passive regeneration enabled. | |
void | RpcDo_SetFireState (int hitZoneIndex, SCR_EBurningState fireState) |
Set fire rate of a flammable hitzone. | |
int | GetSurroundingHitzones (vector origin, Physics physics, float maxDistance, out array< HitZone > outHitzones) |
float | GetMinDestroyDamage (EDamageType damageType, array< HitZone > hitzones, int count) |
ScriptInvoker | GetOnDamage () |
ScriptInvoker | GetOnDamageOverTimeAdded () |
ScriptInvoker | GetOnDamageOverTimeRemoved () |
ScriptInvoker | GetOnDamageStateChanged () |
void | ~SCR_DamageManagerComponent () |
int | GetHitZonesOfGroup (EHitZoneGroup hitZoneGroup, out notnull array< HitZone > groupHitZones, bool clearArray=true) |
Get a list of all hitzones of specific hitzone group. | |
int | GetHitZonesOfGroups (notnull array< EHitZoneGroup > hitZoneGroups, out notnull array< HitZone > groupHitZones) |
Get a list of all hitzones of specific hitzone group. | |
float | GetGroupDamageOverTime (ECharacterHitZoneGroup hitZoneGroup, EDamageType damageType) |
Get total damage over time of given hitzone group. | |
void | Kill (notnull Instigator instigator) |
Neutralize the entity with a specific damage type, registering the killer entity. | |
void | DamageRandomHitZones (float damage, EDamageType type, notnull Instigator instigator, bool onlyPhysical=true, vector outMat[3]={}, bool damageDefault=false) |
Damage random physical hit zones up to damage amount. | |
bool | CanBeHealed (bool ignoreHealingDOT=true) |
Return true if there is damage that can be repaired. | |
void | FullHeal (bool ignoreHealingDOT=true) |
Fix all the damage. | |
float | HealHitZones (float healthToDistribute, bool sequential=false, float maxHealThresholdScaled=1, array< HitZone > alternativeHitZones=null) |
Partially heal the hitZones of an entity. | |
void | ReduceSmoke () |
Reduce smoke output based on the total health of hit zones. | |
float | GetHitZonesDamage (float untilThresholdScaled=1, array< HitZone > alternativeHitZones=null) |
Get all damage dealt to hitzones. | |
float | GetHitZonesHealthScaled (array< HitZone > alternativeHitZones=null) |
Get Health scaled of all hitzones. | |
float | GetSingleHitZonesHealthScaled (array< HitZone > alternativeHitZones=null, bool getLowestHealth=true) |
Get single Health scaled from hitzones. | |
ResourceName | GetSecondaryExplosion (float value, SCR_ESecondaryExplosionType explosionType, EResourceType resourceType=EResourceType.SUPPLIES, bool fire=false) |
Determine secondary explosion prefab based on explosion value, type and resource type if defined. | |
SCR_SecondaryExplosion | GetSecondaryExplosionForScale (SCR_ESecondaryExplosionScale scale, SCR_ESecondaryExplosionType explosionType, EResourceType resourceType=EResourceType.SUPPLIES) |
Determine secondary explosion prefab based on explosion scale, type and resource type if defined. | |
SCR_ESecondaryExplosionScale | GetSecondaryExplosionScale (float value, SCR_ESecondaryExplosionType explosionType, EResourceType resourceType=EResourceType.SUPPLIES) |
Determine secondary explosion prefab based on explosion value, type and resource type if defined. | |
ResourceName | GetSecondaryFireParticle (float value, SCR_ESecondaryExplosionType explosionType, EResourceType resourceType=EResourceType.SUPPLIES) |
Determine secondary explosion prefab based on explosion value, type and resource type if defined. | |
bool | IsOnFire (HitZone hitZone=null) |
Determine if provided or any hit zone from this damage manager is on fire. | |
bool | IsOnFire (notnull array< HitZone > hitZones) |
Determine if any hit zone from this damage manager is on fire. | |
void | SecondaryExplosion (ResourceName prefabName, notnull Instigator instigator, notnull EntitySpawnParams spawnParams) |
Spawn secondary explosion. | |
SCR_ResourceEncapsulator | GetResourceEncapsulator (EResourceType suppliesType=EResourceType.SUPPLIES) |
void | SupplySecondaryExplosion (notnull Instigator instigator) |
Spawn supply secondary explosion when vehicle becomes destroyed. | |
vector | GetSecondaryExplosionPosition (TypeName hitZoneType, out float totalWeight=0) |
Get weighed average position of explosion for hitzones of specified type. | |
void | FuelSecondaryExplosion (notnull Instigator instigator) |
Spawn fuel secondary explosion when vehicle becomes destroyed. | |
void | UpdateFireDamage (float timeSlice) |
void | UpdateFireParticles (vector position, out ParticleEffectEntity particles, SCR_ESecondaryExplosionScale state, SCR_ESecondaryExplosionType fireType, EResourceType resourceType=EResourceType.SUPPLIES) |
Update visual effects and store result in particles variable. | |
override void | OnDamageOverTimeAdded (EDamageType dType, float dps, HitZone hz) |
Invoked every time the DoT is added to certain hitzone. | |
override void | OnDamageOverTimeRemoved (EDamageType dType, HitZone hz) |
Invoked when provided damage type is removed from certain hitzone. | |
override bool | HijackDamageHandling (notnull BaseDamageContext damageContext) |
override int | _WB_GetAfterWorldUpdateSpecs (IEntity owner, IEntitySource src) |
![]() | |
proto external int | ComputeStruckHitZones (out notnull array< HitZone > struckHitZones, notnull BaseDamageContext damageContext) |
Clears and fills struckHitZones array with all HZs that should get damaged by this BaseDamageContext. | |
proto external void | EnableDamageHandling (bool enable) |
proto external bool | IsDamageHandlingEnabled () |
proto external float | GetMovementDamage () |
proto external float | GetAimingDamage () |
proto external void | SetMovementDamage (float damage) |
proto external void | SetAimingDamage (float damage) |
proto external float | GetHealthScaled () |
proto external bool | SetHealthScaled (float health) |
proto external float | GetHealth () |
proto external float | GetMaxHealth () |
proto external EDamageState | GetState () |
proto external bool | IsDestroyed () |
proto external void | SetInstigatorEntity (IEntity instigator) |
proto external void | SetInstigator (notnull Instigator instigator) |
proto external notnull Instigator | GetInstigator () |
proto external int | GetAttachedColliderIDs (out notnull array< int > outAttachedColliderIDs) |
Fills colliderIDs with all the colliders attached to hitzones this dmg manager owns. | |
proto external void | HandleDamage (notnull BaseDamageContext damageContext) |
proto external bool | IsDamagedOverTime (EDamageType dType) |
proto external float | GetDamageOverTime (EDamageType dType) |
proto external void | RemoveDamageOverTime (EDamageType dType) |
Removes DOT of provided damageType from all currently affected HitZones. | |
GameMaterial | OverrideHitMaterial (HitZone struckHitzone) |
Not all armors are physical so the surface that gets struck by projectiles will not be the one the armor, but the hitzone. | |
bool | ShouldCountAsHit (notnull BaseDamageContext damageContext) |
Called after HijackDamageHandling. | |
![]() | |
proto external IEntity | GetOwner () |
proto external HitZone | GetDefaultHitZone () |
proto external HitZone | GetHitZoneByColliderID (int colliderID) |
proto external int | GetHitZonesByColliderIDs (out notnull array< HitZone > outHitZones, notnull array< int > colliderIDs) |
Clears and fills the specified outHitZones array with all HZs that are attached to colliderIDs. | |
proto external HitZone | GetHitZone (string colliderName) |
proto external int | GetAllHitZones (out notnull array< HitZone > outHitZones) |
Clears and fills the specified outHitZones array with all HZs in this entity Returns the count of elements that were filled into the array. | |
proto external int | GetAllHitZonesInHierarchy (out notnull array< HitZone > outHitZones) |
Clears and fills the specified outHitZones array with all HZs in this entity and its children. | |
proto external HitZoneContainerComponent | GetParentHitZoneContainer () |
![]() | |
bool | OnTicksOnRemoteProxy () |
![]() | |
static bool | GetReadingInit (bool readingInit) |
static void | SetReadingInit (bool readingInit) |
static ScriptInvoker | GetOnDestructibleDestroyedInvoker () |
Returns the on destructible destroyed script invoker if one exists, otherwise creates one and returns it. | |
![]() | |
static SCR_DamageManagerComponent | GetDamageManager (notnull IEntity owner) |
Get damage manager from given owner. | |
![]() | |
static const int | MAX_DESTRUCTION_RESPONSE_INDEX = 10 |
static const string | MAX_DESTRUCTION_RESPONSE_INDEX_NAME = "HugeDestructible" |
static const ref array< EDamageType > | HEALING_DAMAGE_TYPES = {EDamageType.HEALING, EDamageType.REGENERATION} |
![]() | |
notnull SCR_DestructionBaseData | GetDestructionBaseData () |
RplComponent | FindParentRplComponent () |
void | PassDamageToChildren (notnull BaseDamageContext damageContext) |
![]() | |
override bool | OnRplSave (ScriptBitWriter writer) |
override bool | OnRplLoad (ScriptBitReader reader) |
notnull SCR_DamageManagerData | GetScriptedDamageManagerData () |
override bool | ShouldOverrideInstigator (notnull Instigator currentInstigator, notnull Instigator newInstigator) |
Called whenever an instigator is going to be set. | |
float | HealHitZonesInSequence (float healthToDistribute, float maxHealThresholdScaled, array< HitZone > targetHitZones) |
float | HealHitZonesInParallel (float healthToDistribute, float maxHealThresholdScaled, array< HitZone > targetHitZones) |
void | ConnectToFireDamageSystem () |
void | DisconnectFromFireDamageSystem () |
override void | OnDamageStateChanged (EDamageState state) |
Invoked when damage state changes. | |
override void | _WB_AfterWorldUpdate (IEntity owner, float timeSlice) |
![]() | |
void | OnHandleFallDamage (EFallDamageType fallDamageType, vector velocityVector) |
Called when fall related damage is relevant. | |
void | OnHealthSet () |
Called when SetHealth() is used on default hitzone. | |
void | OnMaxHealthChanged () |
Called when SetMaxHealth() is used on default hitzone. | |
void | OnDelete (IEntity owner) |
void | OnFrame (IEntity owner, float timeSlice) |
Called during EOnFrame. | |
void | OnDiag (IEntity owner, float timeSlice) |
Called during EOnDiag. | |
![]() | |
int | m_iDestructionBaseDataIndex = -1 |
![]() | |
SCR_EBurningState | m_iMinimumBurningState |
int | m_iTimetickInstigator = System.GetTickCount() |
int | m_iTimeThresholdInstigatorReplacement = 180000 |
int | m_iPlayerId = 0 |
int | m_iDamageManagerDataIndex = -1 |
bool | m_bRplReady |
![]() | |
static ref ScriptInvoker | s_OnDestructibleDestroyed |
static bool | s_bReadingInit = false |
static bool | s_bPrintMissingComponent |
static bool | s_bPrintMissingPlayerController |
static bool | s_bPrintInitializationFailed |
static int | s_iFirstFreeDestructionBaseData = -1 |
static ref array< ref SCR_DestructionBaseData > | s_aDestructionBaseData = {} |
![]() | |
static const int | MIN_MOMENTUM_RESPONSE_INDEX = 1 |
static const int | MAX_MOMENTUM_RESPONSE_INDEX = 5 |
static const int | MIN_DESTRUCTION_RESPONSE_INDEX = 6 |
const float | SIMULATION_IMPRECISION_MULTIPLIER = 1.1 |
static ref array< ref SCR_DamageManagerData > | s_aDamageManagerData = {} |
Fractal destruction component. For objects that should shatter/splinter etc.