867{
871
873 {
874
875
882
883 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
884 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
885
888
892 });
896 });
897
900
902
904 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
905 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
906 }
907
909 {
913 }
914
916 {
917 super.EEInit();
918
920 {
927
930 }
931 }
932
934 {
935 return true;
936 }
937
939 {
940 return true;
941 }
942
944 {
945 super.GetElectricitySourceDevice();
946
948 }
949
951 {
952 return "CarBattery";
953 }
954
956 {
957 super.OnEngineStart();
958
960 {
963 }
964 }
965
967 {
968 super.OnEngineStop();
969
971 {
974 }
975 }
976
978 {
980 {
982 {
984 }
985 }
986 }
987
989 {
991 }
992
994 {
995 return 5.1;
996 }
997
999 {
1000 return 1.5;
1001 }
1002
1004 {
1005 switch (posIdx)
1006 {
1007 case 0:
1009 case 1:
1011 case 2:
1013 case 3:
1015 }
1016
1017 return 0;
1018 }
1019
1021 {
1022 if (!super.CanReleaseAttachment(attachment))
1023 {
1024 return false;
1025 }
1026
1027 string attType = attachment.GetType();
1028 switch (attType)
1029 {
1030 case "CarBattery":
1032 {
1033 return false;
1034 }
1035 break;
1036
1037 case "GlowPlug":
1039 {
1040 return false;
1041 }
1042 break;
1043 }
1044
1045 return true;
1046 }
1047
1049 {
1051 }
1052
1054 {
1055 if ( !super.CanDisplayAttachmentCategory(category_name))
1056 {
1057 return false;
1058 }
1059
1061 if (category_name.
Contains(
"engine"))
1062 {
1064 {
1065 return false;
1066 }
1067 }
1068
1069 return true;
1070 }
1071
1073 {
1074 if ( !super.CanDisplayCargo() )
1075 return false;
1076
1078 return false;
1079
1080 return true;
1081 }
1082
1084 {
1086
1087 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
1088 if (!carDoor)
1089 {
1091 }
1092
1093 switch (slotType)
1094 {
1095 case "Offroad_02_Door_1_1":
1096 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
1097
1098 case "Offroad_02_Door_2_1":
1099 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
1100
1101 case "Offroad_02_Door_1_2":
1102 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
1103
1104 case "Offroad_02_Door_2_2":
1105 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
1106
1107 case "Offroad_02_Hood":
1108 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1109
1110 case "Offroad_02_Trunk":
1111 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1112 }
1113
1115 }
1116
1117
1119 {
1120 switch( posIdx )
1121 {
1122 case 0:
1124 return false;
1125
1126 return true;
1127 break;
1128
1129 case 1:
1131 return false;
1132
1133 return true;
1134 break;
1135
1136 case 2:
1138 return false;
1139
1140 return true;
1141 break;
1142
1143 case 3:
1145 return false;
1146
1147 return true;
1148 break;
1149 }
1150
1151 return false;
1152 }
1153
1155 {
1156 switch( posIdx )
1157 {
1158 case 0:
1159 return "doors_driver";
1160 break;
1161 case 1:
1162 return "doors_codriver";
1163 break;
1164 case 2:
1165 return "doors_cargo1";
1166 break;
1167 case 3:
1168 return "doors_cargo2";
1169 break;
1170 }
1171
1172 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1173 }
1174
1176 {
1177 switch (posIdx)
1178 {
1179 case 0:
1180 return "Offroad_02_Door_1_1";
1181 case 1:
1182 return "Offroad_02_Door_2_1";
1183 case 2:
1184 return "Offroad_02_Door_1_2";
1185 case 3:
1186 return "Offroad_02_Door_2_2";
1187 }
1188
1189 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1190 }
1191
1193 {
1194 switch ( ctrl )
1195 {
1197 float newValue = 0;
1199 {
1200 newValue += 0.25;
1201 }
1202
1204 {
1205 newValue += 0.25;
1206 }
1207
1209 {
1210 newValue += 0.25;
1211 }
1212
1214 {
1215 newValue += 0.25;
1216 }
1217
1219 break;
1220 }
1221
1222 return super.OnSound(ctrl, oldValue);
1223 }
1224
1226 {
1227 switch (selection)
1228 {
1229 case "doors_driver":
1230 return "DoorsDriver";
1231 case "doors_codriver":
1232 return "DoorsCoDriver";
1233 case "doors_cargo1":
1234 return "DoorsCargo1";
1235 case "doors_cargo2":
1236 return "DoorsCargo2";
1237 case "doors_hood":
1238 return "DoorsHood";
1239 case "doors_trunk":
1240 return "DoorsTrunk";
1241 }
1242
1243 return "";
1244 }
1245
1247 {
1248 switch (currentSeat)
1249 {
1250 case 0:
1251 return nextSeat == 1;
1252 case 1:
1253 return nextSeat == 0;
1254 case 2:
1255 return nextSeat == 3;
1256 case 3:
1257 return nextSeat == 2;
1258 }
1259
1260 return false;
1261 }
1262
1264 {
1265 switch (pCurrentSeat)
1266 {
1267 case 0:
1268 return pDoorsSelection == "DoorsDriver";
1269 case 1:
1270 return pDoorsSelection == "DoorsCoDriver";
1271 case 2:
1272 return pDoorsSelection == "DoorsCargo1";
1273 case 3:
1274 return pDoorsSelection == "DoorsCargo2";
1275 }
1276
1277 return false;
1278 }
1279
1281 {
1282 return false;
1283 }
1284
1286 {
1287 return false;
1288 }
1289
1291 {
1293 SpawnAdditionalItems();
1294 FillUpCarFluids();
1295
1301
1308
1309
1312 }
1313}
1314
1315
1317{
1319 {
1321 SpawnAdditionalItems();
1322 FillUpCarFluids();
1323
1324 GetInventory().CreateInInventory("Offroad_02_Wheel");
1325 GetInventory().CreateInInventory("Offroad_02_Wheel");
1326 GetInventory().CreateInInventory("Offroad_02_Wheel");
1327 GetInventory().CreateInInventory("Offroad_02_Wheel");
1328
1329 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1330 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1331 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1332 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1333 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1334 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1335
1336
1337 GetInventory().CreateInInventory("Offroad_02_Wheel");
1338 GetInventory().CreateInInventory("Offroad_02_Wheel");
1339 }
1340}
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
Offroad_02LightProfileFront VehicleLightProfileFront Offroad_02LightProfileRear()
void Offroad_02LightProfileFront()
UniversalTemperatureSourceLambdaBaseImpl UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceLambdaEngine()
void VehicleLightData(VehicleLightProfileBase profile)
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
override bool IsVitalRadiator()
override bool IsVitalSparkPlug()
override bool CanReachSeatFromSeat(int currentSeat, int nextSeat)
override string GetAnimSourceFromSelection(string selection)
override int GetSeatAnimationType(int posIdx)
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()
Offroad_02 CarScript OnDebugSpawn()
override EntityAI GetElectricitySourceDevice()
override void OnEngineStart()
override bool HasGangedTailAndBrakeLights()
override int GetAnimInstance()
override bool CrewCanGetThrough(int posIdx)
override bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
bool CanManipulateSpareWheel(string slotSelectionName)
override bool NeedElectricitySourceDevice()
override float GetWeightCoef()
override string GetElectricitySourceDeviceType()
override string GetDoorSelectionNameFromSeatPos(int posIdx)
override int GetCarDoorsState(string slotType)
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()
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.