Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
trap_fishnet.c
Go to the documentation of this file.
1
class
Trap_FishNet
extends
TrapSpawnBase
2
{
3
override
void
InitTrapValues
()
4
{
5
super.InitTrapValues();
6
7
m_DefectRate
= 2.5;
//Added damage after trap activation
8
9
m_InitWaitTimeMin = 120;
10
m_InitWaitTimeMax = 180;
11
m_UpdateWaitTime = 30;
12
m_SpawnUpdateWaitTime = 30;
13
m_MaxActiveTime = 1200;
14
m_IsFoldable =
true
;
15
16
m_MinimalDistanceFromPlayersToCatch = 15;
17
18
m_AnimationPhaseSet
=
"inventory"
;
19
m_AnimationPhaseTriggered
=
"placing"
;
20
m_AnimationPhaseUsed =
"triggered"
;
21
}
22
23
override
void
InitCatchingComponent
()
24
{
25
if
(!m_CatchingContext)
26
{
27
int
updateCount = m_MaxActiveTime/m_UpdateWaitTime;
28
Param2<EntityAI,int>
par =
new
Param2<EntityAI,int>
(
this
,updateCount);
29
m_CatchingContext =
new
CatchingContextTrapFishLarge
(par);
30
}
31
32
super.InitCatchingComponent();
33
}
34
35
//========================================================
36
//============= PLACING AND INVENTORY EVENTS =============
37
//========================================================
38
39
override
bool
IsPlaceableAtPosition
(
vector
position )
40
{
41
return
IsSurfaceWater( position );
42
}
43
44
override
bool
CanReceiveAttachment
(
EntityAI
attachment,
int
slotId )
45
{
46
if
( !attachment.IsInherited( Worm ) )
47
return
false
;
48
49
return
super.CanReceiveAttachment( attachment, slotId );
50
}
51
52
#ifdef PLATFORM_WINDOWS
53
// How one sees the tripwire when in vicinity
54
override
int
GetViewIndex()
55
{
56
if
( MemoryPointExists(
"invView2"
) )
57
{
58
InventoryLocation
il =
new
InventoryLocation
;
59
GetInventory().GetCurrentInventoryLocation( il );
60
InventoryLocationType
type = il.
GetType
();
61
switch
( type )
62
{
63
case
InventoryLocationType
.CARGO:
64
{
65
return
0;
66
}
67
case
InventoryLocationType
.ATTACHMENT:
68
{
69
return
1;
70
}
71
case
InventoryLocationType
.HANDS:
72
{
73
return
0;
74
}
75
case
InventoryLocationType
.GROUND:
76
{
77
// Different view index depending on deployment state
78
if
(
IsActive
() )
79
return
1;
80
81
// When folded
82
return
0;
83
}
84
case
InventoryLocationType
.PROXYCARGO:
85
{
86
return
0;
87
}
88
default
:
89
{
90
if
(
IsActive
() )
91
return
1;
92
93
// When folded
94
return
0;
95
}
96
}
97
}
98
return
0;
99
}
100
#endif
101
102
//================================================================
103
// ADVANCED PLACEMENT
104
//================================================================
105
override
bool
IsDeployable
()
106
{
107
return
true
;
108
}
109
110
override
string
GetDeploySoundset
()
111
{
112
return
"placeFishNetTrap_SoundSet"
;
113
}
114
115
override
string
GetLoopDeploySoundset
()
116
{
117
return
"fishnet_deploy_SoundSet"
;
118
}
119
}
120
121
class
FishNetTrap
extends
Trap_FishNet
122
{
123
124
}
CatchingContextTrapFishLarge
Definition
catchingcontexttraps.c:254
EntityAI
Definition
inventoryitem.c:2
InventoryLocation
InventoryLocation.
Definition
inventorylocation.c:30
InventoryLocation::GetType
proto native int GetType()
returns type of InventoryLocation
Param2
Definition
ppeconstants.c:68
TrapSpawnBase
Definition
trap_fishnet.c:2
TrapSpawnBase::GetDeploySoundset
override string GetDeploySoundset()
Definition
trap_fishnet.c:110
TrapSpawnBase::GetLoopDeploySoundset
override string GetLoopDeploySoundset()
Definition
trap_fishnet.c:115
TrapSpawnBase::InitTrapValues
override void InitTrapValues()
Definition
trap_fishnet.c:3
TrapSpawnBase::IsDeployable
override bool IsDeployable()
Definition
trap_fishnet.c:105
TrapSpawnBase::CanReceiveAttachment
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
Definition
trap_fishnet.c:44
TrapSpawnBase::InitCatchingComponent
override void InitCatchingComponent()
Definition
trap_fishnet.c:23
TrapSpawnBase::IsPlaceableAtPosition
override bool IsPlaceableAtPosition(vector position)
Definition
trap_fishnet.c:39
vector
Definition
enconvert.c:119
InventoryLocationType
InventoryLocationType
types of Inventory Location
Definition
inventorylocation.c:4
IsActive
bool IsActive()
Definition
modifierbase.c:130
m_AnimationPhaseTriggered
string m_AnimationPhaseTriggered
Definition
trapbase.c:34
m_DefectRate
float m_DefectRate
Definition
trapbase.c:19
m_AnimationPhaseSet
string m_AnimationPhaseSet
Definition
trapbase.c:33
Games
Dayz
scripts
4_world
entities
itembase
trapspawnbase
trap_fishnet.c
Generated by
1.17.0