872{
876
878 {
879
880
887
888 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
889 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
890
893
897 });
901 });
902
905
907
909 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
910 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
911 }
912
914 {
918 }
919
921 {
922 super.EEInit();
923
925 {
932
935 }
936 }
937
939 {
940 return true;
941 }
942
944 {
945 return true;
946 }
947
949 {
950 super.GetElectricitySourceDevice();
951
953 }
954
956 {
957 return "CarBattery";
958 }
959
961 {
962 super.OnEngineStart();
963
965 {
968 }
969 }
970
972 {
973 super.OnEngineStop();
974
976 {
979 }
980 }
981
983 {
985 {
987 {
989 }
990 }
991 }
992
994 {
996 }
997
999 {
1000 return 5.1;
1001 }
1002
1004 {
1005 return 1.5;
1006 }
1007
1009 {
1010 switch (posIdx)
1011 {
1012 case 0:
1014 case 1:
1016 case 2:
1018 case 3:
1020 }
1021
1022 return 0;
1023 }
1024
1026 {
1027 if (!super.CanReleaseAttachment(attachment))
1028 {
1029 return false;
1030 }
1031
1032 string attType = attachment.GetType();
1033 switch (attType)
1034 {
1035 case "CarBattery":
1037 {
1038 return false;
1039 }
1040 break;
1041
1042 case "GlowPlug":
1044 {
1045 return false;
1046 }
1047 break;
1048 }
1049
1050 return true;
1051 }
1052
1054 {
1056 }
1057
1059 {
1060 if ( !super.CanDisplayAttachmentCategory(category_name))
1061 {
1062 return false;
1063 }
1064
1066 if (category_name.
Contains(
"engine"))
1067 {
1069 {
1070 return false;
1071 }
1072 }
1073
1074 return true;
1075 }
1076
1078 {
1079 if ( !super.CanDisplayCargo() )
1080 return false;
1081
1083 return false;
1084
1085 return true;
1086 }
1087
1089 {
1091
1092 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
1093 if (!carDoor)
1094 {
1096 }
1097
1098 switch (slotType)
1099 {
1100 case "Offroad_02_Door_1_1":
1101 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
1102
1103 case "Offroad_02_Door_2_1":
1104 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
1105
1106 case "Offroad_02_Door_1_2":
1107 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
1108
1109 case "Offroad_02_Door_2_2":
1110 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
1111
1112 case "Offroad_02_Hood":
1113 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1114
1115 case "Offroad_02_Trunk":
1116 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1117 }
1118
1120 }
1121
1122
1124 {
1125 switch( posIdx )
1126 {
1127 case 0:
1129 return false;
1130
1131 return true;
1132 break;
1133
1134 case 1:
1136 return false;
1137
1138 return true;
1139 break;
1140
1141 case 2:
1143 return false;
1144
1145 return true;
1146 break;
1147
1148 case 3:
1150 return false;
1151
1152 return true;
1153 break;
1154 }
1155
1156 return false;
1157 }
1158
1160 {
1161 switch( posIdx )
1162 {
1163 case 0:
1164 return "doors_driver";
1165 break;
1166 case 1:
1167 return "doors_codriver";
1168 break;
1169 case 2:
1170 return "doors_cargo1";
1171 break;
1172 case 3:
1173 return "doors_cargo2";
1174 break;
1175 }
1176
1177 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1178 }
1179
1181 {
1182 switch (posIdx)
1183 {
1184 case 0:
1185 return "Offroad_02_Door_1_1";
1186 case 1:
1187 return "Offroad_02_Door_2_1";
1188 case 2:
1189 return "Offroad_02_Door_1_2";
1190 case 3:
1191 return "Offroad_02_Door_2_2";
1192 }
1193
1194 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1195 }
1196
1198 {
1199 switch ( ctrl )
1200 {
1202 float newValue = 0;
1204 {
1205 newValue += 0.25;
1206 }
1207
1209 {
1210 newValue += 0.25;
1211 }
1212
1214 {
1215 newValue += 0.25;
1216 }
1217
1219 {
1220 newValue += 0.25;
1221 }
1222
1224 break;
1225 }
1226
1227 return super.OnSound(ctrl, oldValue);
1228 }
1229
1231 {
1232 switch (selection)
1233 {
1234 case "doors_driver":
1235 return "DoorsDriver";
1236 case "doors_codriver":
1237 return "DoorsCoDriver";
1238 case "doors_cargo1":
1239 return "DoorsCargo1";
1240 case "doors_cargo2":
1241 return "DoorsCargo2";
1242 case "doors_hood":
1243 return "DoorsHood";
1244 case "doors_trunk":
1245 return "DoorsTrunk";
1246 }
1247
1248 return "";
1249 }
1250
1252 {
1253 switch (currentSeat)
1254 {
1255 case 0:
1256 return nextSeat == 1;
1257 case 1:
1258 return nextSeat == 0;
1259 case 2:
1260 return nextSeat == 3;
1261 case 3:
1262 return nextSeat == 2;
1263 }
1264
1265 return false;
1266 }
1267
1269 {
1270 switch (pCurrentSeat)
1271 {
1272 case 0:
1273 return pDoorsSelection == "DoorsDriver";
1274 case 1:
1275 return pDoorsSelection == "DoorsCoDriver";
1276 case 2:
1277 return pDoorsSelection == "DoorsCargo1";
1278 case 3:
1279 return pDoorsSelection == "DoorsCargo2";
1280 }
1281
1282 return false;
1283 }
1284
1286 {
1287 return false;
1288 }
1289
1291 {
1292 return false;
1293 }
1294
1296 {
1298 SpawnAdditionalItems();
1299 FillUpCarFluids();
1300
1306
1313
1314
1317 }
1318}
1319
1320
1322{
1324 {
1326 SpawnAdditionalItems();
1327 FillUpCarFluids();
1328
1329 GetInventory().CreateInInventory("Offroad_02_Wheel");
1330 GetInventory().CreateInInventory("Offroad_02_Wheel");
1331 GetInventory().CreateInInventory("Offroad_02_Wheel");
1332 GetInventory().CreateInInventory("Offroad_02_Wheel");
1333
1334 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1335 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1336 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1337 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1338 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1339 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1340
1341
1342 GetInventory().CreateInInventory("Offroad_02_Wheel");
1343 GetInventory().CreateInInventory("Offroad_02_Wheel");
1344 }
1345}
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.