914{
918
920 {
921
922
929
930 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
931 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
932 m_CarSeatShiftInSound = "Offroad_SeatShiftIn_SoundSet";
933 m_CarSeatShiftOutSound = "Offroad_SeatShiftOut_SoundSet";
934
937
940
942
944 m_CarHornShortSoundName = "Offroad_Horn_Short_SoundSet";
945 m_CarHornLongSoundName = "Offroad_Horn_SoundSet";
946 }
947
949 {
953 }
954
956 {
957 super.EEInit();
958
960 {
967
970 }
971 }
972
974 {
975 return true;
976 }
977
979 {
980 super.GetElectricitySourceDevice();
981
983 }
984
986 {
987 return "CarBattery";
988 }
989
991 {
992 super.OnEngineStart();
993
995 {
998 }
999 }
1000
1002 {
1003 super.OnEngineStop();
1004
1006 {
1009 }
1010 }
1011
1013 {
1015 {
1017 {
1019 }
1020 }
1021 }
1022
1024 {
1026 }
1027
1029 {
1030 return 3.5;
1031 }
1032
1034 {
1035 switch (posIdx)
1036 {
1037 case 0:
1039 case 1:
1041 case 2:
1043 case 3:
1045 }
1046
1047 return 0;
1048
1049 }
1050
1052 {
1053 if (!super.CanReleaseAttachment(attachment))
1054 {
1055 return false;
1056 }
1057
1059 {
1060 string attType = attachment.GetType();
1061 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
1062 {
1063 return false;
1064 }
1065 }
1066
1067 return true;
1068 }
1069
1071 {
1073 }
1074
1076 {
1077 if (!super.CanDisplayAttachmentCategory(category_name))
1078 {
1079 return false;
1080 }
1081
1083 if (category_name.
Contains(
"engine"))
1084 {
1086 {
1087 return false;
1088 }
1089 }
1090
1091 return true;
1092 }
1093
1095 {
1096 if (!super.CanDisplayCargo())
1097 {
1098 return false;
1099 }
1100
1102 {
1103 return false;
1104 }
1105
1106 return true;
1107 }
1108
1110 {
1112
1113 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
1114 if (!carDoor)
1115 {
1117 }
1118
1119 switch (slotType)
1120 {
1121 case "NivaDriverDoors":
1122 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
1123
1124 case "NivaCoDriverDoors":
1125 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
1126
1127 case "NivaHood":
1128 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1129
1130 case "NivaTrunk":
1131 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1132 }
1133
1135 }
1136
1138 {
1140 switch (posIdx)
1141 {
1142 case 0:
1144 return false;
1145 else if (GetAnimationPhase("SeatDriver") > 0.5)
1146 return false;
1147
1148 return true;
1149
1150 case 1:
1152 return false;
1153 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
1154 return false;
1155
1156 return true;
1157
1158 case 2:
1160 return false;
1161 else if (GetAnimationPhase("SeatDriver") <= 0.5)
1162 return false;
1163
1164 return true;
1165
1166 case 3:
1168 return false;
1169 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
1170 return false;
1171
1172 return true;
1173 }
1174
1175 return false;
1176 }
1177
1179 {
1180 switch (posIdx)
1181 {
1182 case 0:
1183 case 2:
1184 return "doors_driver";
1185 case 1:
1186 case 3:
1187 return "doors_codriver";
1188 }
1189
1190 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1191 }
1192
1194 {
1195 switch (posIdx)
1196 {
1197 case 0:
1198 case 2:
1199 return "NivaDriverDoors";
1200 case 1:
1201 case 3:
1202 return "NivaCoDriverDoors";
1203 }
1204
1205 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1206 }
1207
1208
1209
1211 {
1212 float tempCap = 0.0;
1213
1214 switch (ctrl)
1215 {
1217 float newValue = 0;
1219 {
1220 newValue += 0.5;
1221 }
1222
1224 {
1225 newValue += 0.5;
1226 }
1227
1229 {
1230 newValue += 0.3;
1231 }
1232
1234 {
1235 newValue -= 0.6;
1236 }
1237
1239 {
1240 newValue -= 0.2;
1241 }
1242
1244 {
1245 newValue -= 0.2;
1246 }
1247
1249 break;
1250 }
1251
1252 return super.OnSound(ctrl, oldValue);
1253 }
1254
1256 {
1257 switch (selection)
1258 {
1259 case "doors_driver":
1260 return "DoorsDriver";
1261 case "doors_codriver":
1262 return "DoorsCoDriver";
1263 case "doors_hood":
1264 return "DoorsHood";
1265 case "doors_trunk":
1266 return "DoorsTrunk";
1267 case "seatback_driver":
1268 return "SeatDriver";
1269 case "seatback_codriver":
1270 return "SeatCoDriver";
1271 }
1272
1273 return "";
1274 }
1275
1277 {
1278 switch (selection)
1279 {
1280 case "seat_driver":
1281 case "seatback_driver":
1282 case "seat_cargo1":
1283 return "seat_con_1_1";
1284 case "seat_codriver":
1285 case "seatback_codriver":
1286 case "seat_cargo2":
1287 return "seat_con_2_1";
1288 }
1289
1290 return "";
1291 }
1292
1294 {
1295 switch (selection)
1296 {
1297 case "seatback_driver":
1298 return 0;
1299 case "seatback_codriver":
1300 return 1;
1301 }
1302
1303 return -1;
1304 }
1305
1307 {
1308 return false;
1309 }
1310
1312 {
1313 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
1314 return false;
1315
1316 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
1317 return false;
1318
1319 switch (currentSeat)
1320 {
1321 case 0:
1322 return nextSeat == 1;
1323
1324 case 1:
1325 return nextSeat == 0;
1326
1327 case 2:
1328 return nextSeat == 3;
1329
1330 case 3:
1331 return nextSeat == 2;
1332 }
1333
1334 return false;
1335 }
1336
1338 {
1339 switch (pCurrentSeat)
1340 {
1341 case 0:
1342 return pDoorsSelection == "DoorsDriver";
1343
1344 case 1:
1345 return pDoorsSelection == "DoorsCoDriver";
1346
1347 case 2:
1348 return pDoorsSelection == "DoorsDriver";
1349
1350 case 3:
1351 return pDoorsSelection == "DoorsCoDriver";
1352 }
1353
1354 return false;
1355 }
1356
1358 {
1359 switch (pDoorSelection)
1360 {
1361 case "DoorsDriver":
1362 return 0;
1363 case "DoorsCoDriver":
1364 return 1;
1365 }
1366
1367 return -1;
1368 }
1369
1371 {
1372 super.SetActions();
1373
1375 }
1376
1378 {
1380 SpawnAdditionalItems();
1381 FillUpCarFluids();
1382
1388
1393
1394
1397 }
1398}
1399
1401{
1403 {
1405 SpawnAdditionalItems();
1406 FillUpCarFluids();
1407
1408 GameInventory inventory = GetInventory();
1413
1418
1419
1420
1423 }
1424}
1425
1427{
1429 {
1431 SpawnAdditionalItems();
1432 FillUpCarFluids();
1433
1434 GameInventory inventory = GetInventory();
1439
1444
1445
1448 }
1449}
void AddAction(typename actionName)
CarSoundCtrl
Car's sound controller list. (native, do not change or extend)
ref UniversalTemperatureSourceSettings m_UTSSettings
ref UniversalTemperatureSource m_UTSource
proto native void SetEnginePos(vector pos)
Override the position of engine (model space)
proto native bool EngineIsOn()
Returns true when engine is running, false otherwise.
void SpawnUniversalParts()
string m_EngineStartBattery
ref VehicleHornComponent m_HornComponent
ref VehicleLightsComponent m_LightsComponent
OffroadHatchbackLightProfileFront VehicleLightProfileFront OffroadHatchbackLightProfileRear()
void OffroadHatchbackLightProfileFront()
UniversalTemperatureSourceLambdaBaseImpl UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceLambdaEngine()
void VehicleLightData(VehicleLightProfileBase profile)
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
override void SetActions()
override bool CanReachSeatFromSeat(int currentSeat, int nextSeat)
override string GetAnimSourceFromSelection(string selection)
override int GetSeatAnimationType(int posIdx)
override string GetDoorConditionPointFromSelection(string selection)
override float OnSound(CarSoundCtrl ctrl, float oldValue)
override string GetDoorInvSlotNameFromSeatPos(int posIdx)
override void EOnPostSimulate(IEntity other, float timeSlice)
override void OnEngineStop()
override float GetTransportCameraDistance()
override bool CanReleaseAttachment(EntityAI attachment)
override bool CanDisplayCargo()
override EntityAI GetElectricitySourceDevice()
override void OnEngineStart()
override int GetAnimInstance()
override bool CrewCanGetThrough(int posIdx)
override bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
bool CanManipulateSpareWheel(string slotSelectionName)
OffroadHatchback CarScript OnDebugSpawn()
override bool IsVitalGlowPlug()
override bool NeedElectricitySourceDevice()
override int GetSeatIndexFromDoor(string pDoorSelection)
override string GetElectricitySourceDeviceType()
override string GetDoorSelectionNameFromSeatPos(int posIdx)
override int GetCarDoorsState(string slotType)
override int GetCrewIndex(string selection)
override bool CanDisplayAttachmentCategory(string category_name)
Super root of all classes in Enforce script.
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
script counterpart to engine's class Inventory
override void OnDebugSpawn()
override void OnDebugSpawn()
original Timer deletes m_params which is unwanted
DayZPlayerConstants
defined in C++
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static const float ITEM_TEMPERATURE_NEUTRAL_ZONE_MIDDLE
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
bool Contains(string sample)
Returns true if sample is substring of string.
proto int ToLower()
Changes string to lowercase. Returns length.