773{
777
779 {
780
781
788
789 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
790 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
791
794
797
799
801 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
802 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
803 }
804
806 {
810 }
811
813 {
814 super.EEInit();
815
817 {
824
827 }
828 }
829
831 {
832 return true;
833 }
834
836 {
837 super.GetElectricitySourceDevice();
838
840 }
841
843 {
844 return "CarBattery";
845 }
846
848 {
849 super.OnEngineStart();
850
852 {
855 }
856 }
857
859 {
860 super.OnEngineStop();
861
863 {
866 }
867 }
868
870 {
872 {
874 {
876 }
877 }
878 }
879
881 {
883 }
884
886 {
887 switch (posIdx)
888 {
889 case 0:
891 case 1:
893 case 2:
895 case 3:
897 }
898
899 return 0;
900 }
901
903 {
904 if (!super.CanReleaseAttachment(attachment))
905 {
906 return false;
907 }
908
910 {
911 string attType = attachment.GetType();
912 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
913 {
914 return false;
915 }
916 }
917
918 return true;
919 }
920
922 {
924 }
925
927 {
928
929 if ( !super.CanDisplayAttachmentCategory( category_name ) )
930 return false;
931
932
934 if ( category_name.
Contains(
"engine") )
935 {
937 return false;
938 }
939
940 return true;
941 }
942
944 {
945 if ( !super.CanDisplayCargo() )
946 return false;
947
949 return false;
950
951 return true;
952 }
953
955 {
957
958 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
959 if (!carDoor)
960 {
962 }
963
964 switch (slotType)
965 {
966 case "Hatchback_02_Door_1_1":
967 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
968
969 case "Hatchback_02_Door_2_1":
970 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
971
972 case "Hatchback_02_Door_1_2":
973 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
974
975 case "Hatchback_02_Door_2_2":
976 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
977
978 case "Hatchback_02_Hood":
979 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
980
981 case "Hatchback_02_Trunk":
982 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
983 }
984
986 }
987
988
990 {
991 switch (posIdx)
992 {
993 case 0:
995 {
996 return false;
997 }
998
999 return true;
1000
1001 case 1:
1003 {
1004 return false;
1005 }
1006
1007 return true;
1008
1009 case 2:
1011 {
1012 return false;
1013 }
1014
1015 return true;
1016
1017 case 3:
1019 {
1020 return false;
1021 }
1022
1023 return true;
1024 }
1025
1026 return false;
1027 }
1028
1030 {
1031 switch( posIdx )
1032 {
1033 case 0:
1034 return "doors_driver";
1035 break;
1036 case 1:
1037 return "doors_codriver";
1038 break;
1039 case 2:
1040 return "doors_cargo1";
1041 break;
1042 case 3:
1043 return "doors_cargo2";
1044 break;
1045 }
1046
1047 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1048 }
1049
1051 {
1052 switch( posIdx )
1053 {
1054 case 0:
1055 return "Hatchback_02_Door_1_1";
1056 break;
1057 case 1:
1058 return "Hatchback_02_Door_2_1";
1059 break;
1060 case 2:
1061 return "Hatchback_02_Door_1_2";
1062 break;
1063 case 3:
1064 return "Hatchback_02_Door_2_2";
1065 break;
1066 }
1067
1068 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1069 }
1070
1072 {
1073 switch (ctrl)
1074 {
1076 float newValue = 0;
1078 {
1079 newValue += 0.25;
1080 }
1081
1083 {
1084 newValue += 0.25;
1085 }
1086
1088 {
1089 newValue += 0.25;
1090 }
1091
1093 {
1094 newValue += 0.25;
1095 }
1096
1098 break;
1099 }
1100
1101 return super.OnSound(ctrl, oldValue);
1102 }
1103
1105 {
1106 switch( selection )
1107 {
1108 case "doors_driver":
1109 return "DoorsDriver";
1110 case "doors_codriver":
1111 return "DoorsCoDriver";
1112 case "doors_cargo1":
1113 return "DoorsCargo1";
1114 case "doors_cargo2":
1115 return "DoorsCargo2";
1116 case "doors_hood":
1117 return "DoorsHood";
1118 case "doors_trunk":
1119 return "DoorsTrunk";
1120 }
1121
1122 return "";
1123 }
1124
1126 {
1127 return false;
1128 }
1129
1131 {
1132 switch (currentSeat)
1133 {
1134 case 0:
1135 return nextSeat == 1;
1136 case 1:
1137 return nextSeat == 0;
1138 case 2:
1139 return nextSeat == 3;
1140 case 3:
1141 return nextSeat == 2;
1142 }
1143
1144 return false;
1145 }
1146
1148 {
1149 switch (pCurrentSeat)
1150 {
1151 case 0:
1152 return pDoorsSelection == "DoorsDriver";
1153 case 1:
1154 return pDoorsSelection == "DoorsCoDriver";
1155 case 2:
1156 return pDoorsSelection == "DoorsCargo1";
1157 case 3:
1158 return pDoorsSelection == "DoorsCargo2";
1159 }
1160
1161 return false;
1162 }
1163
1165 {
1167 SpawnAdditionalItems();
1168 FillUpCarFluids();
1169
1175
1182
1183
1186 }
1187}
1188
1190{
1192 {
1194 SpawnAdditionalItems();
1195 FillUpCarFluids();
1196
1197 GameInventory inventory = GetInventory();
1202
1209
1210
1213 }
1214}
1215
1217{
1219 {
1221 SpawnAdditionalItems();
1222 FillUpCarFluids();
1223
1224 GameInventory inventory = GetInventory();
1229
1236
1237
1240 }
1241}
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.