DayZ 1.24
Loading...
Searching...
No Matches
Burning.c
Go to the documentation of this file.
2{
3 private const float BURNING_TRESHOLD = 199;
4 private const float HEALTH_DECREMENT_PER_SEC = -5;
5
14 {
15 float hc = player.GetStatHeatComfort().Get();
16 if (hc > BURNING_TRESHOLD)
17 return true;
18 else
19 return false;
20 }
21
23 {
24 //Print("My face is melting!");
25 }
26
27
29 {
30 if (player.GetStatHeatComfort().Get() <= BURNING_TRESHOLD)
31 return true;
32 else
33 return false;
34 }
35
36 override void OnTick(PlayerBase player, float deltaT)
37 {
38 float currenthealth = player.GetHealth("GlobalHealth", "Health");
39 player.SetHealth("GlobalHealth", "Health", (currenthealth + (HEALTH_DECREMENT_PER_SEC * deltaT)));
40 //player.GetStatTemperature().Set( player.GetStatTemperature().GetMax() );
41 }
42};
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
bool m_TrackActivatedTime
float m_TickIntervalActive
float m_TickIntervalInactive
const int DEFAULT_TICK_TIME_INACTIVE
const int DEFAULT_TICK_TIME_ACTIVE
override void OnActivate(PlayerBase player)
Definition Burning.c:22
const float BURNING_TRESHOLD
Definition Burning.c:3
override bool ActivateCondition(PlayerBase player)
Definition Burning.c:13
override void Init()
Definition Burning.c:6
override bool DeactivateCondition(PlayerBase player)
Definition Burning.c:28
const float HEALTH_DECREMENT_PER_SEC
Definition Burning.c:4
override void OnTick(PlayerBase player, float deltaT)
Definition Burning.c:36
eModifiers
Definition eModifiers.c:2