DayZ 1.24
Loading...
Searching...
No Matches
Unconsciousness.c
Go to the documentation of this file.
2{
3 const int UNCONSIOUSS_COOLDOWN_TIME = 60;//in s
4
5 override void Init()
6 {
8 m_ID = eModifiers.MDF_UNCONSCIOUSNESS;
11 }
12
14 {
15 if (player.GetHealth("", "Shock") <= PlayerConstants.UNCONSCIOUS_THRESHOLD)
16 return true;
17 return false;
18 }
19
24
26 {
27 player.m_UnconsciousEndTime = GetGame().GetTime();
29 }
30
31 override string GetDebugText()
32 {
33 string text_pulse = "pulse type:" + m_Player.GetPulseType() + "|";
34 string text_shock = (PlayerConstants.CONSCIOUS_THRESHOLD - m_Player.GetHealth("", "Shock")).ToString();
36 return debug_text;
37 }
38
40 {
41 }
42
44 {
45 if (player.GetHealth("", "Shock") >= PlayerConstants.CONSCIOUS_THRESHOLD && player.GetPulseType() == EPulseType.REGULAR)
46 return true;
47 return false;
48 }
49
50 override void OnTick(PlayerBase player, float deltaT)
51 {
52
53 }
54};
EPulseType
Definition EPulseType.c:2
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
proto string ToString()
DayZPlayer m_Player
Definition Hand_Events.c:42
bool m_TrackActivatedTime
float m_TickIntervalActive
float m_TickIntervalInactive
static void SendPlayerUnconsciousness(DayZPlayer pPlayer, bool enable)
static const float UNCONSCIOUS_THRESHOLD
static const float CONSCIOUS_THRESHOLD
override bool ActivateCondition(PlayerBase player)
override bool DeactivateCondition(PlayerBase player)
override string GetDebugText()
override void Init()
const int UNCONSIOUSS_COOLDOWN_TIME
override void OnActivate(PlayerBase player)
override void OnDeactivate(PlayerBase player)
override void OnReconnect(PlayerBase player)
override void OnTick(PlayerBase player, float deltaT)
eModifiers
Definition eModifiers.c:2
proto native CGame GetGame()