708{
712
714 {
715
716
723
724 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
725 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
726
729
732
734
736 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
737 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
738 }
739
741 {
745 }
746
748 {
749 super.EEInit();
750
752 {
759
762 }
763 }
764
766 {
767 return true;
768 }
769
771 {
772 super.GetElectricitySourceDevice();
773
775 }
776
778 {
779 return "CarBattery";
780 }
781
783 {
784 super.OnEngineStart();
785
787 {
790 }
791 }
792
794 {
795 super.OnEngineStop();
796
798 {
801 }
802 }
803
805 {
807 {
809 {
811 }
812 }
813 }
814
816 {
818 }
819
821 {
822 return 4.5;
823 }
824
826 {
827 switch (posIdx)
828 {
829 case 0:
831 case 1:
833 case 2:
835 case 3:
837 }
838
839 return 0;
840 }
841
843 {
844 if( !super.CanReleaseAttachment( attachment ) )
845 return false;
846
847 string attType = attachment.GetType();
848
850 {
851 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
852 return false;
853 }
854
855 return true;
856 }
857
859 {
861 }
862
864 {
865
866 if (!super.CanDisplayAttachmentCategory(category_name))
867 return false;
868
869
871 if (category_name.
Contains(
"engine"))
872 {
874 return false;
875 }
876
877 return true;
878 }
879
881 {
882 if ( !super.CanDisplayCargo() )
883 return false;
884
886 return false;
887
888 return true;
889 }
890
892 {
894
895 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
896 if (!carDoor)
897 {
899 }
900
901 switch (slotType)
902 {
903 case "CivSedanDriverDoors":
904 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
905 break;
906
907 case "CivSedanCoDriverDoors":
908 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
909 break;
910
911 case "CivSedanCargo1Doors":
912 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
913 break;
914
915 case "CivSedanCargo2Doors":
916 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
917 break;
918
919 case "CivSedanTrunk":
920 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
921 break;
922
923 case "CivSedanHood":
924 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
925 break;
926 }
927
929 }
930
931
933 {
934 switch( posIdx )
935 {
936 case 0:
938 return false;
939
940 return true;
941 break;
942
943 case 1:
945 return false;
946
947 return true;
948 break;
949
950 case 2:
952 return false;
953
954 return true;
955 break;
956
957 case 3:
959 return false;
960
961 return true;
962 break;
963 }
964
965 return false;
966 }
967
969 {
970 switch( posIdx )
971 {
972 case 0:
973 return "doors_driver";
974 break;
975 case 1:
976 return "doors_codriver";
977 break;
978 case 2:
979 return "doors_cargo1";
980 break;
981 case 3:
982 return "doors_cargo2";
983 break;
984 }
985
986 return super.GetDoorSelectionNameFromSeatPos(posIdx);
987 }
988
990 {
991 switch( posIdx )
992 {
993 case 0:
994 return "CivSedanDriverDoors";
995 break;
996 case 1:
997 return "CivSedanCoDriverDoors";
998 break;
999 case 2:
1000 return "CivSedanCargo1Doors";
1001 break;
1002 case 3:
1003 return "CivSedanCargo2Doors";
1004 break;
1005 }
1006
1007 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1008 }
1009
1010
1011
1013 {
1014 switch (ctrl)
1015 {
1017 float newValue = 0;
1019 {
1020 newValue += 0.25;
1021 }
1022
1024 {
1025 newValue += 0.25;
1026 }
1027
1029 {
1030 newValue += 0.25;
1031 }
1032
1034 {
1035 newValue += 0.25;
1036 }
1037
1039 {
1040 newValue -= 0.6;
1041 }
1042
1044 {
1045 newValue -= 0.6;
1046 }
1047
1049 break;
1050 }
1051
1052 return super.OnSound(ctrl, oldValue);
1053 }
1054
1056 {
1057 switch (selection)
1058 {
1059 case "doors_driver":
1060 return "DoorsDriver";
1061 case "doors_codriver":
1062 return "DoorsCoDriver";
1063 case "doors_cargo1":
1064 return "DoorsCargo1";
1065 case "doors_cargo2":
1066 return "DoorsCargo2";
1067 case "doors_hood":
1068 return "DoorsHood";
1069 case "doors_trunk":
1070 return "DoorsTrunk";
1071 }
1072
1073 return "";
1074 }
1075
1077 {
1078 return false;
1079 }
1080
1082 {
1083 switch (currentSeat)
1084 {
1085 case 0:
1086 return nextSeat == 1;
1087
1088 case 1:
1089 return nextSeat == 0;
1090
1091 case 2:
1092 return nextSeat == 3;
1093
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
1108 case 1:
1109 return pDoorsSelection == "DoorsCoDriver";
1110
1111 case 2:
1112 return pDoorsSelection == "DoorsCargo1";
1113
1114 case 3:
1115 return pDoorsSelection == "DoorsCargo2";
1116 }
1117
1118 return false;
1119 }
1120
1122 {
1124 SpawnAdditionalItems();
1125 FillUpCarFluids();
1126
1132
1139
1140
1143 }
1144
1146 {
1147 return 1.5;
1148 }
1149}
1150
1152{
1154 {
1156 SpawnAdditionalItems();
1157 FillUpCarFluids();
1158
1159 GameInventory inventory = GetInventory();
1164
1171
1172
1175 }
1176}
1177
1179{
1181 {
1183 SpawnAdditionalItems();
1184 FillUpCarFluids();
1185
1186 GameInventory inventory = GetInventory();
1191
1198
1199
1202 }
1203}
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
void CivilianSedanLightProfileFront()
CivilianSedanLightProfileFront VehicleLightProfileFront CivilianSedanLightProfileRear()
UniversalTemperatureSourceLambdaBaseImpl UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceLambdaEngine()
void VehicleLightData(VehicleLightProfileBase profile)
override float GetPushForceCoefficientMultiplier()
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()
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
override float GetTransportCameraDistance()
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)
CivilianSedan CarScript OnDebugSpawn()
override bool CanDisplayAttachmentCategory(string category_name)
override void OnDebugSpawn()
override void OnDebugSpawn()
Super root of all classes in Enforce script.
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
script counterpart to engine's class Inventory
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.