Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_BandageUserAction.c
Go to the documentation of this file.
2 {
3 
4  //------------------------------------------------------------------------------------------------
7  override void OnActionCanceled(IEntity pOwnerEntity, IEntity pUserEntity)
8  {
9  ChimeraCharacter character = ChimeraCharacter.Cast(pUserEntity);
10  if (!character)
11  return;
12 
13  CharacterControllerComponent controller = character.GetCharacterController();
14  if (!controller)
15  return;
16 
17  if (controller.GetLifeState() != ECharacterLifeState.ALIVE)
18  return;
19 
20  SCR_ConsumableItemComponent consumableComponent = GetConsumableComponent(character);
21  if (consumableComponent)
22  consumableComponent.SetAlternativeModel(false);
23  }
24 
25  //------------------------------------------------------------------------------------------------
26  override bool CanBeShownScript(IEntity user)
27  {
28  if (!super.CanBeShownScript(user))
29  return false;
30 
31  // Target character
32  ChimeraCharacter targetCharacter = ChimeraCharacter.Cast(GetOwner());
33  if (!targetCharacter)
34  return false;
35 
36  SCR_CharacterDamageManagerComponent charDamMan = SCR_CharacterDamageManagerComponent.Cast(targetCharacter.GetDamageManager());
37  if (!charDamMan || charDamMan.GetGroupDamageOverTime(m_eHitZoneGroup, EDamageType.BLEEDING) == 0)
38  {
39  SetCannotPerformReason(m_sNotBleeding);
40  return false;
41  }
42 
43  return true;
44  }
45 };
m_eHitZoneGroup
protected ECharacterHitZoneGroup m_eHitZoneGroup
Definition: SCR_InventoryHitZonePointUI.c:403
ECharacterLifeState
ECharacterLifeState
Definition: ECharacterLifeState.c:12
SCR_HealingUserAction
Definition: SCR_HealingUserAction.c:1
SCR_CharacterDamageManagerComponent
Definition: SCR_CharacterDamageManagerComponent.c:18
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
SCR_BandageUserAction
Definition: SCR_BandageUserAction.c:1
EDamageType
EDamageType
Definition: EDamageType.c:12