Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
tremor.c
Go to the documentation of this file.
2{
3 private const float TREMOR_DECREMENT_PER_SEC = 0.008;
4
5 override void Init()
6 {
8 m_ID = eModifiers.MDF_TREMOR;
11 }
12
13 override bool ActivateCondition(PlayerBase player)
14 {
15 if ( player.GetStatTremor().Get() > player.GetStatTremor().GetMin() )
16 {
17 return true;
18 }
19 else
20 {
21 return false;
22 }
23 }
24
25 override bool DeactivateCondition(PlayerBase player)
26 {
27 if ( player.GetStatTremor().Get() == player.GetStatTremor().GetMin() )
28 {
29 return true;
30 }
31 else
32 {
33 return false;
34 }
35 }
36
37 override void OnTick(PlayerBase player, float deltaT)
38 {
39 player.GetStatTremor().Add( (TREMOR_DECREMENT_PER_SEC*deltaT) );
40
41 //Mirek: SetShakeBodyFactor is removed now, because it worked only on legacy animation system
42 //player.SetShakeBodyFactor(player.GetStatTremor().Get());
43 //_person SetBodyShaking tremor; ASK GAMEPLAY PROGRAMMERS TO EXPOSE THIS ENGINE FUNCTION IN ENSCRIPT
44 //PrintString( "Tremor:" + ToString(tremor) );
45 }
46};
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition effect.c:51
eModifiers
Definition emodifiers.c:2
bool m_TrackActivatedTime
overall time this modifier was active
float m_TickIntervalActive
float m_TickIntervalInactive
const int DEFAULT_TICK_TIME_INACTIVE
enum eModifierSyncIDs DEFAULT_TICK_TIME_ACTIVE