Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_CharacterHitZoneSelector.c
Go to the documentation of this file.
2{
3 [Attribute(defvalue: ECharacterHitZoneGroup.VIRTUAL.ToString(), desc: "Character hit zone group.\nThis will try to return compatible hit zone, but only for characters, and for other entities it will return null.\nWhen radom selection is enabled, then game will choose random hit zone from the ones found for this group.", uiwidget: UIWidgets.ComboBox, enumType: ECharacterHitZoneGroup)]
5
6 //------------------------------------------------------------------------------------------------
7 override HitZone SelectHitZone(SCR_DamageManagerComponent dmgMgr, SCR_EHitZoneSelectionMode hitZoneSelectionMode)
8 {
10 if (!characterDmgMgr)
11 return null;
12
13 array<HitZone> groupedHitZones = {};
14 int count = dmgMgr.GetHitZonesOfGroup(m_eHitZoneGroup, groupedHitZones);
15 if (count < 1)
16 return null;
17
18 if (count == 1 || hitZoneSelectionMode == SCR_EHitZoneSelectionMode.DEFAULT || hitZoneSelectionMode == SCR_EHitZoneSelectionMode.FIRST_PHYSICAL)
19 return groupedHitZones[0];
20
21 return groupedHitZones.GetRandomElement();
22 }
23}
SCR_EHitZoneSelectionMode
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
override HitZone SelectHitZone(SCR_DamageManagerComponent dmgMgr, SCR_EHitZoneSelectionMode hitZoneSelectionMode)
SCR_FieldOfViewSettings Attribute