DayZ 1.24
Loading...
Searching...
No Matches
HeartAttack.c
Go to the documentation of this file.
2{
3 private const float HEALTH_DECREMENT_PER_SEC = -0.2;
4 private const float SHOCK_DECREMENT_PER_SEC = -2;
5 private const float SHOCK_LIMIT = 0;
6
18 {
19 return false;
20 }
21
23 {
24 }
25
27 {
28 return false;
29 }
30
31 override void OnTick(PlayerBase player, float deltaT)
32 {
33 if (player.GetHealth("GlobalHealth", "Shock") <= SHOCK_LIMIT)
34 {
35 float currenthealth = player.GetHealth("GlobalHealth", "Health");
36 player.AddHealth("GlobalHealth", "Health", HEALTH_DECREMENT_PER_SEC * deltaT);
37 }
38 else
39 {
40 float currentshock = player.GetHealth("GlobalHealth", "Shock");
41 player.AddHealth("GlobalHealth", "Shock", SHOCK_DECREMENT_PER_SEC * deltaT);
42 }
43 }
44};
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
bool m_TrackActivatedTime
void DisableDeactivateCheck()
void DisableActivateCheck()
float m_TickIntervalActive
float m_TickIntervalInactive
bool m_IsPersistent
const int DEFAULT_TICK_TIME_INACTIVE
const int DEFAULT_TICK_TIME_ACTIVE
override bool ActivateCondition(PlayerBase player)
Definition HeartAttack.c:17
const float HEALTH_DECREMENT_PER_SEC
Definition HeartAttack.c:3
override void Init()
Definition HeartAttack.c:7
override bool DeactivateCondition(PlayerBase player)
Definition HeartAttack.c:26
const float SHOCK_LIMIT
Definition HeartAttack.c:5
const float SHOCK_DECREMENT_PER_SEC
Definition HeartAttack.c:4
override void OnActivate(PlayerBase player)
Definition HeartAttack.c:22
override void OnTick(PlayerBase player, float deltaT)
Definition HeartAttack.c:31
eModifiers
Definition eModifiers.c:2