Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
healthnotfr.c
Go to the documentation of this file.
2{
3 /*
4 private const float HEALTHY_BLOOD_TRESHOLD = 5000;
5 private const float HEALTHY_TRESHOLD = 5000;
6 private const float HEALING_ENERGY_TRESHOLD = 4000;
7 private const float HEALING_WATER_TRESHOLD = 2500;
8 private const float HEALING_BLOOD_TRESHOLD = 5000;
9 */
10 private const float DEC_TRESHOLD_LOW = 0;
11 private const float DEC_TRESHOLD_MED = -0.7;
12 private const float DEC_TRESHOLD_HIGH = -1.3;
13 private const float INC_TRESHOLD_LOW = 0;
14 private const float INC_TRESHOLD_MED = 0.7;
15 private const float INC_TRESHOLD_HIGH = 1.3;
16
17
19 {
20 m_TickInterval = 3000;
22 }
23
24 override int GetNotifierType()
25 {
26 return eNotifiers.NTF_HEALTHY;
27 }
28
29 override void DisplayTendency(float delta)
30 {
32 //PrintString("tendency:" + tendency);
33 //GetVirtualHud().SetStatus(eDisplayElements.DELM_TDCY_HEALTH,tendency);
34
35 //DSLevels level = DetermineLevel( GetObservedValue(), PlayerConstants.THRESHOLD_HEALTH_WARNING, PlayerConstants.THRESHOLD_HEALTH_CRITICAL, PlayerConstants.THRESHOLD_HEALTH_BLINKING, PlayerConstants.THRESHOLD_HEALTH_EXTRA);
36
37 EStatLevels health_level = m_Player.GetStatLevelHealth();
38 DisplayElementTendency dis_elm = DisplayElementTendency.Cast(GetVirtualHud().GetElement(eDisplayElements.DELM_TDCY_HEALTH));
39
40 if( dis_elm )
41 {
42 dis_elm.SetSeriousnessLevel(health_level);
43 dis_elm.SetTendency(tendency);
44 }
45 }
46
47 override protected float GetObservedValue()
48 {
49 return m_Player.GetHealth("","Health");
50 }
51};
const float DEC_TRESHOLD_MED
Definition healthnotfr.c:11
float GetObservedValue()
Definition healthnotfr.c:47
override void DisplayTendency(float delta)
Definition healthnotfr.c:29
const float INC_TRESHOLD_LOW
Definition healthnotfr.c:13
const float DEC_TRESHOLD_HIGH
Definition healthnotfr.c:12
const float INC_TRESHOLD_MED
Definition healthnotfr.c:14
const float DEC_TRESHOLD_LOW
Definition healthnotfr.c:10
void HealthNotfr(NotifiersManager manager)
Definition healthnotfr.c:18
override int GetNotifierType()
Definition healthnotfr.c:24
const float INC_TRESHOLD_HIGH
Definition healthnotfr.c:15
int CalculateTendency(float delta, float inctresholdlow, float inctresholdmed, float inctresholdhigh, float dectresholdlow, float dectresholdmed, float dectresholdhigh)
PlayerBase m_Player
Definition notifierbase.c:5
VirtualHud GetVirtualHud()
void NotifierBase(NotifiersManager manager)
int m_TendencyBufferSize
Definition notifierbase.c:8
DisplayElementBase GetElement(eDisplayElements element_id)
EStatLevels
Definition estatlevels.c:2
void NotifiersManager(PlayerBase player)
eNotifiers