DayZ 1.24
Loading...
Searching...
No Matches
CharcoalMdfr.c
Go to the documentation of this file.
2{
3 float m_Killrate;
4 const int CHARCOAL_LIFETIME = 300;
5 const int CHARCOAL_EFFECT_TIME = 100;
6
7 override void Init()
8 {
10 m_IsPersistent = true;
11 m_ID = eModifiers.MDF_CHARCOAL;
14 m_Killrate = 2.85; // # of killed agents per sec
16 }
17
19 {
20 return false;
21 }
22
24 {
26 }
27
28 /*
29 override string GetDebugText()
30 {
31
32 string text;
33 float time_till_effective = CHARCOAL_LIFETIME - CHARCOAL_EFFECT_TIME - GetAttachedTime();
34
35 text = "time till effective: " + time_till_effective.ToString() + "\n";
36
37 if(time_till_effective > 0)
38 text += "killing agents:" + "NO";
39 else
40 text += "killing agents:" + "YES";
41
42
43 return text;
44
45 }
46 */
47
48
49 override string GetDebugTextSimple()
50 {
51 return ((int)(CHARCOAL_LIFETIME - GetAttachedTime())).ToString() + " | " + (((int)(CHARCOAL_LIFETIME - CHARCOAL_EFFECT_TIME - GetAttachedTime())) * -1).ToString();
52 }
53
55 {
56 player.IncreaseHealingsCount();
57
58 }
59
61 {
62 player.DecreaseHealingsCount();
63
64 }
65
67 {
69
71 return true;
72 else
73 return false;
74 }
75
76 override void OnTick(PlayerBase player, float deltaT)
77 {
79 player.m_AgentPool.AddAgent(eAgents.SALMONELLA, -m_Killrate * deltaT);
80 }
81};
Param3 int
eAgents
Definition EAgents.c:3
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
proto string ToString()
bool m_TrackActivatedTime
float GetAttachedTime()
void DisableActivateCheck()
float m_TickIntervalActive
float m_TickIntervalInactive
bool m_IsPersistent
const int DEFAULT_TICK_TIME_INACTIVE
override void OnActivate(PlayerBase player)
override string GetDebugTextSimple()
float m_Killrate
Definition CharcoalMdfr.c:3
override void Init()
Definition CharcoalMdfr.c:7
override void OnDeactivate(PlayerBase player)
override bool ActivateCondition(PlayerBase player)
override void OnReconnect(PlayerBase player)
override bool DeactivateCondition(PlayerBase player)
const int CHARCOAL_EFFECT_TIME
Definition CharcoalMdfr.c:5
const int CHARCOAL_LIFETIME
Definition CharcoalMdfr.c:4
override void OnTick(PlayerBase player, float deltaT)
eModifiers
Definition eModifiers.c:2
class HumanMovementState OnActivate()
HumanCommandScript fully scriptable command.
Definition human.c:1167