Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
brokenarms.c
Go to the documentation of this file.
2 {
3  private const float HEALTHY_ARM = 80;
4 
5  override void Init()
6  {
7  m_TrackActivatedTime = false;
8  m_ID = eModifiers.MDF_BROKEN_ARMS;
11  }
12 
13  override bool ActivateCondition(PlayerBase player)
14  {
15  if ( player.GetHealth("RightArm", "Health") <= 0 || player.GetHealth("LeftArm", "Health") <= 0 )
16  {
17  return true;
18  }
19  return false;
20  }
21 
22  override void OnActivate(PlayerBase player)
23  {
24  // player.setBrokenLimbs("Arms",true);
25  }
26 
27  override void OnDeactivate(PlayerBase player)
28  {
29  // player.setBrokenLimbs("Arms",false);
30  }
31 
32  override bool DeactivateCondition(PlayerBase player)
33  {
34  if ( player.GetHealth("RightArm", "Health") >= HEALTHY_ARM && player.GetHealth("LeftArm", "Health") >= HEALTHY_ARM )
35  {
36  return true;
37  }
38  else
39  {
40  return false;
41  }
42  }
43 };
m_TickIntervalActive
float m_TickIntervalActive
Definition: modifierbase.c:19
m_TrackActivatedTime
bool m_TrackActivatedTime
Definition: modifierbase.c:15
DEFAULT_TICK_TIME_ACTIVE
const int DEFAULT_TICK_TIME_ACTIVE
Definition: modifiersmanager.c:31
PlayerBase
Definition: playerbaseclient.c:1
m_TickIntervalInactive
float m_TickIntervalInactive
Definition: modifierbase.c:18
eModifiers
eModifiers
Definition: emodifiers.c:1
ModifierBase
Definition: breathvapourmdfr.c:3
BrokenArmsMdfr
Definition: brokenarms.c:1
m_ID
protected int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition: effect.c:49
DEFAULT_TICK_TIME_INACTIVE
const int DEFAULT_TICK_TIME_INACTIVE
Definition: modifiersmanager.c:33