DayZ
1.24
Loading...
Searching...
No Matches
PainkillerTablets.c
Go to the documentation of this file.
1
class
PainkillerTablets
extends
Edible_Base
2
{
3
override
void
SetActions
()
4
{
5
super
.SetActions();
6
7
AddAction
(ActionForceConsumeSingle);
8
AddAction
(
ActionEatTabletFromWrapper
);
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
}
AddAction
void AddAction(typename actionName)
Definition
AdvancedCommunication.c:212
ActionEatTabletFromWrapper
Definition
ActionEatTabletFromWrapper.c:2
Edible_Base
Definition
Edible_Base.c:2
Edible_Base::OnConsume
override void OnConsume(float amount, PlayerBase consumer)
Definition
PainkillerTablets.c:11
Edible_Base::SetActions
override void SetActions()
Definition
PainkillerTablets.c:3
Param3
Definition
EntityAI.c:95
PlayerBase
Definition
PlayerBaseClient.c:2
eModifiers
eModifiers
Definition
eModifiers.c:2
scripts
4_World
Entities
ItemBase
Edible_Base
PainkillerTablets.c
Generated by
1.10.0