752{
756
758 {
759
760
767
768 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
769 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
770
773
776
778
780 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
781 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
782 }
783
785 {
789 }
790
792 {
793 super.EEInit();
794
796 {
803
806 }
807 }
808
810 {
811 return true;
812 }
813
815 {
816 super.GetElectricitySourceDevice();
817
819 }
820
822 {
823 return "CarBattery";
824 }
825
827 {
828 super.OnEngineStart();
829
831 {
834 }
835 }
836
838 {
839 super.OnEngineStop();
840
842 {
845 }
846 }
847
849 {
851 {
853 {
855 }
856 }
857 }
858
860 {
862 }
863
865 {
866 switch (posIdx)
867 {
868 case 0:
870 case 1:
872 case 2:
874 case 3:
876 }
877
878 return 0;
879 }
880
882 {
883 if (!super.CanReleaseAttachment(attachment))
884 {
885 return false;
886 }
887
889 {
890 string attType = attachment.GetType();
891 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
892 {
893 return false;
894 }
895 }
896
897 return true;
898 }
899
901 {
903 }
904
906 {
907
908 if ( !super.CanDisplayAttachmentCategory( category_name ) )
909 return false;
910
911
913 if ( category_name.
Contains(
"engine") )
914 {
916 return false;
917 }
918
919 return true;
920 }
921
923 {
924 if ( !super.CanDisplayCargo() )
925 return false;
926
928 return false;
929
930 return true;
931 }
932
934 {
936
937 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
938 if (!carDoor)
939 {
941 }
942
943 switch (slotType)
944 {
945 case "Hatchback_02_Door_1_1":
946 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
947
948 case "Hatchback_02_Door_2_1":
949 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
950
951 case "Hatchback_02_Door_1_2":
952 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
953
954 case "Hatchback_02_Door_2_2":
955 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
956
957 case "Hatchback_02_Hood":
958 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
959
960 case "Hatchback_02_Trunk":
961 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
962 }
963
965 }
966
967
969 {
970 switch (posIdx)
971 {
972 case 0:
974 {
975 return false;
976 }
977
978 return true;
979
980 case 1:
982 {
983 return false;
984 }
985
986 return true;
987
988 case 2:
990 {
991 return false;
992 }
993
994 return true;
995
996 case 3:
998 {
999 return false;
1000 }
1001
1002 return true;
1003 }
1004
1005 return false;
1006 }
1007
1009 {
1010 switch( posIdx )
1011 {
1012 case 0:
1013 return "doors_driver";
1014 break;
1015 case 1:
1016 return "doors_codriver";
1017 break;
1018 case 2:
1019 return "doors_cargo1";
1020 break;
1021 case 3:
1022 return "doors_cargo2";
1023 break;
1024 }
1025
1026 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1027 }
1028
1030 {
1031 switch( posIdx )
1032 {
1033 case 0:
1034 return "Hatchback_02_Door_1_1";
1035 break;
1036 case 1:
1037 return "Hatchback_02_Door_2_1";
1038 break;
1039 case 2:
1040 return "Hatchback_02_Door_1_2";
1041 break;
1042 case 3:
1043 return "Hatchback_02_Door_2_2";
1044 break;
1045 }
1046
1047 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1048 }
1049
1051 {
1052 switch (ctrl)
1053 {
1055 float newValue = 0;
1057 {
1058 newValue += 0.25;
1059 }
1060
1062 {
1063 newValue += 0.25;
1064 }
1065
1067 {
1068 newValue += 0.25;
1069 }
1070
1072 {
1073 newValue += 0.25;
1074 }
1075
1077 break;
1078 }
1079
1080 return super.OnSound(ctrl, oldValue);
1081 }
1082
1084 {
1085 switch( selection )
1086 {
1087 case "doors_driver":
1088 return "DoorsDriver";
1089 case "doors_codriver":
1090 return "DoorsCoDriver";
1091 case "doors_cargo1":
1092 return "DoorsCargo1";
1093 case "doors_cargo2":
1094 return "DoorsCargo2";
1095 case "doors_hood":
1096 return "DoorsHood";
1097 case "doors_trunk":
1098 return "DoorsTrunk";
1099 }
1100
1101 return "";
1102 }
1103
1105 {
1106 return false;
1107 }
1108
1110 {
1111 switch (currentSeat)
1112 {
1113 case 0:
1114 return nextSeat == 1;
1115 case 1:
1116 return nextSeat == 0;
1117 case 2:
1118 return nextSeat == 3;
1119 case 3:
1120 return nextSeat == 2;
1121 }
1122
1123 return false;
1124 }
1125
1127 {
1128 switch (pCurrentSeat)
1129 {
1130 case 0:
1131 return pDoorsSelection == "DoorsDriver";
1132 case 1:
1133 return pDoorsSelection == "DoorsCoDriver";
1134 case 2:
1135 return pDoorsSelection == "DoorsCargo1";
1136 case 3:
1137 return pDoorsSelection == "DoorsCargo2";
1138 }
1139
1140 return false;
1141 }
1142
1144 {
1146 SpawnAdditionalItems();
1147 FillUpCarFluids();
1148
1154
1161
1162
1165 }
1166}
1167
1169{
1171 {
1173 SpawnAdditionalItems();
1174 FillUpCarFluids();
1175
1176 GameInventory inventory = GetInventory();
1181
1188
1189
1192 }
1193}
1194
1196{
1198 {
1200 SpawnAdditionalItems();
1201 FillUpCarFluids();
1202
1203 GameInventory inventory = GetInventory();
1208
1215
1216
1219 }
1220}
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.