DayZ
1.24
Toggle main menu visibility
Main Page
Topics
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
w
x
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
•
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Modules
Loading...
Searching...
No Matches
ActionTurnOffWhileOnGround.c
Go to the documentation of this file.
1
class
ActionTurnOffWhileOnGround
:
ActionInteractBase
2
{
3
void
ActionTurnOffWhileOnGround
()
4
{
5
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_INTERACTONCE;
6
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_CROUCH |
DayZPlayerConstants
.STANCEMASK_ERECT;
7
m_Text
=
"#switch_off"
;
8
}
3
void
ActionTurnOffWhileOnGround
() {
…
}
9
10
override
bool
ActionCondition
(
PlayerBase
player
, ActionTarget
target
,
ItemBase
item
)
11
{
12
EntityAI
target_entity
=
EntityAI
.Cast(
target
.GetObject());
13
14
InventoryLocation
loc
=
new
InventoryLocation
;
15
target_entity
.GetInventory().GetCurrentInventoryLocation(
loc
);
16
17
return
(
player
.IsAlive() &&
target_entity
.HasEnergyManager() &&
target_entity
.GetCompEM().CanSwitchOff()) &&
loc
.GetType() ==
InventoryLocationType
.GROUND);
18
}
10
override
bool
ActionCondition
(
PlayerBase
player
, ActionTarget
target
,
ItemBase
item
) {
…
}
19
20
override
void
OnExecuteServer
(
ActionData
action_data
)
21
{
22
EntityAI
target_entity
=
EntityAI
.Cast(
action_data
.m_Target.GetObject());
23
24
if
(
target_entity
.GetCompEM().CanSwitchOff())
25
{
26
target_entity
.GetCompEM().SwitchOff();
27
28
InformPlayers
(
action_data
.m_Player,
action_data
.m_Target,
UA_FINISHED
);
//Success
29
}
30
else
31
{
32
InformPlayers
(
action_data
.m_Player,
action_data
.m_Target,
UA_FAILED
);
//Already turned off
33
}
34
}
20
override
void
OnExecuteServer
(
ActionData
action_data
) {
…
}
35
}
1
class
ActionTurnOffWhileOnGround
:
ActionInteractBase
{
…
};
m_Text
string m_Text
Definition
ActionBase.c:49
InformPlayers
void InformPlayers(PlayerBase player, ActionTarget target, int state)
DEPRECATED delivers message ids to clients based on given context.
m_StanceMask
int m_StanceMask
Definition
ActionBase.c:53
InventoryLocationType
InventoryLocationType
types of Inventory Location
Definition
InventoryLocation.c:4
ActionData
Definition
ActionBase.c:21
ActionInteractBase
Definition
ActionInteractBase.c:50
ActionTurnOffWhileOnGround
Definition
ActionTurnOffWhileOnGround.c:2
ActionTurnOffWhileOnGround::OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition
ActionTurnOffWhileOnGround.c:20
ActionTurnOffWhileOnGround::ActionTurnOffWhileOnGround
void ActionTurnOffWhileOnGround()
Definition
ActionTurnOffWhileOnGround.c:3
ActionTurnOffWhileOnGround::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
ActionTurnOffWhileOnGround.c:10
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
AnimatedActionBase.c:122
EntityAI
Definition
Building.c:6
InventoryLocation
InventoryLocation.
Definition
InventoryLocation.c:28
ItemBase
Definition
InventoryItem.c:697
Param3
Definition
EntityAI.c:95
PlayerBase
Definition
PlayerBaseClient.c:2
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:597
UA_FINISHED
const int UA_FINISHED
Definition
constants.c:436
UA_FAILED
const int UA_FAILED
Definition
constants.c:433
scripts
4_World
Classes
UserActionsComponent
Actions
Interact
ActionTurnOffWhileOnGround.c
Generated by
1.10.0