Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
painlightstate.c
Go to the documentation of this file.
1class PainLightSymptom extends SymptomBase
2{
3 //this is just for the Symptom parameters set-up and is called even if the Symptom doesn't execute, don't put any gameplay code in here
4 override void OnInit()
5 {
7 m_Priority = 1;
8 m_ID = SymptomIDs.SYMPTOM_PAIN_LIGHT;
9 m_SyncToClient = true;
10 m_MaxCount = 2;
11 m_Duration = 1;
12 }
13
15 override void OnUpdateServer(PlayerBase player, float deltatime)
16 {
17
18 }
19
20 override void OnUpdateClient(PlayerBase player, float deltatime)
21 {
22 }
23
24 override void OnAnimationPlayFailed()
25 {
26
27 }
28
29 override bool CanActivate()
30 {
31 return true;
32 }
33
35 override void OnGetActivatedServer(PlayerBase player)
36 {
38 Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetActivated", m_Player.ToString());
39
40 PlaySound(EPlayerSoundEventID.TAKING_DMG_LIGHT);
41 }
42
44 override void OnGetActivatedClient(PlayerBase player)
45 {
46 //player.SpawnShockEffect(0.5);
49 player.SpawnDamageDealtEffect2(CachedObjectsParams.PARAM2_FLOAT_FLOAT);
50 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetActivated", m_Player.ToString());
51 }
52
54 override void OnGetDeactivatedServer(PlayerBase player)
55 {
56 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetDeactivated", m_Player.ToString());
57 }
58
60 override void OnGetDeactivatedClient(PlayerBase player)
61 {
62 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetDeactivated", m_Player.ToString());
63 }
64}
static ref Param2< float, float > PARAM2_FLOAT_FLOAT
Definition debug.c:2
static void SymptomLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Definition debug.c:192
static bool IsSymptomLogEnable()
Definition debug.c:806
override void OnInit()
bool m_SyncToClient
Definition statebase.c:21
override void OnUpdateClient(PlayerBase player, float deltatime)
override void OnGetDeactivatedServer(PlayerBase player)
only gets called once on an active Symptom that is being deactivated
int m_Priority
Definition statebase.c:4
override void OnGetActivatedServer(PlayerBase player)
gets called once on an Symptom which is being activated
int m_SymptomType
Definition statebase.c:18
override void OnGetActivatedClient(PlayerBase player)
gets called once on a Symptom which is being activated
PlayerBase m_Player
Definition statebase.c:8
override void OnGetDeactivatedClient(PlayerBase player)
only gets called once on an active Symptom that is being deactivated
int m_MaxCount
Definition statebase.c:24
override void OnAnimationPlayFailed()
override void OnUpdateServer(PlayerBase player, float deltatime)
gets called every frame
override bool CanActivate()
float m_Duration
Definition statebase.c:22
proto string ToString()
void PlaySound()
SymptomTypes