832{
836
838 {
839
840
847
848 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
849 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
850 m_CarSeatShiftInSound = "Offroad_SeatShiftIn_SoundSet";
851 m_CarSeatShiftOutSound = "Offroad_SeatShiftOut_SoundSet";
852
855
858
860
862 m_CarHornShortSoundName = "Offroad_Horn_Short_SoundSet";
863 m_CarHornLongSoundName = "Offroad_Horn_SoundSet";
864 }
865
867 {
871 }
872
874 {
875 super.EEInit();
876
878 {
885
888 }
889 }
890
892 {
893 return true;
894 }
895
897 {
898 super.GetElectricitySourceDevice();
899
901 }
902
904 {
905 return "CarBattery";
906 }
907
909 {
910 super.OnEngineStart();
911
913 {
916 }
917 }
918
920 {
921 super.OnEngineStop();
922
924 {
927 }
928 }
929
931 {
933 {
935 {
937 }
938 }
939 }
940
942 {
944 }
945
947 {
948 return 3.5;
949 }
950
952 {
953 switch (posIdx)
954 {
955 case 0:
957 case 1:
959 case 2:
961 case 3:
963 }
964
965 return 0;
966
967 }
968
970 {
971 if (!super.CanReleaseAttachment(attachment))
972 {
973 return false;
974 }
975
977 {
978 string attType = attachment.GetType();
979 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
980 {
981 return false;
982 }
983 }
984
985 return true;
986 }
987
989 {
991 }
992
994 {
995 if (!super.CanDisplayAttachmentCategory(category_name))
996 {
997 return false;
998 }
999
1001 if (category_name.
Contains(
"engine"))
1002 {
1004 {
1005 return false;
1006 }
1007 }
1008
1009 return true;
1010 }
1011
1013 {
1014 if (!super.CanDisplayCargo())
1015 {
1016 return false;
1017 }
1018
1020 {
1021 return false;
1022 }
1023
1024 return true;
1025 }
1026
1028 {
1030
1031 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
1032 if (!carDoor)
1033 {
1035 }
1036
1037 switch (slotType)
1038 {
1039 case "NivaDriverDoors":
1040 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
1041
1042 case "NivaCoDriverDoors":
1043 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
1044
1045 case "NivaHood":
1046 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1047
1048 case "NivaTrunk":
1049 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1050 }
1051
1053 }
1054
1056 {
1058 switch (posIdx)
1059 {
1060 case 0:
1062 return false;
1063 else if (GetAnimationPhase("SeatDriver") > 0.5)
1064 return false;
1065
1066 return true;
1067
1068 case 1:
1070 return false;
1071 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
1072 return false;
1073
1074 return true;
1075
1076 case 2:
1078 return false;
1079 else if (GetAnimationPhase("SeatDriver") <= 0.5)
1080 return false;
1081
1082 return true;
1083
1084 case 3:
1086 return false;
1087 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
1088 return false;
1089
1090 return true;
1091 }
1092
1093 return false;
1094 }
1095
1097 {
1098 switch (posIdx)
1099 {
1100 case 0:
1101 case 2:
1102 return "doors_driver";
1103 case 1:
1104 case 3:
1105 return "doors_codriver";
1106 }
1107
1108 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1109 }
1110
1112 {
1113 switch (posIdx)
1114 {
1115 case 0:
1116 case 2:
1117 return "NivaDriverDoors";
1118 case 1:
1119 case 3:
1120 return "NivaCoDriverDoors";
1121 }
1122
1123 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1124 }
1125
1126
1127
1129 {
1130 float tempCap = 0.0;
1131
1132 switch (ctrl)
1133 {
1135 float newValue = 0;
1137 {
1138 newValue += 0.5;
1139 }
1140
1142 {
1143 newValue += 0.5;
1144 }
1145
1147 {
1148 newValue += 0.3;
1149 }
1150
1152 {
1153 newValue -= 0.6;
1154 }
1155
1157 {
1158 newValue -= 0.2;
1159 }
1160
1162 {
1163 newValue -= 0.2;
1164 }
1165
1167 break;
1168 }
1169
1170 return super.OnSound(ctrl, oldValue);
1171 }
1172
1174 {
1175 switch (selection)
1176 {
1177 case "doors_driver":
1178 return "DoorsDriver";
1179 case "doors_codriver":
1180 return "DoorsCoDriver";
1181 case "doors_hood":
1182 return "DoorsHood";
1183 case "doors_trunk":
1184 return "DoorsTrunk";
1185 case "seatback_driver":
1186 return "SeatDriver";
1187 case "seatback_codriver":
1188 return "SeatCoDriver";
1189 }
1190
1191 return "";
1192 }
1193
1195 {
1196 switch (selection)
1197 {
1198 case "seat_driver":
1199 case "seatback_driver":
1200 case "seat_cargo1":
1201 return "seat_con_1_1";
1202 case "seat_codriver":
1203 case "seatback_codriver":
1204 case "seat_cargo2":
1205 return "seat_con_2_1";
1206 }
1207
1208 return "";
1209 }
1210
1212 {
1213 switch (selection)
1214 {
1215 case "seatback_driver":
1216 return 0;
1217 case "seatback_codriver":
1218 return 1;
1219 }
1220
1221 return -1;
1222 }
1223
1225 {
1226 return false;
1227 }
1228
1230 {
1231 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
1232 return false;
1233
1234 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
1235 return false;
1236
1237 switch (currentSeat)
1238 {
1239 case 0:
1240 return nextSeat == 1;
1241
1242 case 1:
1243 return nextSeat == 0;
1244
1245 case 2:
1246 return nextSeat == 3;
1247
1248 case 3:
1249 return nextSeat == 2;
1250 }
1251
1252 return false;
1253 }
1254
1256 {
1257 switch (pCurrentSeat)
1258 {
1259 case 0:
1260 return pDoorsSelection == "DoorsDriver";
1261
1262 case 1:
1263 return pDoorsSelection == "DoorsCoDriver";
1264
1265 case 2:
1266 return pDoorsSelection == "DoorsDriver";
1267
1268 case 3:
1269 return pDoorsSelection == "DoorsCoDriver";
1270 }
1271
1272 return false;
1273 }
1274
1276 {
1277 switch (pDoorSelection)
1278 {
1279 case "DoorsDriver":
1280 return 0;
1281 case "DoorsCoDriver":
1282 return 1;
1283 }
1284
1285 return -1;
1286 }
1287
1289 {
1290 super.SetActions();
1291
1293 }
1294
1296 {
1298 SpawnAdditionalItems();
1299 FillUpCarFluids();
1300
1306
1311
1312
1315 }
1316}
1317
1319{
1321 {
1323 SpawnAdditionalItems();
1324 FillUpCarFluids();
1325
1326 GameInventory inventory = GetInventory();
1331
1336
1337
1338
1341 }
1342}
1343
1345{
1347 {
1349 SpawnAdditionalItems();
1350 FillUpCarFluids();
1351
1352 GameInventory inventory = GetInventory();
1357
1362
1363
1366 }
1367}
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.