DayZ 1.24
Loading...
Searching...
No Matches
PainkillerTablets.c
Go to the documentation of this file.
2{
3 override void SetActions()
4 {
5 super.SetActions();
6
7 AddAction(ActionForceConsumeSingle);
9 }
10
11 override void OnConsume(float amount, PlayerBase consumer)
12 {
13 if (consumer.GetModifiersManager().IsModifierActive(eModifiers.MDF_PAINKILLERS)) // effectively resets the timer
14 consumer.GetModifiersManager().DeactivateModifier(eModifiers.MDF_PAINKILLERS, false);
15
16 consumer.GetModifiersManager().ActivateModifier(eModifiers.MDF_PAINKILLERS);
17 }
18}
void AddAction(typename actionName)
override void OnConsume(float amount, PlayerBase consumer)
override void SetActions()
eModifiers
Definition eModifiers.c:2