705{
709
711 {
712
713
720
721 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
722 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
723
726
730 });
734 });
735
738
740
742 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
743 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
744 }
745
747 {
751 }
752
754 {
755 super.EEInit();
756
758 {
765
768 }
769 }
770
772 {
773 return true;
774 }
775
777 {
778 return true;
779 }
780
782 {
783 super.GetElectricitySourceDevice();
784
786 }
787
789 {
790 return "CarBattery";
791 }
792
794 {
795 super.OnEngineStart();
796
798 {
801 }
802 }
803
805 {
806 super.OnEngineStop();
807
809 {
812 }
813 }
814
816 {
818 {
820 {
822 }
823 }
824 }
825
827 {
829 }
830
832 {
833 return 5.1;
834 }
835
837 {
838 return 1.5;
839 }
840
842 {
843 switch (posIdx)
844 {
845 case 0:
847 case 1:
849 case 2:
851 case 3:
853 }
854
855 return 0;
856 }
857
859 {
860 if (!super.CanReleaseAttachment(attachment))
861 {
862 return false;
863 }
864
865 string attType = attachment.GetType();
866 switch (attType)
867 {
868 case "CarBattery":
870 {
871 return false;
872 }
873 break;
874
875 case "GlowPlug":
877 {
878 return false;
879 }
880 break;
881 }
882
883 return true;
884 }
885
887 {
889 }
890
892 {
893 if ( !super.CanDisplayAttachmentCategory(category_name))
894 {
895 return false;
896 }
897
899 if (category_name.
Contains(
"engine"))
900 {
902 {
903 return false;
904 }
905 }
906
907 return true;
908 }
909
911 {
912 if ( !super.CanDisplayCargo() )
913 return false;
914
916 return false;
917
918 return true;
919 }
920
922 {
924
925 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
926 if (!carDoor)
927 {
929 }
930
931 switch (slotType)
932 {
933 case "Offroad_02_Door_1_1":
934 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
935
936 case "Offroad_02_Door_2_1":
937 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
938
939 case "Offroad_02_Door_1_2":
940 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
941
942 case "Offroad_02_Door_2_2":
943 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
944
945 case "Offroad_02_Hood":
946 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
947
948 case "Offroad_02_Trunk":
949 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
950 }
951
953 }
954
955
957 {
958 switch( posIdx )
959 {
960 case 0:
962 return false;
963
964 return true;
965 break;
966
967 case 1:
969 return false;
970
971 return true;
972 break;
973
974 case 2:
976 return false;
977
978 return true;
979 break;
980
981 case 3:
983 return false;
984
985 return true;
986 break;
987 }
988
989 return false;
990 }
991
993 {
994 switch( posIdx )
995 {
996 case 0:
997 return "doors_driver";
998 break;
999 case 1:
1000 return "doors_codriver";
1001 break;
1002 case 2:
1003 return "doors_cargo1";
1004 break;
1005 case 3:
1006 return "doors_cargo2";
1007 break;
1008 }
1009
1010 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1011 }
1012
1014 {
1015 switch (posIdx)
1016 {
1017 case 0:
1018 return "Offroad_02_Door_1_1";
1019 case 1:
1020 return "Offroad_02_Door_2_1";
1021 case 2:
1022 return "Offroad_02_Door_1_2";
1023 case 3:
1024 return "Offroad_02_Door_2_2";
1025 }
1026
1027 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1028 }
1029
1031 {
1032 switch ( ctrl )
1033 {
1035 float newValue = 0;
1037 {
1038 newValue += 0.25;
1039 }
1040
1042 {
1043 newValue += 0.25;
1044 }
1045
1047 {
1048 newValue += 0.25;
1049 }
1050
1052 {
1053 newValue += 0.25;
1054 }
1055
1057 break;
1058 }
1059
1060 return super.OnSound(ctrl, oldValue);
1061 }
1062
1064 {
1065 switch (selection)
1066 {
1067 case "doors_driver":
1068 return "DoorsDriver";
1069 case "doors_codriver":
1070 return "DoorsCoDriver";
1071 case "doors_cargo1":
1072 return "DoorsCargo1";
1073 case "doors_cargo2":
1074 return "DoorsCargo2";
1075 case "doors_hood":
1076 return "DoorsHood";
1077 case "doors_trunk":
1078 return "DoorsTrunk";
1079 }
1080
1081 return "";
1082 }
1083
1085 {
1086 switch (currentSeat)
1087 {
1088 case 0:
1089 return nextSeat == 1;
1090 case 1:
1091 return nextSeat == 0;
1092 case 2:
1093 return nextSeat == 3;
1094 case 3:
1095 return nextSeat == 2;
1096 }
1097
1098 return false;
1099 }
1100
1102 {
1103 switch (pCurrentSeat)
1104 {
1105 case 0:
1106 return pDoorsSelection == "DoorsDriver";
1107 case 1:
1108 return pDoorsSelection == "DoorsCoDriver";
1109 case 2:
1110 return pDoorsSelection == "DoorsCargo1";
1111 case 3:
1112 return pDoorsSelection == "DoorsCargo2";
1113 }
1114
1115 return false;
1116 }
1117
1119 {
1120 return false;
1121 }
1122
1124 {
1125 return false;
1126 }
1127
1129 {
1131 SpawnAdditionalItems();
1132 FillUpCarFluids();
1133
1139
1146
1147
1150 }
1151}
1152
1153
1155{
1157 {
1159 SpawnAdditionalItems();
1160 FillUpCarFluids();
1161
1162 GetInventory().CreateInInventory("Offroad_02_Wheel");
1163 GetInventory().CreateInInventory("Offroad_02_Wheel");
1164 GetInventory().CreateInInventory("Offroad_02_Wheel");
1165 GetInventory().CreateInInventory("Offroad_02_Wheel");
1166
1167 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1168 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1169 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1170 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1171 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1172 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1173
1174
1175 GetInventory().CreateInInventory("Offroad_02_Wheel");
1176 GetInventory().CreateInInventory("Offroad_02_Wheel");
1177 }
1178}
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.