62 array<HitZone> allHitZones = {};
63 if (dmgManager.GetAllHitZonesInHierarchy(allHitZones) < 1)
69 array<int> groupedIds;
70 foreach (
int hitZoneId,
HitZone hitzone : allHitZones)
79 groupedIds.Insert(hitZoneId);
81 groupedIds = {hitZoneId};
90 [
Attribute(defvalue:
SCR_EBurningState.SMOKING_LIGHT.ToString(), uiwidget: UIWidgets.ComboBox,
desc:
"State from which vehicle will be considered on fire thus players will be able to extinguish it", enums: ParamEnumArray.FromEnum(
SCR_EBurningState))]
94 protected static const int MAX_MOMENTUM_RESPONSE_INDEX = 5;
95 protected static const int MIN_DESTRUCTION_RESPONSE_INDEX = 6;
97 static const int MAX_DESTRUCTION_RESPONSE_INDEX = 10;
98 static const string MAX_DESTRUCTION_RESPONSE_INDEX_NAME =
"HugeDestructible";
99 private static int s_iFirstFreeDamageManagerData = -1;
100 protected static ref array<ref SCR_DamageManagerData> s_aDamageManagerData = {};
102 static const ref array<EDamageType> HEALING_DAMAGE_TYPES = {
EDamageType.HEALING,
EDamageType.REGENERATION};
115 array<HitZone> hitZones = {};
116 GetAllHitZonesInHierarchy(hitZones);
119 foreach (
HitZone hitZone : hitZones)
121 if (hitZone.HasColliderNodes())
123 physicalHitZones.Insert(hitZone);
128 container = hitZone.GetHitZoneContainer();
129 if (container == null || container ==
this)
133 if (container.GetDefaultHitZone() == hitZone)
134 physicalHitZones.Insert(hitZone);
142 array<HitZone> hitZones = {};
143 GetAllHitZonesInHierarchy(hitZones);
145 foreach (
HitZone hitZone : hitZones)
149 regeneratingHitZones.Insert(regenHitZone);
163 array<HitZone> hitZones = {};
164 GetAllHitZones(hitZones);
165 SCR_FlammableHitZone flammableHitZone = SCR_FlammableHitZone.Cast(hitZones.Get(hitZoneIndex));
166 if (flammableHitZone)
167 flammableHitZone.SetFireState(fireState);
186 array<HitZone> hitZones = {};
190 int count = GetAllHitZonesInHierarchy(hitZones);
191 float maxDistanceSq = maxDistance * maxDistance;
192 array<string> hitZoneColliderNames = {};
194 float minDistance, currentDistance;
195 int colliderCount, geomIndex;
197 for (
int i = count - 1; i >= 0; i--)
199 minDistance =
float.MAX;
200 colliderCount = hitZones[i].GetAllColliderNames(hitZoneColliderNames);
202 if (colliderCount == 0)
205 for (
int y = colliderCount - 1; y >= 0; y--)
207 geomIndex = physics.GetGeom(hitZoneColliderNames[y]);
211 physics.GetGeomWorldTransform(geomIndex, mat);
212 currentDistance =
vector.DistanceSq(origin, mat[3]);
214 if (currentDistance < minDistance)
215 minDistance = currentDistance;
218 if (minDistance > maxDistanceSq)
221 minDistance =
Math.Sqrt(minDistance);
224 outHitzones.Insert(hitZones[i]);
227 return hitZonesCount;
237 if (!IsDamageHandlingEnabled())
241 float damageMultiplier;
242 HitZone defaultHitzone = GetDefaultHitZone();
243 if (defaultHitzone.GetDamageMultiplier(damageType) * defaultHitzone.GetBaseDamageMultiplier() == 0)
246 foreach (
HitZone hitZone : hitzones)
248 damageMultiplier = hitZone.GetBaseDamageMultiplier() * hitZone.GetDamageMultiplier(damageType);
249 if (damageMultiplier == 0)
252 damage += (hitZone.GetMaxHealth() + hitZone.GetDamageReduction()) / damageMultiplier;
254 if (damage < hitZone.GetDamageThreshold())
255 damage += hitZone.GetDamageThreshold();
271 private int AllocateScriptedDamageManagerData()
273 if (s_iFirstFreeDamageManagerData == -1)
274 return s_aDamageManagerData.Insert(
new SCR_DamageManagerData());
277 int returnIndex = s_iFirstFreeDamageManagerData;
278 SCR_DamageManagerData
data = s_aDamageManagerData[returnIndex];
279 s_iFirstFreeDamageManagerData =
data.m_iNextFreeIndex;
280 data.m_iNextFreeIndex = -1;
286 private void FreeScriptedDamageManagerData(
int index)
288 s_aDamageManagerData[
index].Reset();
289 s_aDamageManagerData[
index].m_iNextFreeIndex = s_iFirstFreeDamageManagerData;
290 s_iFirstFreeDamageManagerData =
index;
324 invoker.Invoke(damageContext);
339 int currentTimeTick =
System.GetTickCount();
353 int newId = newInstigator.GetInstigatorPlayerID();
354 int oldId = currentInstigator.GetInstigatorPlayerID();
356 Faction factionKiller = factionManager.GetPlayerFaction(newId);
363 Faction factionPrevInstigator = factionManager.GetPlayerFaction(oldId);
364 if (!factionPrevInstigator)
401 ChimeraCharacter character = ChimeraCharacter.Cast(owner);
403 return character.GetDamageManager();
405 BaseVehicle vehicle = BaseVehicle.Cast(owner);
407 return vehicle.GetDamageManager();
409 return SCR_DamageManagerComponent.Cast(owner.FindComponent(SCR_DamageManagerComponent));
421 groupHitZones.Clear();
423 array<HitZone> allHitZones = {};
424 GetAllHitZonesInHierarchy(allHitZones);
427 foreach (
HitZone hitZone : allHitZones)
431 groupHitZones.Insert(hitZone);
434 return groupHitZones.Count();
446 groupHitZones.Clear();
449 array<int> groupedHitZoneIds =
data.GetGroupHitZoneIds(hitZoneGroup);
450 if (!groupedHitZoneIds)
453 GetHitZonesByID(groupHitZones, groupedHitZoneIds);
455 return groupHitZones.Count();
463 int GetHitZonesOfGroups(notnull array<EHitZoneGroup> hitZoneGroups, out notnull array<HitZone> groupHitZones)
465 groupHitZones.Clear();
467 if (hitZoneGroups.IsEmpty())
470 array<HitZone> allHitZones = {};
471 GetAllHitZonesInHierarchy(allHitZones);
474 foreach (
HitZone hitZone : allHitZones)
477 if (scrHitZone && hitZoneGroups.Contains(scrHitZone.
GetHitZoneGroup()))
478 groupHitZones.Insert(hitZone);
481 return groupHitZones.Count();
491 groupHitZones.Clear();
493 if (hitZoneGroups.IsEmpty())
497 array<EHitZoneGroup> groupedHitZoneIds = {};
498 array<EHitZoneGroup> individualHitZoneGroupIds;
501 individualHitZoneGroupIds =
data.GetGroupHitZoneIds(hitZoneGroup);
502 if (individualHitZoneGroupIds)
503 groupedHitZoneIds.InsertAll(individualHitZoneGroupIds);
506 GetHitZonesByID(groupHitZones, groupedHitZoneIds);
508 return groupHitZones.Count();
520 float totalGroupDamage;
521 array<HitZone> groupedHitZones = {};
524 foreach (
HitZone hitzone : groupedHitZones)
526 totalGroupDamage += hitzone.GetDamageOverTime(damageType);
529 return totalGroupDamage;
544 HitZone hitZone = GetDefaultHitZone();
546 if (instigator.GetInstigatorType() ==
InstigatorType.INSTIGATOR_GM)
564 array<HitZone> hitZones = {};
569 GetAllHitZonesInHierarchy(hitZones);
572 hitZones.RemoveItem(GetDefaultHitZone());
575 DamageManagerComponent damageManager;
578 while (damage > 0 && !hitZones.IsEmpty())
580 hitZone = hitZones.GetRandomElement();
583 hitZones.RemoveItem(hitZone);
587 damageManager = DamageManagerComponent.Cast(hitZone.GetHitZoneContainer());
590 hitZones.RemoveItem(hitZone);
595 SCR_DamageContext hitZoneContext =
new SCR_DamageContext(
type, damage, outMat, damageManager.GetOwner(), hitZone, instigator, null, -1, -1);
599 if (hitZoneDamage <= 0 ||
float.AlmostEqual(hitZoneDamage, 0))
601 hitZones.RemoveItem(hitZone);
606 damage -= hitZoneDamage;
608 damageManager.HandleDamage(hitZoneContext);
618 if (GetDefaultHitZone().GetDamageState() ==
EDamageState.UNDAMAGED)
622 array<EDamageType> damageTypes = {};
627 if (!ignoreHealingDOT && HEALING_DAMAGE_TYPES.Contains(
type))
630 if (IsDamagedOverTime(
type))
635 if (SCR_ChimeraCharacter.Cast(
GetOwner()))
639 array<HitZone> hitZones = {};
640 GetAllHitZonesInHierarchy(hitZones);
641 SCR_FlammableHitZone flammableHitZone;
642 foreach (
HitZone hitZone : hitZones)
644 if (hitZone && hitZone.GetDamageState() !=
EDamageState.UNDAMAGED)
648 flammableHitZone = SCR_FlammableHitZone.Cast(hitZone);
649 if (flammableHitZone &&
IsOnFire(flammableHitZone))
660 array<HitZone> hitZones = {};
661 GetAllHitZonesInHierarchy(hitZones);
664 SCR_FlammableHitZone flammableHitZone;
665 foreach (
HitZone hitZone : hitZones)
668 flammableHitZone = SCR_FlammableHitZone.Cast(hitZone);
669 if (flammableHitZone)
670 flammableHitZone.SetFireRate(0);
674 array<EDamageType> damageTypes = {};
683 if (IsDamagedOverTime(
type))
684 RemoveDamageOverTime(
type);
688 foreach (
HitZone hitZone : hitZones)
690 if (hitZone && hitZone.GetDamageState() !=
EDamageState.UNDAMAGED)
691 hitZone.SetHealthScaled(1);
702 float HealHitZones(
float healthToDistribute,
bool sequential =
false,
float maxHealThresholdScaled = 1, array<HitZone> alternativeHitZones = null)
704 if (healthToDistribute <= 0)
705 return healthToDistribute;
707 if (maxHealThresholdScaled < 0 || maxHealThresholdScaled > 1)
708 maxHealThresholdScaled = 1;
710 array<HitZone> targetHitZones = {};
711 if (alternativeHitZones)
712 targetHitZones.Copy(alternativeHitZones);
722 return healthToDistribute;
726 protected float HealHitZonesInSequence(
float healthToDistribute,
float maxHealThresholdScaled, array<HitZone> targetHitZones)
728 foreach (
HitZone hitZone : targetHitZones)
730 if (healthToDistribute <= 0)
734 float healthToAdd = (hitZone.GetMaxHealth() * maxHealThresholdScaled) - hitZone.GetHealth();
735 if (healthToAdd <= 0)
739 if (healthToAdd > healthToDistribute)
741 hitZone.HandleDamage(-healthToDistribute,
EDamageType.HEALING, null);
742 healthToDistribute = 0;
747 hitZone.HandleDamage(-healthToAdd,
EDamageType.HEALING, null);
748 healthToDistribute -= healthToAdd;
751 return healthToDistribute;
755 protected float HealHitZonesInParallel(
float healthToDistribute,
float maxHealThresholdScaled, array<HitZone> targetHitZones)
757 array<HitZone> damagedHitZones = {};
759 while (healthToDistribute > 0)
761 foreach (
HitZone hitZone : targetHitZones)
763 if (hitZone.GetHealth() < (hitZone.GetMaxHealth() * maxHealThresholdScaled))
764 damagedHitZones.Insert(hitZone);
767 if (damagedHitZones.IsEmpty())
770 float healthToDistributeHitZone = healthToDistribute / damagedHitZones.Count();
771 foreach (
HitZone hitZone : damagedHitZones)
773 if (healthToDistribute <= 0)
777 float healthToAdd = (hitZone.GetMaxHealth() * maxHealThresholdScaled) - hitZone.GetHealth();
778 if (healthToAdd <= 0)
782 if (healthToDistributeHitZone > healthToAdd)
784 hitZone.HandleDamage(-healthToAdd,
EDamageType.HEALING, null);
785 healthToDistribute -= healthToAdd;
790 hitZone.HandleDamage(-healthToDistributeHitZone,
EDamageType.HEALING, null);
791 healthToDistribute -= healthToDistributeHitZone;
796 damagedHitZones.Clear();
799 return healthToDistribute;
813 HitZone defaultHZ = GetDefaultHitZone();
815 array<HitZone> hitZones = {};
816 GetAllHitZones(hitZones);
820 foreach (
HitZone hz : hitZones)
826 averageHP += hz.GetHealthScaled();
829 if (numberOfValidHZ > 0)
831 averageHP /= numberOfValidHZ;
832 if (averageHP > defaultHZ.GetHealthScaled())
833 averageHP = defaultHZ.GetHealthScaled();
837 averageHP = defaultHZ.GetHealthScaled();
844 SCR_FlammableHitZone flammableHZ;
845 foreach (
HitZone hz : hitZones)
847 flammableHZ = SCR_FlammableHitZone.Cast(hz);
852 if (flammableHZ.GetFireState() <= desiredState)
855 flammableHZ.SetFireState(desiredState);
864 float GetHitZonesDamage(
float untilThresholdScaled = 1, array<HitZone> alternativeHitZones = null)
866 array<HitZone> hitZones = {};
867 if (!alternativeHitZones || alternativeHitZones.IsEmpty())
870 hitZones.Copy(alternativeHitZones);
875 float totalDamage, addedDamage;
877 foreach (
HitZone hitZone : hitZones)
883 addedDamage = (hitZone.GetMaxHealth() * untilThresholdScaled) - hitZone.GetHealth();
885 totalDamage += addedDamage;
897 array<HitZone> hitZones = {};
898 if (!alternativeHitZones || alternativeHitZones.IsEmpty())
901 hitZones.Copy(alternativeHitZones);
904 if (!hitZones || hitZones.IsEmpty())
907 float totalHealthScaled;
909 foreach (
HitZone hitZone : hitZones)
913 totalHealthScaled += 1;
917 totalHealthScaled += hitZone.GetHealthScaled();
920 return totalHealthScaled / hitZones.Count();
930 array<HitZone> hitZones = {};
931 if (!alternativeHitZones || alternativeHitZones.IsEmpty())
934 hitZones.Copy(alternativeHitZones);
937 if (!hitZones || hitZones.IsEmpty())
940 float returnValue = -1;
943 foreach (
HitZone hitZone : hitZones)
950 returnValue = hitZone.GetHealthScaled();
958 healthScaled = hitZone.GetHealthScaled();
960 if ((getLowestHealth && returnValue > healthScaled) || (!getLowestHealth && returnValue < healthScaled))
961 returnValue = healthScaled;
975 SCR_SecondaryExplosions secondaries;
985 return secondaries.GetExplosionPrefab(value, explosionType, resourceType);
1000 return secondaries.GetSecondaryExplosionForScale(
scale, explosionType, resourceType);
1009 return SCR_ESecondaryExplosionScale.NONE;
1013 return SCR_ESecondaryExplosionScale.NONE;
1015 return secondaries.GetSecondaryExplosionScale(value, explosionType, resourceType);
1030 return secondaries.GetFireParticles(value, explosionType, resourceType);
1039 return IsOnFire(
new array<HitZone>);
1041 SCR_FlammableHitZone flammableHZ = SCR_FlammableHitZone.Cast(hitZone);
1045 return flammableHZ.GetFireState() >= m_iMinimumBurningState;
1053 if (hitZones.IsEmpty())
1055 GetAllHitZones(hitZones);
1056 if (hitZones.IsEmpty())
1060 SCR_FlammableHitZone flammableHZ;
1061 foreach (
HitZone hz : hitZones)
1063 flammableHZ = SCR_FlammableHitZone.Cast(hz);
1067 if (flammableHZ.GetFireState() >= m_iMinimumBurningState)
1078 if (GetDefaultHitZone() && GetDefaultHitZone().
IsProxy())
1082 if (!secondaryResource.IsValid())
1085 if (!spawnParams.Parent)
1088 IEntity explosion =
GetGame().SpawnEntityPrefab(secondaryResource, spawnParams.Parent.GetWorld(), spawnParams);
1105 SCR_BaseCompartmentManagerComponent baseCompartment = SCR_BaseCompartmentManagerComponent.Cast(
GetOwner().FindComponent(SCR_BaseCompartmentManagerComponent));
1106 if (baseCompartment)
1108 array<IEntity> vehicleOccupants = {};
1109 baseCompartment.GetOccupants(vehicleOccupants);
1110 foreach (
IEntity entity : vehicleOccupants)
1112 ignoreList.RemoveItem(entity);
1116 array<BaseProjectileEffect> explosionContainers = {};
1131 SCR_ResourceComponent resourceComponent = SCR_ResourceComponent.FindResourceComponent(owner);
1132 if (!resourceComponent)
1153 if (resourceValue <= 0)
1156 IEntity owner = encapsulator.GetOwner();
1175 if (!secondaryExplosionPrefab.IsEmpty())
1180 spawnParams.Parent = owner;
1182 for (
int i; i < containerCount; i++)
1194 averagePosition +=
position * weight;
1196 spawnParams.Transform[3] = averagePosition;
1201 for (
int i; i < containerCount; i++)
1212 if (!secondaryExplosionPrefab.IsEmpty())
1224 array<HitZone> hitZones = {};
1225 GetAllHitZonesInHierarchy(hitZones);
1229 vector weighedAveragePosition;
1236 foreach (
HitZone hitZone : hitZones)
1239 if (!destructibleHitZone || !destructibleHitZone.Type().IsInherited(hitZoneType))
1243 if (!explosionPoint && destructibleHitZone != GetDefaultHitZone())
1249 position = physics.GetCenterOfMass();
1254 if (weight < 0 ||
float.AlmostEqual(weight, 0))
1257 weighedAveragePosition +=
position * weight;
1258 totalWeight += weight;
1261 if (totalWeight > 0)
1262 return weighedAveragePosition / totalWeight;
1263 else if (validHitZones > 0)
1264 return averagePosition / validHitZones;
1266 return physics.GetCenterOfMass();
1278 spawnParams.Transform[3] = explosionPosition;
1305 ResourceName fireParticles = secondaryFire.m_sSecondaryFireParticles;
1306 if (fireParticles.IsEmpty())
1312 params.PlayOnSpawn =
true;
1313 params.DeleteWhenStopped =
true;
1314 params.UseFrameEvent =
true;
1341 super.OnDamageStateChanged(newState, previousDamageState, isJIP);
1347 invoker.Invoke(newState);
1365 super.OnDamageOverTimeAdded(dType, dps, hz);
1371 invoker.Invoke(dType, dps, hz);
1374 RplComponent rpl = RplComponent.Cast(
GetOwner().FindComponent(RplComponent));
1375 if (rpl && rpl.IsProxy())
1388 super.OnDamageOverTimeRemoved(dType, hz);
1394 invoker.Invoke(dType, hz);
1397 RplComponent rpl = RplComponent.Cast(
GetOwner().FindComponent(RplComponent));
1398 if (rpl && rpl.IsProxy())
1401 if (dType ==
EDamageType.FIRE && !IsDamagedOverTime(dType))
1412 data.InitPrefabData(owner,
this);
1430 SCR_FlammableHitZone flammableHitZone = SCR_FlammableHitZone.Cast(damageContext.struckHitZone);
1431 if (flammableHitZone && damageContext.damageType ==
EDamageType.INCENDIARY)
1432 flammableHitZone.HandleIncendiaryDamage(damageContext);
1440 override int _WB_GetAfterWorldUpdateSpecs(
IEntity owner, IEntitySource src)
1442 return EEntityFrameUpdateSpecs.CALL_WHEN_ENTITY_VISIBLE;
1448 protected override void _WB_AfterWorldUpdate(
IEntity owner,
float timeSlice)
1450 super._WB_AfterWorldUpdate(owner, timeSlice);
1452 GenericEntity entity = GenericEntity.Cast(owner);
1457 if (!api || !api.IsEntitySelected(api.EntityToSource(owner)))
1461 array<HitZone> hitZones = {};
1462 GetAllHitZones(hitZones);
1464 SCR_HitZone hitzone;
1465 foreach (HitZone hitZone : hitZones)
1467 hitzone = SCR_HitZone.Cast(hitZone);
1469 hitzone.DrawDebug();
ArmaReforgerScripted GetGame()
override bool HijackDamageHandling(notnull BaseDamageContext damageContext)
We hijack damage on armor, and use it to damage the character. Always return true on the hijack to en...
override bool FilterContact(IEntity owner, IEntity other, Contact contact)
Armor doesn't take collisiondamage.
override bool HandleDamage(BaseDamageContext damageContext, IEntity owner)
SCR_CharacterBloodHitZone OnDamage
Resilience - incapacitation or death, depending on game mode settings.
SCR_CharacterSoundComponentClass GetComponentData()
bool IsOnFire(HitZone hitZone=null)
float HealHitZonesInParallel(float healthToDistribute, float maxHealThresholdScaled, array< HitZone > targetHitZones)
void UpdateFireParticles(vector position, out ParticleEffectEntity particles, SCR_ESecondaryExplosionScale state, SCR_ESecondaryExplosionType fireType, EResourceType resourceType=EResourceType.SUPPLIES)
float HealHitZonesInSequence(float healthToDistribute, float maxHealThresholdScaled, array< HitZone > targetHitZones)
void SupplySecondaryExplosion(notnull Instigator instigator)
Spawn supply secondary explosion when vehicle becomes destroyed.
const float SIMULATION_IMPRECISION_MULTIPLIER
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.
int GetHitZonesOfGroupsFromOwner(notnull array< EHitZoneGroup > hitZoneGroups, out notnull array< HitZone > groupHitZones)
void GetRegeneratingHitZones(out notnull array< SCR_RegeneratingHitZone > regeneratingHitZones)
Return hit zones with passive regeneration enabled.
float GetHitZonesDamage(float untilThresholdScaled=1, array< HitZone > alternativeHitZones=null)
float GetSingleHitZonesHealthScaled(array< HitZone > alternativeHitZones=null, bool getLowestHealth=true)
notnull SCR_DamageManagerData GetScriptedDamageManagerData()
ResourceName GetSecondaryExplosion(float value, SCR_ESecondaryExplosionType explosionType, EResourceType resourceType=EResourceType.SUPPLIES, bool fire=false, out bool hasData=false)
Determine secondary explosion prefab based on explosion value, type and resource type if defined.
int GetHitZonesOfGroupFromOwner(EHitZoneGroup hitZoneGroup, out notnull array< HitZone > groupHitZones, bool clearArray=true)
vector GetSecondaryExplosionPosition(typename hitZoneType, out float totalWeight=0)
Get weighed average position of explosion for hitzones of specified type.
void GetPhysicalHitZones(out notnull array< HitZone > physicalHitZones)
Return hit zones with colliders assigned.
void FuelSecondaryExplosion(notnull Instigator instigator)
Spawn fuel secondary explosion when vehicle becomes destroyed.
void ConnectToFireDamageSystem()
void SecondaryExplosion(ResourceName prefabName, notnull Instigator instigator, notnull EntitySpawnParams spawnParams)
Spawn secondary explosion.
void DamageRandomHitZones(float damage, EDamageType type, notnull Instigator instigator, bool onlyPhysical=true, vector outMat[3]={}, bool damageDefault=false)
void ~SCR_DamageManagerComponent()
void Kill(notnull Instigator instigator)
SCR_ResourceEncapsulator GetResourceEncapsulator(EResourceType suppliesType=EResourceType.SUPPLIES)
void ReduceSmoke()
Reduce smoke output based on the total health of hit zones.
int m_iTimetickInstigator
int m_iTimeThresholdInstigatorReplacement
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.
int GetHitZonesOfGroups(notnull array< EHitZoneGroup > hitZoneGroups, out notnull array< HitZone > groupHitZones)
void DisconnectFromFireDamageSystem()
void RpcDo_SetFireState(int hitZoneIndex, SCR_EBurningState fireState)
float GetGroupDamageOverTime(ECharacterHitZoneGroup hitZoneGroup, EDamageType damageType)
float GetHitZonesHealthScaled(array< HitZone > alternativeHitZones=null)
float GetMinDestroyDamage(EDamageType damageType, array< HitZone > hitzones)
int m_iDamageManagerDataIndex
int GetHitZonesOfGroup(EHitZoneGroup hitZoneGroup, out notnull array< HitZone > groupHitZones, bool clearArray=true)
float HealHitZones(float healthToDistribute, bool sequential=false, float maxHealThresholdScaled=1, array< HitZone > alternativeHitZones=null)
void RpcDo_SetFireState_(int hitZoneIndex, SCR_EBurningState fireState)
SCR_DestructibleEntityClass MIN_MOMENTUM_RESPONSE_INDEX
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
Get all prefabs that have the spawner data
void SCR_FactionManager(IEntitySource src, IEntity parent)
override float GetSecondaryExplosionScale()
override void OnDamageStateChanged(EDamageState newState, EDamageState previousDamageState, bool isJIP)
void ParticleEffectEntity(IEntitySource src, IEntity parent)
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
override bool ShouldOverrideInstigator(notnull Instigator currentInstigator, notnull Instigator newInstigator)
SCR_ESecondaryExplosionType
Exploding material type.
override void FullHeal(bool ignoreHealingDOT=true)
override bool CanBeHealed(bool ignoreHealingDOT=true)
Return true if there is damage that can be repaired.
override void UpdateFireDamage(float timeSlice)
int GetSurroundingHitzones(vector position, notnull Physics physics, float maxDistance, EDamageType damageType, out notnull array< HitZone > outHitZones, out float hitZonesDistancePercentSum=0, out map< HitZone, float > outHitZoneDistanceProcentageMap=null)
void OnDamageOverTimeRemoved(EDamageType dType, HitZone hz)
void OnDamageOverTimeAdded(EDamageType dType, float dps, HitZone hz)
enum EVehicleType IEntity
SCR_VehicleDamageManagerComponent GetDamageManager()
void Unregister(SCR_DamageManagerComponent component)
void Register(SCR_DamageManagerComponent component)
proto external WorldEditorAPI _WB_GetEditorAPI()
This returns world editor API, which is safe to use from editor events bellow.
event float ComputeEffectiveDamage(notnull BaseDamageContext damageContext, bool isDOT)
proto external Managed FindComponent(typename typeName)
proto external Physics GetPhysics()
proto external BaseWorld GetWorld()
proto external vector CoordToLocal(vector coord)
proto external IEntity GetRootParent()
PointInfo - allows to define position.
Object holding reference to resource. In destructor release the resource.
SCR_SecondaryExplosions GetSecondaryExplosions()
ref SCR_SecondaryExplosions m_SecondaryExplosions
ref map< EHitZoneGroup, ref array< int > > m_mHitZoneGroupMap
bool GetBurnStateForHealth(float health, out SCR_EBurningState state)
array< int > GetGroupHitZoneIds(EHitZoneGroup hitZoneGroup)
void InitPrefabData(notnull IEntity owner, notnull SCR_DamageManagerComponent dmgManager)
ref SCR_RepairConfig m_RepairConfig
SCR_SecondaryExplosions GetSecondaryFires()
ref SCR_SecondaryExplosions m_SecondaryFires
ScriptInvoker GetOnDamageOverTimeRemoved(bool createNew=true)
ScriptInvoker GetOnDamageStateChanged(bool createNew=true)
ScriptInvoker GetOnDamageOverTimeAdded(bool createNew=true)
ScriptInvoker GetOnDamage(bool createNew=true)
float GetSecondaryExplosionScale()
Get secondary explosion desired scale. It will determine the prefab retrieved from secondary explosio...
PointInfo GetSecondaryExplosionPoint()
Get secondary explosion desired scale. It will determine the prefab retrieved from secondary explosio...
void ApplyDamagePassRules(notnull BaseDamageContext damageContext)
EHitZoneGroup GetHitZoneGroup()
static void StopParticleEmissionAndLights(notnull ParticleEffectEntity particleEntity, int lightEmitterID=0)
bool SetResourceValue(float value, bool notifyChange=true)
SCR_ResourceEncapsulator GetResourceEncapsulator()
SCR_ResourceContainer GetContainerAt(int index)
override float GetAggregatedResourceValue()
override SCR_ResourceContainerQueueBase GetContainerQueue()
override int GetContainerCount()
IEntity GetOwner()
Owner entity of the fuel tank.
SCR_FieldOfViewSettings Attribute
proto external EParticleEffectState GetState()
BaseProjectileComponentClass GameComponentClass GetInstigator()
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.