Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
truck_01_cargo.c
Go to the documentation of this file.
1
class
Truck_01_Cargo
extends
Truck_01_Chassis
{};
2
/*
3
{
4
override int GetAnimInstance()
5
{
6
return VehicleAnimInstances.V3S;
7
}
8
9
override int GetSeatAnimationType( int posIdx )
10
{
11
switch( posIdx )
12
{
13
case 0:
14
return DayZPlayerConstants.VEHICLESEAT_DRIVER;
15
case 1:
16
return DayZPlayerConstants.VEHICLESEAT_CODRIVER;
17
}
18
19
return 0;
20
}
21
22
override bool CrewCanGetThrough( int posIdx )
23
{
24
CarDoor carDoor;
25
switch( posIdx )
26
{
27
case 0:
28
Class.CastTo( carDoor, FindAttachmentBySlotName("V3SDriverDoors") );
29
if ( carDoor )
30
{
31
if ( carDoor.GetAnimationPhase("DoorsSource") > 0.5 ) return true;
32
}
33
else
34
{
35
return true;
36
}
37
return false;
38
break;
39
40
case 1:
41
Class.CastTo( carDoor, FindAttachmentBySlotName("V3SCoDriverDoors") );
42
if ( carDoor )
43
{
44
if ( carDoor.GetAnimationPhase("DoorsSource") > 0.5 ) return true;
45
}
46
else
47
{
48
return true;
49
}
50
return false;
51
break;
52
}
53
54
return false;
55
}
56
57
override float OnSound( CarSoundCtrl ctrl, float oldValue )
58
{
59
switch ( ctrl )
60
{
61
case CarSoundCtrl.DOORS:
62
float newValue = 0;
63
64
//-----
65
CarDoor carDoor;
66
Class.CastTo( carDoor, FindAttachmentBySlotName("V3SDriverDoors") );
67
if ( carDoor )
68
{
69
if ( carDoor.GetAnimationPhase("DoorsSource") > 0.5)
70
{
71
newValue = newValue + 0.8;
72
}
73
}
74
else
75
{
76
newValue = newValue + 0.8;
77
}
78
79
//-----
80
Class.CastTo( carDoor, FindAttachmentBySlotName("V3SCoDriverDoors") );
81
if ( carDoor )
82
{
83
if ( carDoor.GetAnimationPhase("DoorsSource") > 0.5)
84
{
85
newValue = newValue + 0.8;
86
}
87
}
88
else
89
{
90
newValue = newValue + 0.8;
91
}
92
93
if ( newValue > 1 )
94
newValue = 1;
95
96
return newValue;
97
break;
98
}
99
100
return oldValue;
101
}
102
103
override string GetAnimSourceFromSelection( string selection )
104
{
105
switch( selection )
106
{
107
case "wheelsideplate1":
108
return "WheelSidePlate1";
109
case "wheelsideplate2":
110
return "WheelSidePlate2";
111
}
112
113
return "";
114
}
115
116
override bool IsVitalCarBattery()
117
{
118
return false;
119
}
120
121
override bool IsVitalSparkPlug()
122
{
123
return false;
124
}
125
126
override bool IsVitalGlowPlug()
127
{
128
return false;
129
}
130
131
override bool IsVitalEngineBelt()
132
{
133
return false;
134
}
135
}
136
*/
Truck_01_Chassis
Definition:
truck_01_cargo.c:1
DAYZ
scripts_v1.24.157551
scripts
world
entities
vehicles
inheritedcars
truck_01_cargo.c
Generated by
1.8.17