778{
782
784 {
785
786
793
794 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
795 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
796
799
802
804
806 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
807 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
808 }
809
811 {
815 }
816
818 {
819 super.EEInit();
820
822 {
829
832 }
833 }
834
836 {
837 return true;
838 }
839
841 {
842 super.GetElectricitySourceDevice();
843
845 }
846
848 {
849 return "CarBattery";
850 }
851
853 {
854 super.OnEngineStart();
855
857 {
860 }
861 }
862
864 {
865 super.OnEngineStop();
866
868 {
871 }
872 }
873
875 {
877 {
879 {
881 }
882 }
883 }
884
886 {
888 }
889
891 {
892 switch (posIdx)
893 {
894 case 0:
896 case 1:
898 case 2:
900 case 3:
902 }
903
904 return 0;
905 }
906
908 {
909 if (!super.CanReleaseAttachment(attachment))
910 {
911 return false;
912 }
913
915 {
916 string attType = attachment.GetType();
917 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
918 {
919 return false;
920 }
921 }
922
923 return true;
924 }
925
927 {
929 }
930
932 {
933
934 if ( !super.CanDisplayAttachmentCategory( category_name ) )
935 return false;
936
937
939 if ( category_name.
Contains(
"engine") )
940 {
942 return false;
943 }
944
945 return true;
946 }
947
949 {
950 if ( !super.CanDisplayCargo() )
951 return false;
952
954 return false;
955
956 return true;
957 }
958
960 {
962
963 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
964 if (!carDoor)
965 {
967 }
968
969 switch (slotType)
970 {
971 case "Hatchback_02_Door_1_1":
972 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
973
974 case "Hatchback_02_Door_2_1":
975 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
976
977 case "Hatchback_02_Door_1_2":
978 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
979
980 case "Hatchback_02_Door_2_2":
981 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
982
983 case "Hatchback_02_Hood":
984 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
985
986 case "Hatchback_02_Trunk":
987 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
988 }
989
991 }
992
993
995 {
996 switch (posIdx)
997 {
998 case 0:
1000 {
1001 return false;
1002 }
1003
1004 return true;
1005
1006 case 1:
1008 {
1009 return false;
1010 }
1011
1012 return true;
1013
1014 case 2:
1016 {
1017 return false;
1018 }
1019
1020 return true;
1021
1022 case 3:
1024 {
1025 return false;
1026 }
1027
1028 return true;
1029 }
1030
1031 return false;
1032 }
1033
1035 {
1036 switch( posIdx )
1037 {
1038 case 0:
1039 return "doors_driver";
1040 break;
1041 case 1:
1042 return "doors_codriver";
1043 break;
1044 case 2:
1045 return "doors_cargo1";
1046 break;
1047 case 3:
1048 return "doors_cargo2";
1049 break;
1050 }
1051
1052 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1053 }
1054
1056 {
1057 switch( posIdx )
1058 {
1059 case 0:
1060 return "Hatchback_02_Door_1_1";
1061 break;
1062 case 1:
1063 return "Hatchback_02_Door_2_1";
1064 break;
1065 case 2:
1066 return "Hatchback_02_Door_1_2";
1067 break;
1068 case 3:
1069 return "Hatchback_02_Door_2_2";
1070 break;
1071 }
1072
1073 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1074 }
1075
1077 {
1078 switch (ctrl)
1079 {
1081 float newValue = 0;
1083 {
1084 newValue += 0.25;
1085 }
1086
1088 {
1089 newValue += 0.25;
1090 }
1091
1093 {
1094 newValue += 0.25;
1095 }
1096
1098 {
1099 newValue += 0.25;
1100 }
1101
1103 break;
1104 }
1105
1106 return super.OnSound(ctrl, oldValue);
1107 }
1108
1110 {
1111 switch( selection )
1112 {
1113 case "doors_driver":
1114 return "DoorsDriver";
1115 case "doors_codriver":
1116 return "DoorsCoDriver";
1117 case "doors_cargo1":
1118 return "DoorsCargo1";
1119 case "doors_cargo2":
1120 return "DoorsCargo2";
1121 case "doors_hood":
1122 return "DoorsHood";
1123 case "doors_trunk":
1124 return "DoorsTrunk";
1125 }
1126
1127 return "";
1128 }
1129
1131 {
1132 return false;
1133 }
1134
1136 {
1137 switch (currentSeat)
1138 {
1139 case 0:
1140 return nextSeat == 1;
1141 case 1:
1142 return nextSeat == 0;
1143 case 2:
1144 return nextSeat == 3;
1145 case 3:
1146 return nextSeat == 2;
1147 }
1148
1149 return false;
1150 }
1151
1153 {
1154 switch (pCurrentSeat)
1155 {
1156 case 0:
1157 return pDoorsSelection == "DoorsDriver";
1158 case 1:
1159 return pDoorsSelection == "DoorsCoDriver";
1160 case 2:
1161 return pDoorsSelection == "DoorsCargo1";
1162 case 3:
1163 return pDoorsSelection == "DoorsCargo2";
1164 }
1165
1166 return false;
1167 }
1168
1170 {
1172 SpawnAdditionalItems();
1173 FillUpCarFluids();
1174
1180
1187
1188
1191 }
1192}
1193
1195{
1197 {
1199 SpawnAdditionalItems();
1200 FillUpCarFluids();
1201
1202 GameInventory inventory = GetInventory();
1207
1214
1215
1218 }
1219}
1220
1222{
1224 {
1226 SpawnAdditionalItems();
1227 FillUpCarFluids();
1228
1229 GameInventory inventory = GetInventory();
1234
1241
1242
1245 }
1246}
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.