841{
845
847 {
848
849
856
857 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
858 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
859
862
865
867
869 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
870 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
871 }
872
874 {
878 }
879
881 {
882 super.EEInit();
883
885 {
892
895 }
896 }
897
899 {
900 return true;
901 }
902
904 {
905 super.GetElectricitySourceDevice();
906
908 }
909
911 {
912 return "CarBattery";
913 }
914
916 {
917 super.OnEngineStart();
918
920 {
923 }
924 }
925
927 {
928 super.OnEngineStop();
929
931 {
934 }
935 }
936
938 {
940 {
942 {
944 }
945 }
946 }
947
949 {
951 }
952
954 {
955 return 4.5;
956 }
957
959 {
960 switch (posIdx)
961 {
962 case 0:
964 case 1:
966 case 2:
968 case 3:
970 }
971
972 return 0;
973 }
974
976 {
977 if( !super.CanReleaseAttachment( attachment ) )
978 return false;
979
980 string attType = attachment.GetType();
981
983 {
984 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
985 return false;
986 }
987
988 return true;
989 }
990
992 {
994 }
995
997 {
998
999 if (!super.CanDisplayAttachmentCategory(category_name))
1000 return false;
1001
1002
1004 if (category_name.
Contains(
"engine"))
1005 {
1007 return false;
1008 }
1009
1010 return true;
1011 }
1012
1014 {
1015 if ( !super.CanDisplayCargo() )
1016 return false;
1017
1019 return false;
1020
1021 return true;
1022 }
1023
1025 {
1027
1028 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
1029 if (!carDoor)
1030 {
1032 }
1033
1034 switch (slotType)
1035 {
1036 case "CivSedanDriverDoors":
1037 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
1038 break;
1039
1040 case "CivSedanCoDriverDoors":
1041 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
1042 break;
1043
1044 case "CivSedanCargo1Doors":
1045 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
1046 break;
1047
1048 case "CivSedanCargo2Doors":
1049 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
1050 break;
1051
1052 case "CivSedanTrunk":
1053 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1054 break;
1055
1056 case "CivSedanHood":
1057 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1058 break;
1059 }
1060
1062 }
1063
1064
1066 {
1067 switch( posIdx )
1068 {
1069 case 0:
1071 return false;
1072
1073 return true;
1074 break;
1075
1076 case 1:
1078 return false;
1079
1080 return true;
1081 break;
1082
1083 case 2:
1085 return false;
1086
1087 return true;
1088 break;
1089
1090 case 3:
1092 return false;
1093
1094 return true;
1095 break;
1096 }
1097
1098 return false;
1099 }
1100
1102 {
1103 switch( posIdx )
1104 {
1105 case 0:
1106 return "doors_driver";
1107 break;
1108 case 1:
1109 return "doors_codriver";
1110 break;
1111 case 2:
1112 return "doors_cargo1";
1113 break;
1114 case 3:
1115 return "doors_cargo2";
1116 break;
1117 }
1118
1119 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1120 }
1121
1123 {
1124 switch( posIdx )
1125 {
1126 case 0:
1127 return "CivSedanDriverDoors";
1128 break;
1129 case 1:
1130 return "CivSedanCoDriverDoors";
1131 break;
1132 case 2:
1133 return "CivSedanCargo1Doors";
1134 break;
1135 case 3:
1136 return "CivSedanCargo2Doors";
1137 break;
1138 }
1139
1140 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1141 }
1142
1143
1144
1146 {
1147 switch (ctrl)
1148 {
1150 float newValue = 0;
1152 {
1153 newValue += 0.25;
1154 }
1155
1157 {
1158 newValue += 0.25;
1159 }
1160
1162 {
1163 newValue += 0.25;
1164 }
1165
1167 {
1168 newValue += 0.25;
1169 }
1170
1172 {
1173 newValue -= 0.6;
1174 }
1175
1177 {
1178 newValue -= 0.6;
1179 }
1180
1182 break;
1183 }
1184
1185 return super.OnSound(ctrl, oldValue);
1186 }
1187
1189 {
1190 switch (selection)
1191 {
1192 case "doors_driver":
1193 return "DoorsDriver";
1194 case "doors_codriver":
1195 return "DoorsCoDriver";
1196 case "doors_cargo1":
1197 return "DoorsCargo1";
1198 case "doors_cargo2":
1199 return "DoorsCargo2";
1200 case "doors_hood":
1201 return "DoorsHood";
1202 case "doors_trunk":
1203 return "DoorsTrunk";
1204 }
1205
1206 return "";
1207 }
1208
1210 {
1211 return false;
1212 }
1213
1215 {
1216 switch (currentSeat)
1217 {
1218 case 0:
1219 return nextSeat == 1;
1220
1221 case 1:
1222 return nextSeat == 0;
1223
1224 case 2:
1225 return nextSeat == 3;
1226
1227 case 3:
1228 return nextSeat == 2;
1229 }
1230
1231 return false;
1232 }
1233
1235 {
1236 switch (pCurrentSeat)
1237 {
1238 case 0:
1239 return pDoorsSelection == "DoorsDriver";
1240
1241 case 1:
1242 return pDoorsSelection == "DoorsCoDriver";
1243
1244 case 2:
1245 return pDoorsSelection == "DoorsCargo1";
1246
1247 case 3:
1248 return pDoorsSelection == "DoorsCargo2";
1249 }
1250
1251 return false;
1252 }
1253
1255 {
1257 SpawnAdditionalItems();
1258 FillUpCarFluids();
1259
1265
1272
1273
1276 }
1277
1279 {
1280 return 1.5;
1281 }
1282}
1283
1285{
1287 {
1289 SpawnAdditionalItems();
1290 FillUpCarFluids();
1291
1292 GameInventory inventory = GetInventory();
1297
1304
1305
1308 }
1309}
1310
1312{
1314 {
1316 SpawnAdditionalItems();
1317 FillUpCarFluids();
1318
1319 GameInventory inventory = GetInventory();
1324
1331
1332
1335 }
1336}
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
void CivilianSedanLightProfileFront()
CivilianSedanLightProfileFront VehicleLightProfileFront CivilianSedanLightProfileRear()
UniversalTemperatureSourceLambdaBaseImpl UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceLambdaEngine()
void VehicleLightData(VehicleLightProfileBase profile)
override float GetPushForceCoefficientMultiplier()
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()
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
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)
override bool IsVitalGlowPlug()
override bool NeedElectricitySourceDevice()
override string GetElectricitySourceDeviceType()
override string GetDoorSelectionNameFromSeatPos(int posIdx)
override int GetCarDoorsState(string slotType)
CivilianSedan CarScript OnDebugSpawn()
override bool CanDisplayAttachmentCategory(string category_name)
override void OnDebugSpawn()
override void OnDebugSpawn()
Super root of all classes in Enforce script.
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
script counterpart to engine's class Inventory
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.