698{
702
704 {
705
706
713
714 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
715 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
716
719
722
724
726 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
727 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
728 }
729
731 {
735 }
736
738 {
739 super.EEInit();
740
742 {
749
752 }
753 }
754
756 {
757 return true;
758 }
759
761 {
762 super.GetElectricitySourceDevice();
763
765 }
766
768 {
769 return "CarBattery";
770 }
771
773 {
774 super.OnEngineStart();
775
777 {
780 }
781 }
782
784 {
785 super.OnEngineStop();
786
788 {
791 }
792 }
793
795 {
797 {
799 {
801 }
802 }
803 }
804
806 {
808 }
809
811 {
812 switch (posIdx)
813 {
814 case 0:
816 case 1:
818 case 2:
820 case 3:
822 }
823
824 return 0;
825 }
826
828 {
829 if (!super.CanReleaseAttachment(attachment))
830 {
831 return false;
832 }
833
835 {
836 string attType = attachment.GetType();
837 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
838 {
839 return false;
840 }
841 }
842
843 return true;
844 }
845
847 {
849 }
850
852 {
853
854 if ( !super.CanDisplayAttachmentCategory( category_name ) )
855 return false;
856
857
859 if ( category_name.
Contains(
"engine") )
860 {
862 return false;
863 }
864
865 return true;
866 }
867
869 {
870 if ( !super.CanDisplayCargo() )
871 return false;
872
874 return false;
875
876 return true;
877 }
878
880 {
882
883 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
884 if (!carDoor)
885 {
887 }
888
889 switch (slotType)
890 {
891 case "Hatchback_02_Door_1_1":
892 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
893
894 case "Hatchback_02_Door_2_1":
895 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
896
897 case "Hatchback_02_Door_1_2":
898 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
899
900 case "Hatchback_02_Door_2_2":
901 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
902
903 case "Hatchback_02_Hood":
904 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
905
906 case "Hatchback_02_Trunk":
907 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
908 }
909
911 }
912
913
915 {
916 switch (posIdx)
917 {
918 case 0:
920 {
921 return false;
922 }
923
924 return true;
925
926 case 1:
928 {
929 return false;
930 }
931
932 return true;
933
934 case 2:
936 {
937 return false;
938 }
939
940 return true;
941
942 case 3:
944 {
945 return false;
946 }
947
948 return true;
949 }
950
951 return false;
952 }
953
955 {
956 switch( posIdx )
957 {
958 case 0:
959 return "doors_driver";
960 break;
961 case 1:
962 return "doors_codriver";
963 break;
964 case 2:
965 return "doors_cargo1";
966 break;
967 case 3:
968 return "doors_cargo2";
969 break;
970 }
971
972 return super.GetDoorSelectionNameFromSeatPos(posIdx);
973 }
974
976 {
977 switch( posIdx )
978 {
979 case 0:
980 return "Hatchback_02_Door_1_1";
981 break;
982 case 1:
983 return "Hatchback_02_Door_2_1";
984 break;
985 case 2:
986 return "Hatchback_02_Door_1_2";
987 break;
988 case 3:
989 return "Hatchback_02_Door_2_2";
990 break;
991 }
992
993 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
994 }
995
997 {
998 switch (ctrl)
999 {
1001 float newValue = 0;
1003 {
1004 newValue += 0.25;
1005 }
1006
1008 {
1009 newValue += 0.25;
1010 }
1011
1013 {
1014 newValue += 0.25;
1015 }
1016
1018 {
1019 newValue += 0.25;
1020 }
1021
1023 break;
1024 }
1025
1026 return super.OnSound(ctrl, oldValue);
1027 }
1028
1030 {
1031 switch( selection )
1032 {
1033 case "doors_driver":
1034 return "DoorsDriver";
1035 case "doors_codriver":
1036 return "DoorsCoDriver";
1037 case "doors_cargo1":
1038 return "DoorsCargo1";
1039 case "doors_cargo2":
1040 return "DoorsCargo2";
1041 case "doors_hood":
1042 return "DoorsHood";
1043 case "doors_trunk":
1044 return "DoorsTrunk";
1045 }
1046
1047 return "";
1048 }
1049
1051 {
1052 return false;
1053 }
1054
1056 {
1057 switch (currentSeat)
1058 {
1059 case 0:
1060 return nextSeat == 1;
1061 case 1:
1062 return nextSeat == 0;
1063 case 2:
1064 return nextSeat == 3;
1065 case 3:
1066 return nextSeat == 2;
1067 }
1068
1069 return false;
1070 }
1071
1073 {
1074 switch (pCurrentSeat)
1075 {
1076 case 0:
1077 return pDoorsSelection == "DoorsDriver";
1078 case 1:
1079 return pDoorsSelection == "DoorsCoDriver";
1080 case 2:
1081 return pDoorsSelection == "DoorsCargo1";
1082 case 3:
1083 return pDoorsSelection == "DoorsCargo2";
1084 }
1085
1086 return false;
1087 }
1088
1090 {
1092 SpawnAdditionalItems();
1093 FillUpCarFluids();
1094
1100
1107
1108
1111 }
1112}
1113
1115{
1117 {
1119 SpawnAdditionalItems();
1120 FillUpCarFluids();
1121
1122 GameInventory inventory = GetInventory();
1127
1134
1135
1138 }
1139}
1140
1142{
1144 {
1146 SpawnAdditionalItems();
1147 FillUpCarFluids();
1148
1149 GameInventory inventory = GetInventory();
1154
1161
1162
1165 }
1166}
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.