833{
837
839 {
840
841
848
849 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
850 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
851
854
858 });
862 });
863
866
868
870 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
871 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
872 }
873
875 {
879 }
880
882 {
883 super.EEInit();
884
886 {
893
896 }
897 }
898
900 {
901 return true;
902 }
903
905 {
906 return true;
907 }
908
910 {
911 super.GetElectricitySourceDevice();
912
914 }
915
917 {
918 return "CarBattery";
919 }
920
922 {
923 super.OnEngineStart();
924
926 {
929 }
930 }
931
933 {
934 super.OnEngineStop();
935
937 {
940 }
941 }
942
944 {
946 {
948 {
950 }
951 }
952 }
953
955 {
957 }
958
960 {
961 return 5.1;
962 }
963
965 {
966 return 1.5;
967 }
968
970 {
971 switch (posIdx)
972 {
973 case 0:
975 case 1:
977 case 2:
979 case 3:
981 }
982
983 return 0;
984 }
985
987 {
988 if (!super.CanReleaseAttachment(attachment))
989 {
990 return false;
991 }
992
993 string attType = attachment.GetType();
994 switch (attType)
995 {
996 case "CarBattery":
998 {
999 return false;
1000 }
1001 break;
1002
1003 case "GlowPlug":
1005 {
1006 return false;
1007 }
1008 break;
1009 }
1010
1011 return true;
1012 }
1013
1015 {
1017 }
1018
1020 {
1021 if ( !super.CanDisplayAttachmentCategory(category_name))
1022 {
1023 return false;
1024 }
1025
1027 if (category_name.
Contains(
"engine"))
1028 {
1030 {
1031 return false;
1032 }
1033 }
1034
1035 return true;
1036 }
1037
1039 {
1040 if ( !super.CanDisplayCargo() )
1041 return false;
1042
1044 return false;
1045
1046 return true;
1047 }
1048
1050 {
1052
1053 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
1054 if (!carDoor)
1055 {
1057 }
1058
1059 switch (slotType)
1060 {
1061 case "Offroad_02_Door_1_1":
1062 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
1063
1064 case "Offroad_02_Door_2_1":
1065 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
1066
1067 case "Offroad_02_Door_1_2":
1068 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
1069
1070 case "Offroad_02_Door_2_2":
1071 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
1072
1073 case "Offroad_02_Hood":
1074 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1075
1076 case "Offroad_02_Trunk":
1077 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1078 }
1079
1081 }
1082
1083
1085 {
1086 switch( posIdx )
1087 {
1088 case 0:
1090 return false;
1091
1092 return true;
1093 break;
1094
1095 case 1:
1097 return false;
1098
1099 return true;
1100 break;
1101
1102 case 2:
1104 return false;
1105
1106 return true;
1107 break;
1108
1109 case 3:
1111 return false;
1112
1113 return true;
1114 break;
1115 }
1116
1117 return false;
1118 }
1119
1121 {
1122 switch( posIdx )
1123 {
1124 case 0:
1125 return "doors_driver";
1126 break;
1127 case 1:
1128 return "doors_codriver";
1129 break;
1130 case 2:
1131 return "doors_cargo1";
1132 break;
1133 case 3:
1134 return "doors_cargo2";
1135 break;
1136 }
1137
1138 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1139 }
1140
1142 {
1143 switch (posIdx)
1144 {
1145 case 0:
1146 return "Offroad_02_Door_1_1";
1147 case 1:
1148 return "Offroad_02_Door_2_1";
1149 case 2:
1150 return "Offroad_02_Door_1_2";
1151 case 3:
1152 return "Offroad_02_Door_2_2";
1153 }
1154
1155 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1156 }
1157
1159 {
1160 switch ( ctrl )
1161 {
1163 float newValue = 0;
1165 {
1166 newValue += 0.25;
1167 }
1168
1170 {
1171 newValue += 0.25;
1172 }
1173
1175 {
1176 newValue += 0.25;
1177 }
1178
1180 {
1181 newValue += 0.25;
1182 }
1183
1185 break;
1186 }
1187
1188 return super.OnSound(ctrl, oldValue);
1189 }
1190
1192 {
1193 switch (selection)
1194 {
1195 case "doors_driver":
1196 return "DoorsDriver";
1197 case "doors_codriver":
1198 return "DoorsCoDriver";
1199 case "doors_cargo1":
1200 return "DoorsCargo1";
1201 case "doors_cargo2":
1202 return "DoorsCargo2";
1203 case "doors_hood":
1204 return "DoorsHood";
1205 case "doors_trunk":
1206 return "DoorsTrunk";
1207 }
1208
1209 return "";
1210 }
1211
1213 {
1214 switch (currentSeat)
1215 {
1216 case 0:
1217 return nextSeat == 1;
1218 case 1:
1219 return nextSeat == 0;
1220 case 2:
1221 return nextSeat == 3;
1222 case 3:
1223 return nextSeat == 2;
1224 }
1225
1226 return false;
1227 }
1228
1230 {
1231 switch (pCurrentSeat)
1232 {
1233 case 0:
1234 return pDoorsSelection == "DoorsDriver";
1235 case 1:
1236 return pDoorsSelection == "DoorsCoDriver";
1237 case 2:
1238 return pDoorsSelection == "DoorsCargo1";
1239 case 3:
1240 return pDoorsSelection == "DoorsCargo2";
1241 }
1242
1243 return false;
1244 }
1245
1247 {
1248 return false;
1249 }
1250
1252 {
1253 return false;
1254 }
1255
1257 {
1259 SpawnAdditionalItems();
1260 FillUpCarFluids();
1261
1267
1274
1275
1278 }
1279}
1280
1281
1283{
1285 {
1287 SpawnAdditionalItems();
1288 FillUpCarFluids();
1289
1290 GetInventory().CreateInInventory("Offroad_02_Wheel");
1291 GetInventory().CreateInInventory("Offroad_02_Wheel");
1292 GetInventory().CreateInInventory("Offroad_02_Wheel");
1293 GetInventory().CreateInInventory("Offroad_02_Wheel");
1294
1295 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1296 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1297 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1298 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1299 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1300 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1301
1302
1303 GetInventory().CreateInInventory("Offroad_02_Wheel");
1304 GetInventory().CreateInInventory("Offroad_02_Wheel");
1305 }
1306}
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.