762{
766
768 {
769
770
777
778 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
779 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
780
783
787 });
791 });
792
795
797
799 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
800 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
801 }
802
804 {
808 }
809
811 {
812 super.EEInit();
813
815 {
822
825 }
826 }
827
829 {
830 return true;
831 }
832
834 {
835 return true;
836 }
837
839 {
840 super.GetElectricitySourceDevice();
841
843 }
844
846 {
847 return "CarBattery";
848 }
849
851 {
852 super.OnEngineStart();
853
855 {
858 }
859 }
860
862 {
863 super.OnEngineStop();
864
866 {
869 }
870 }
871
873 {
875 {
877 {
879 }
880 }
881 }
882
884 {
886 }
887
889 {
890 return 5.1;
891 }
892
894 {
895 return 1.5;
896 }
897
899 {
900 switch (posIdx)
901 {
902 case 0:
904 case 1:
906 case 2:
908 case 3:
910 }
911
912 return 0;
913 }
914
916 {
917 if (!super.CanReleaseAttachment(attachment))
918 {
919 return false;
920 }
921
922 string attType = attachment.GetType();
923 switch (attType)
924 {
925 case "CarBattery":
927 {
928 return false;
929 }
930 break;
931
932 case "GlowPlug":
934 {
935 return false;
936 }
937 break;
938 }
939
940 return true;
941 }
942
944 {
946 }
947
949 {
950 if ( !super.CanDisplayAttachmentCategory(category_name))
951 {
952 return false;
953 }
954
956 if (category_name.
Contains(
"engine"))
957 {
959 {
960 return false;
961 }
962 }
963
964 return true;
965 }
966
968 {
969 if ( !super.CanDisplayCargo() )
970 return false;
971
973 return false;
974
975 return true;
976 }
977
979 {
981
982 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
983 if (!carDoor)
984 {
986 }
987
988 switch (slotType)
989 {
990 case "Offroad_02_Door_1_1":
991 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
992
993 case "Offroad_02_Door_2_1":
994 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
995
996 case "Offroad_02_Door_1_2":
997 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
998
999 case "Offroad_02_Door_2_2":
1000 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
1001
1002 case "Offroad_02_Hood":
1003 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1004
1005 case "Offroad_02_Trunk":
1006 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1007 }
1008
1010 }
1011
1012
1014 {
1015 switch( posIdx )
1016 {
1017 case 0:
1019 return false;
1020
1021 return true;
1022 break;
1023
1024 case 1:
1026 return false;
1027
1028 return true;
1029 break;
1030
1031 case 2:
1033 return false;
1034
1035 return true;
1036 break;
1037
1038 case 3:
1040 return false;
1041
1042 return true;
1043 break;
1044 }
1045
1046 return false;
1047 }
1048
1050 {
1051 switch( posIdx )
1052 {
1053 case 0:
1054 return "doors_driver";
1055 break;
1056 case 1:
1057 return "doors_codriver";
1058 break;
1059 case 2:
1060 return "doors_cargo1";
1061 break;
1062 case 3:
1063 return "doors_cargo2";
1064 break;
1065 }
1066
1067 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1068 }
1069
1071 {
1072 switch (posIdx)
1073 {
1074 case 0:
1075 return "Offroad_02_Door_1_1";
1076 case 1:
1077 return "Offroad_02_Door_2_1";
1078 case 2:
1079 return "Offroad_02_Door_1_2";
1080 case 3:
1081 return "Offroad_02_Door_2_2";
1082 }
1083
1084 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1085 }
1086
1088 {
1089 switch ( ctrl )
1090 {
1092 float newValue = 0;
1094 {
1095 newValue += 0.25;
1096 }
1097
1099 {
1100 newValue += 0.25;
1101 }
1102
1104 {
1105 newValue += 0.25;
1106 }
1107
1109 {
1110 newValue += 0.25;
1111 }
1112
1114 break;
1115 }
1116
1117 return super.OnSound(ctrl, oldValue);
1118 }
1119
1121 {
1122 switch (selection)
1123 {
1124 case "doors_driver":
1125 return "DoorsDriver";
1126 case "doors_codriver":
1127 return "DoorsCoDriver";
1128 case "doors_cargo1":
1129 return "DoorsCargo1";
1130 case "doors_cargo2":
1131 return "DoorsCargo2";
1132 case "doors_hood":
1133 return "DoorsHood";
1134 case "doors_trunk":
1135 return "DoorsTrunk";
1136 }
1137
1138 return "";
1139 }
1140
1142 {
1143 switch (currentSeat)
1144 {
1145 case 0:
1146 return nextSeat == 1;
1147 case 1:
1148 return nextSeat == 0;
1149 case 2:
1150 return nextSeat == 3;
1151 case 3:
1152 return nextSeat == 2;
1153 }
1154
1155 return false;
1156 }
1157
1159 {
1160 switch (pCurrentSeat)
1161 {
1162 case 0:
1163 return pDoorsSelection == "DoorsDriver";
1164 case 1:
1165 return pDoorsSelection == "DoorsCoDriver";
1166 case 2:
1167 return pDoorsSelection == "DoorsCargo1";
1168 case 3:
1169 return pDoorsSelection == "DoorsCargo2";
1170 }
1171
1172 return false;
1173 }
1174
1176 {
1177 return false;
1178 }
1179
1181 {
1182 return false;
1183 }
1184
1186 {
1188 SpawnAdditionalItems();
1189 FillUpCarFluids();
1190
1196
1203
1204
1207 }
1208}
1209
1210
1212{
1214 {
1216 SpawnAdditionalItems();
1217 FillUpCarFluids();
1218
1219 GetInventory().CreateInInventory("Offroad_02_Wheel");
1220 GetInventory().CreateInInventory("Offroad_02_Wheel");
1221 GetInventory().CreateInInventory("Offroad_02_Wheel");
1222 GetInventory().CreateInInventory("Offroad_02_Wheel");
1223
1224 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1225 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1226 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1227 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1228 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1229 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1230
1231
1232 GetInventory().CreateInInventory("Offroad_02_Wheel");
1233 GetInventory().CreateInInventory("Offroad_02_Wheel");
1234 }
1235}
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.