3 private const float HEALTH_DECREMENT_PER_SEC = -0.2;
4 private const float SHOCK_DECREMENT_PER_SEC = -2;
5 private const float SHOCK_LIMIT = 0;
17 override bool ActivateCondition(
PlayerBase player)
26 override bool DeactivateCondition(
PlayerBase player)
31 override void OnTick(
PlayerBase player,
float deltaT)
33 if ( player.GetHealth(
"GlobalHealth",
"Shock") <= SHOCK_LIMIT )
35 float currenthealth = player.GetHealth(
"GlobalHealth",
"Health");
36 player.AddHealth(
"GlobalHealth",
"Health" , HEALTH_DECREMENT_PER_SEC * deltaT );
40 float currentshock = player.GetHealth(
"GlobalHealth",
"Shock");
41 player.AddHealth(
"GlobalHealth",
"Shock", SHOCK_DECREMENT_PER_SEC * deltaT);
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
bool m_TrackActivatedTime
overall time this modifier was active
void DisableDeactivateCheck()
void DisableActivateCheck()
float m_TickIntervalActive
float m_TickIntervalInactive
bool m_IsPersistent
should this modifier track overall time it was active ?
const int DEFAULT_TICK_TIME_INACTIVE
enum eModifierSyncIDs DEFAULT_TICK_TIME_ACTIVE