659{
663
665 {
666
667
674
675 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
676 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
677
680
684 });
688 });
689
692
694
696 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
697 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
698 }
699
701 {
705 }
706
708 {
709 super.EEInit();
710
712 {
719
722 }
723 }
724
726 {
727 return true;
728 }
729
731 {
732 return true;
733 }
734
736 {
737 super.GetElectricitySourceDevice();
738
740 }
741
743 {
744 return "CarBattery";
745 }
746
748 {
749 super.OnEngineStart();
750
752 {
755 }
756 }
757
759 {
760 super.OnEngineStop();
761
763 {
766 }
767 }
768
770 {
772 {
774 {
776 }
777 }
778 }
779
781 {
783 }
784
786 {
787 return 5.1;
788 }
789
791 {
792 return 1.5;
793 }
794
796 {
797 switch (posIdx)
798 {
799 case 0:
801 case 1:
803 case 2:
805 case 3:
807 }
808
809 return 0;
810 }
811
813 {
814 if (!super.CanReleaseAttachment(attachment))
815 {
816 return false;
817 }
818
819 string attType = attachment.GetType();
820 switch (attType)
821 {
822 case "CarBattery":
824 {
825 return false;
826 }
827 break;
828
829 case "GlowPlug":
831 {
832 return false;
833 }
834 break;
835 }
836
837 return true;
838 }
839
841 {
843 }
844
846 {
847 if ( !super.CanDisplayAttachmentCategory(category_name))
848 {
849 return false;
850 }
851
853 if (category_name.
Contains(
"engine"))
854 {
856 {
857 return false;
858 }
859 }
860
861 return true;
862 }
863
865 {
866 if ( !super.CanDisplayCargo() )
867 return false;
868
870 return false;
871
872 return true;
873 }
874
876 {
878
879 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
880 if (!carDoor)
881 {
883 }
884
885 switch (slotType)
886 {
887 case "Offroad_02_Door_1_1":
888 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
889
890 case "Offroad_02_Door_2_1":
891 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
892
893 case "Offroad_02_Door_1_2":
894 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
895
896 case "Offroad_02_Door_2_2":
897 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
898
899 case "Offroad_02_Hood":
900 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
901
902 case "Offroad_02_Trunk":
903 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
904 }
905
907 }
908
909
911 {
912 switch( posIdx )
913 {
914 case 0:
916 return false;
917
918 return true;
919 break;
920
921 case 1:
923 return false;
924
925 return true;
926 break;
927
928 case 2:
930 return false;
931
932 return true;
933 break;
934
935 case 3:
937 return false;
938
939 return true;
940 break;
941 }
942
943 return false;
944 }
945
947 {
948 switch( posIdx )
949 {
950 case 0:
951 return "doors_driver";
952 break;
953 case 1:
954 return "doors_codriver";
955 break;
956 case 2:
957 return "doors_cargo1";
958 break;
959 case 3:
960 return "doors_cargo2";
961 break;
962 }
963
964 return super.GetDoorSelectionNameFromSeatPos(posIdx);
965 }
966
968 {
969 switch (posIdx)
970 {
971 case 0:
972 return "Offroad_02_Door_1_1";
973 case 1:
974 return "Offroad_02_Door_2_1";
975 case 2:
976 return "Offroad_02_Door_1_2";
977 case 3:
978 return "Offroad_02_Door_2_2";
979 }
980
981 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
982 }
983
985 {
986 switch ( ctrl )
987 {
989 float newValue = 0;
991 {
992 newValue += 0.25;
993 }
994
996 {
997 newValue += 0.25;
998 }
999
1001 {
1002 newValue += 0.25;
1003 }
1004
1006 {
1007 newValue += 0.25;
1008 }
1009
1011 break;
1012 }
1013
1014 return super.OnSound(ctrl, oldValue);
1015 }
1016
1018 {
1019 switch (selection)
1020 {
1021 case "doors_driver":
1022 return "DoorsDriver";
1023 case "doors_codriver":
1024 return "DoorsCoDriver";
1025 case "doors_cargo1":
1026 return "DoorsCargo1";
1027 case "doors_cargo2":
1028 return "DoorsCargo2";
1029 case "doors_hood":
1030 return "DoorsHood";
1031 case "doors_trunk":
1032 return "DoorsTrunk";
1033 }
1034
1035 return "";
1036 }
1037
1039 {
1040 switch (currentSeat)
1041 {
1042 case 0:
1043 return nextSeat == 1;
1044 case 1:
1045 return nextSeat == 0;
1046 case 2:
1047 return nextSeat == 3;
1048 case 3:
1049 return nextSeat == 2;
1050 }
1051
1052 return false;
1053 }
1054
1056 {
1057 switch (pCurrentSeat)
1058 {
1059 case 0:
1060 return pDoorsSelection == "DoorsDriver";
1061 case 1:
1062 return pDoorsSelection == "DoorsCoDriver";
1063 case 2:
1064 return pDoorsSelection == "DoorsCargo1";
1065 case 3:
1066 return pDoorsSelection == "DoorsCargo2";
1067 }
1068
1069 return false;
1070 }
1071
1073 {
1074 return false;
1075 }
1076
1078 {
1079 return false;
1080 }
1081
1083 {
1085 SpawnAdditionalItems();
1086 FillUpCarFluids();
1087
1093
1100
1101
1104 }
1105}
1106
1107
1109{
1111 {
1113 SpawnAdditionalItems();
1114 FillUpCarFluids();
1115
1116 GetInventory().CreateInInventory("Offroad_02_Wheel");
1117 GetInventory().CreateInInventory("Offroad_02_Wheel");
1118 GetInventory().CreateInInventory("Offroad_02_Wheel");
1119 GetInventory().CreateInInventory("Offroad_02_Wheel");
1120
1121 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1122 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1123 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1124 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1125 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1126 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1127
1128
1129 GetInventory().CreateInInventory("Offroad_02_Wheel");
1130 GetInventory().CreateInInventory("Offroad_02_Wheel");
1131 }
1132}
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.