Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
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);
15
16
consumer.GetModifiersManager().ActivateModifier(
eModifiers
.MDF_PAINKILLERS);
17
}
18
}
ActionForceConsumeSingle
void ActionForceConsumeSingle()
Definition
actionforceconsumesingle.c:13
AddAction
void AddAction(typename actionName)
Definition
advancedcommunication.c:220
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
PlayerBase
Definition
playerbaseclient.c:2
eModifiers
eModifiers
Definition
emodifiers.c:2
Games
Dayz
scripts
4_world
entities
itembase
edible_base
painkillertablets.c
Generated by
1.17.0