779{
783
785 {
786
787
794
795 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
796 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
797
800
804 });
808 });
809
812
814
816 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
817 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
818 }
819
821 {
825 }
826
828 {
829 super.EEInit();
830
832 {
839
842 }
843 }
844
846 {
847 return true;
848 }
849
851 {
852 return true;
853 }
854
856 {
857 super.GetElectricitySourceDevice();
858
860 }
861
863 {
864 return "CarBattery";
865 }
866
868 {
869 super.OnEngineStart();
870
872 {
875 }
876 }
877
879 {
880 super.OnEngineStop();
881
883 {
886 }
887 }
888
890 {
892 {
894 {
896 }
897 }
898 }
899
901 {
903 }
904
906 {
907 return 5.1;
908 }
909
911 {
912 return 1.5;
913 }
914
916 {
917 switch (posIdx)
918 {
919 case 0:
921 case 1:
923 case 2:
925 case 3:
927 }
928
929 return 0;
930 }
931
933 {
934 if (!super.CanReleaseAttachment(attachment))
935 {
936 return false;
937 }
938
939 string attType = attachment.GetType();
940 switch (attType)
941 {
942 case "CarBattery":
944 {
945 return false;
946 }
947 break;
948
949 case "GlowPlug":
951 {
952 return false;
953 }
954 break;
955 }
956
957 return true;
958 }
959
961 {
963 }
964
966 {
967 if ( !super.CanDisplayAttachmentCategory(category_name))
968 {
969 return false;
970 }
971
973 if (category_name.
Contains(
"engine"))
974 {
976 {
977 return false;
978 }
979 }
980
981 return true;
982 }
983
985 {
986 if ( !super.CanDisplayCargo() )
987 return false;
988
990 return false;
991
992 return true;
993 }
994
996 {
998
999 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
1000 if (!carDoor)
1001 {
1003 }
1004
1005 switch (slotType)
1006 {
1007 case "Offroad_02_Door_1_1":
1008 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
1009
1010 case "Offroad_02_Door_2_1":
1011 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
1012
1013 case "Offroad_02_Door_1_2":
1014 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
1015
1016 case "Offroad_02_Door_2_2":
1017 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
1018
1019 case "Offroad_02_Hood":
1020 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1021
1022 case "Offroad_02_Trunk":
1023 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1024 }
1025
1027 }
1028
1029
1031 {
1032 switch( posIdx )
1033 {
1034 case 0:
1036 return false;
1037
1038 return true;
1039 break;
1040
1041 case 1:
1043 return false;
1044
1045 return true;
1046 break;
1047
1048 case 2:
1050 return false;
1051
1052 return true;
1053 break;
1054
1055 case 3:
1057 return false;
1058
1059 return true;
1060 break;
1061 }
1062
1063 return false;
1064 }
1065
1067 {
1068 switch( posIdx )
1069 {
1070 case 0:
1071 return "doors_driver";
1072 break;
1073 case 1:
1074 return "doors_codriver";
1075 break;
1076 case 2:
1077 return "doors_cargo1";
1078 break;
1079 case 3:
1080 return "doors_cargo2";
1081 break;
1082 }
1083
1084 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1085 }
1086
1088 {
1089 switch (posIdx)
1090 {
1091 case 0:
1092 return "Offroad_02_Door_1_1";
1093 case 1:
1094 return "Offroad_02_Door_2_1";
1095 case 2:
1096 return "Offroad_02_Door_1_2";
1097 case 3:
1098 return "Offroad_02_Door_2_2";
1099 }
1100
1101 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1102 }
1103
1105 {
1106 switch ( ctrl )
1107 {
1109 float newValue = 0;
1111 {
1112 newValue += 0.25;
1113 }
1114
1116 {
1117 newValue += 0.25;
1118 }
1119
1121 {
1122 newValue += 0.25;
1123 }
1124
1126 {
1127 newValue += 0.25;
1128 }
1129
1131 break;
1132 }
1133
1134 return super.OnSound(ctrl, oldValue);
1135 }
1136
1138 {
1139 switch (selection)
1140 {
1141 case "doors_driver":
1142 return "DoorsDriver";
1143 case "doors_codriver":
1144 return "DoorsCoDriver";
1145 case "doors_cargo1":
1146 return "DoorsCargo1";
1147 case "doors_cargo2":
1148 return "DoorsCargo2";
1149 case "doors_hood":
1150 return "DoorsHood";
1151 case "doors_trunk":
1152 return "DoorsTrunk";
1153 }
1154
1155 return "";
1156 }
1157
1159 {
1160 switch (currentSeat)
1161 {
1162 case 0:
1163 return nextSeat == 1;
1164 case 1:
1165 return nextSeat == 0;
1166 case 2:
1167 return nextSeat == 3;
1168 case 3:
1169 return nextSeat == 2;
1170 }
1171
1172 return false;
1173 }
1174
1176 {
1177 switch (pCurrentSeat)
1178 {
1179 case 0:
1180 return pDoorsSelection == "DoorsDriver";
1181 case 1:
1182 return pDoorsSelection == "DoorsCoDriver";
1183 case 2:
1184 return pDoorsSelection == "DoorsCargo1";
1185 case 3:
1186 return pDoorsSelection == "DoorsCargo2";
1187 }
1188
1189 return false;
1190 }
1191
1193 {
1194 return false;
1195 }
1196
1198 {
1199 return false;
1200 }
1201
1203 {
1205 SpawnAdditionalItems();
1206 FillUpCarFluids();
1207
1213
1220
1221
1224 }
1225}
1226
1227
1229{
1231 {
1233 SpawnAdditionalItems();
1234 FillUpCarFluids();
1235
1236 GetInventory().CreateInInventory("Offroad_02_Wheel");
1237 GetInventory().CreateInInventory("Offroad_02_Wheel");
1238 GetInventory().CreateInInventory("Offroad_02_Wheel");
1239 GetInventory().CreateInInventory("Offroad_02_Wheel");
1240
1241 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1242 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1243 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1244 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1245 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1246 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1247
1248
1249 GetInventory().CreateInInventory("Offroad_02_Wheel");
1250 GetInventory().CreateInInventory("Offroad_02_Wheel");
1251 }
1252}
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.