Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionlockeddoors.c
Go to the documentation of this file.
1
class
ActionLockedDoors
:
ActionInteractBase
2
{
3
void
ActionLockedDoors
()
4
{
5
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_OPENDOORFW;
6
//m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
7
m_Text
=
"#open"
;
8
}
9
10
override
void
CreateConditionComponents
()
11
{
12
m_ConditionItem
=
new
CCINone
;
13
m_ConditionTarget
=
new
CCTCursor
;
14
}
15
16
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item )
17
{
18
if
( !target )
return
false
;
19
//if( IsDamageDestroyed(action_data.m_Target) ) return false;
20
if
( !
IsBuilding
(target) )
return
false
;
21
if
( !
IsInReach
(player, target,
UAMaxDistances
.
DEFAULT
) )
return
false
;
22
23
Building
building;
24
if
(
Class
.
CastTo
(building, target.GetObject()) )
25
{
26
int
doorIndex = building.
GetDoorIndex
(target.GetComponentIndex());
27
if
( doorIndex != -1 )
28
{
29
return
building.
IsDoorLocked
(doorIndex);
30
}
31
}
32
return
false
;
33
}
34
35
override
void
OnExecute
(
ActionData
action_data )
36
{
37
Building
building;
38
if
(
Class
.
CastTo
(building, action_data.m_Target.GetObject()) )
39
{
40
int
doorIndex = building.
GetDoorIndex
(action_data.m_Target.GetComponentIndex());
41
if
( doorIndex != -1 )
42
{
43
building.
OpenDoor
(doorIndex);
44
}
45
}
46
}
47
};
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionTarget
class ActionTargets ActionTarget
ActionBase::m_Text
string m_Text
Definition
actionbase.c:64
ActionBase::IsInReach
bool IsInReach(PlayerBase player, ActionTarget target, float maxDistance=1.0)
Definition
actionbase.c:1181
ActionBase::IsBuilding
bool IsBuilding(ActionTarget target)
Definition
actionbase.c:1171
ActionBase::m_ConditionItem
ref CCIBase m_ConditionItem
Definition
actionbase.c:70
ActionBase::m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
actionbase.c:71
ActionInteractBase::ActionInteractBase
void ActionInteractBase()
Definition
actioninteractbase.c:43
ActionLockedDoors::CreateConditionComponents
override void CreateConditionComponents()
Definition
actionlockeddoors.c:10
ActionLockedDoors::OnExecute
override void OnExecute(ActionData action_data)
Definition
actionlockeddoors.c:35
ActionLockedDoors::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionlockeddoors.c:16
ActionLockedDoors::ActionLockedDoors
void ActionLockedDoors()
Definition
actionlockeddoors.c:3
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
animatedactionbase.c:143
Building
Definition
building.c:11
Building::GetDoorIndex
proto native int GetDoorIndex(int componentIndex)
Gets the index of the door based on the view geometry component index.
Building::IsDoorLocked
proto native bool IsDoorLocked(int index)
When the door is locked.
Building::OpenDoor
proto native void OpenDoor(int index)
Attempts to open the door.
CCINone
Definition
ccinone.c:2
CCTCursor
Definition
cctcursor.c:2
Class
Super root of all classes in Enforce script.
Definition
enscript.c:11
ItemBase
Definition
inventoryitem.c:742
PlayerBase
Definition
playerbaseclient.c:2
UAMaxDistances
Definition
actionconstants.c:110
UAMaxDistances::DEFAULT
const float DEFAULT
Definition
actionconstants.c:112
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
Class::CastTo
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
interact
actionlockeddoors.c
Generated by
1.17.0