795{
799
801 {
802
803
810
811 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
812 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
813
816
819
821
823 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
824 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
825 }
826
828 {
832 }
833
835 {
836 super.EEInit();
837
839 {
846
849 }
850 }
851
853 {
854 return true;
855 }
856
858 {
859 super.GetElectricitySourceDevice();
860
862 }
863
865 {
866 return "CarBattery";
867 }
868
870 {
871 super.OnEngineStart();
872
874 {
877 }
878 }
879
881 {
882 super.OnEngineStop();
883
885 {
888 }
889 }
890
892 {
894 {
896 {
898 }
899 }
900 }
901
903 {
905 }
906
908 {
909 switch (posIdx)
910 {
911 case 0:
913 case 1:
915 case 2:
917 case 3:
919 }
920
921 return 0;
922 }
923
925 {
926 if (!super.CanReleaseAttachment(attachment))
927 {
928 return false;
929 }
930
932 {
933 string attType = attachment.GetType();
934 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
935 {
936 return false;
937 }
938 }
939
940 return true;
941 }
942
944 {
946 }
947
949 {
950
951 if ( !super.CanDisplayAttachmentCategory( category_name ) )
952 return false;
953
954
956 if ( category_name.
Contains(
"engine") )
957 {
959 return false;
960 }
961
962 return true;
963 }
964
966 {
967 if ( !super.CanDisplayCargo() )
968 return false;
969
971 return false;
972
973 return true;
974 }
975
977 {
979
980 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
981 if (!carDoor)
982 {
984 }
985
986 switch (slotType)
987 {
988 case "Hatchback_02_Door_1_1":
989 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
990
991 case "Hatchback_02_Door_2_1":
992 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
993
994 case "Hatchback_02_Door_1_2":
995 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
996
997 case "Hatchback_02_Door_2_2":
998 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
999
1000 case "Hatchback_02_Hood":
1001 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1002
1003 case "Hatchback_02_Trunk":
1004 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1005 }
1006
1008 }
1009
1010
1012 {
1013 switch (posIdx)
1014 {
1015 case 0:
1017 {
1018 return false;
1019 }
1020
1021 return true;
1022
1023 case 1:
1025 {
1026 return false;
1027 }
1028
1029 return true;
1030
1031 case 2:
1033 {
1034 return false;
1035 }
1036
1037 return true;
1038
1039 case 3:
1041 {
1042 return false;
1043 }
1044
1045 return true;
1046 }
1047
1048 return false;
1049 }
1050
1052 {
1053 switch( posIdx )
1054 {
1055 case 0:
1056 return "doors_driver";
1057 break;
1058 case 1:
1059 return "doors_codriver";
1060 break;
1061 case 2:
1062 return "doors_cargo1";
1063 break;
1064 case 3:
1065 return "doors_cargo2";
1066 break;
1067 }
1068
1069 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1070 }
1071
1073 {
1074 switch( posIdx )
1075 {
1076 case 0:
1077 return "Hatchback_02_Door_1_1";
1078 break;
1079 case 1:
1080 return "Hatchback_02_Door_2_1";
1081 break;
1082 case 2:
1083 return "Hatchback_02_Door_1_2";
1084 break;
1085 case 3:
1086 return "Hatchback_02_Door_2_2";
1087 break;
1088 }
1089
1090 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1091 }
1092
1094 {
1095 switch (ctrl)
1096 {
1098 float newValue = 0;
1100 {
1101 newValue += 0.25;
1102 }
1103
1105 {
1106 newValue += 0.25;
1107 }
1108
1110 {
1111 newValue += 0.25;
1112 }
1113
1115 {
1116 newValue += 0.25;
1117 }
1118
1120 break;
1121 }
1122
1123 return super.OnSound(ctrl, oldValue);
1124 }
1125
1127 {
1128 switch( selection )
1129 {
1130 case "doors_driver":
1131 return "DoorsDriver";
1132 case "doors_codriver":
1133 return "DoorsCoDriver";
1134 case "doors_cargo1":
1135 return "DoorsCargo1";
1136 case "doors_cargo2":
1137 return "DoorsCargo2";
1138 case "doors_hood":
1139 return "DoorsHood";
1140 case "doors_trunk":
1141 return "DoorsTrunk";
1142 }
1143
1144 return "";
1145 }
1146
1148 {
1149 return false;
1150 }
1151
1153 {
1154 switch (currentSeat)
1155 {
1156 case 0:
1157 return nextSeat == 1;
1158 case 1:
1159 return nextSeat == 0;
1160 case 2:
1161 return nextSeat == 3;
1162 case 3:
1163 return nextSeat == 2;
1164 }
1165
1166 return false;
1167 }
1168
1170 {
1171 switch (pCurrentSeat)
1172 {
1173 case 0:
1174 return pDoorsSelection == "DoorsDriver";
1175 case 1:
1176 return pDoorsSelection == "DoorsCoDriver";
1177 case 2:
1178 return pDoorsSelection == "DoorsCargo1";
1179 case 3:
1180 return pDoorsSelection == "DoorsCargo2";
1181 }
1182
1183 return false;
1184 }
1185
1187 {
1189 SpawnAdditionalItems();
1190 FillUpCarFluids();
1191
1197
1204
1205
1208 }
1209}
1210
1212{
1214 {
1216 SpawnAdditionalItems();
1217 FillUpCarFluids();
1218
1219 GameInventory inventory = GetInventory();
1224
1231
1232
1235 }
1236}
1237
1239{
1241 {
1243 SpawnAdditionalItems();
1244 FillUpCarFluids();
1245
1246 GameInventory inventory = GetInventory();
1251
1258
1259
1262 }
1263}
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
Hatchback_02LightProfileFront VehicleLightProfileFront Hatchback_02LightProfileRear()
void Hatchback_02LightProfileFront()
UniversalTemperatureSourceLambdaBaseImpl UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceLambdaEngine()
void VehicleLightData(VehicleLightProfileBase profile)
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
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 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)
Hatchback_02 CarScript OnDebugSpawn()
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.