635{
639
641 {
642
643
650
651 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
652 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
653
656
660 });
664 });
665
668
670
672 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
673 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
674 }
675
677 {
681 }
682
684 {
685 super.EEInit();
686
688 {
695
698 }
699 }
700
702 {
703 return true;
704 }
705
707 {
708 return true;
709 }
710
712 {
713 super.GetElectricitySourceDevice();
714
716 }
717
719 {
720 return "CarBattery";
721 }
722
724 {
725 super.OnEngineStart();
726
728 {
731 }
732 }
733
735 {
736 super.OnEngineStop();
737
739 {
742 }
743 }
744
746 {
748 {
750 {
752 }
753 }
754 }
755
757 {
759 }
760
762 {
763 return 5.1;
764 }
765
767 {
768 return 1.5;
769 }
770
772 {
773 switch (posIdx)
774 {
775 case 0:
777 case 1:
779 case 2:
781 case 3:
783 }
784
785 return 0;
786 }
787
789 {
790 if (!super.CanReleaseAttachment(attachment))
791 {
792 return false;
793 }
794
795 string attType = attachment.GetType();
796 switch (attType)
797 {
798 case "CarBattery":
800 {
801 return false;
802 }
803 break;
804
805 case "GlowPlug":
807 {
808 return false;
809 }
810 break;
811 }
812
813 return true;
814 }
815
817 {
819 }
820
822 {
823 if ( !super.CanDisplayAttachmentCategory(category_name))
824 {
825 return false;
826 }
827
829 if (category_name.
Contains(
"engine"))
830 {
832 {
833 return false;
834 }
835 }
836
837 return true;
838 }
839
841 {
842 if ( !super.CanDisplayCargo() )
843 return false;
844
846 return false;
847
848 return true;
849 }
850
852 {
854
855 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
856 if (!carDoor)
857 {
859 }
860
861 switch (slotType)
862 {
863 case "Offroad_02_Door_1_1":
864 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
865
866 case "Offroad_02_Door_2_1":
867 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
868
869 case "Offroad_02_Door_1_2":
870 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
871
872 case "Offroad_02_Door_2_2":
873 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
874
875 case "Offroad_02_Hood":
876 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
877
878 case "Offroad_02_Trunk":
879 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
880 }
881
883 }
884
885
887 {
888 switch( posIdx )
889 {
890 case 0:
892 return false;
893
894 return true;
895 break;
896
897 case 1:
899 return false;
900
901 return true;
902 break;
903
904 case 2:
906 return false;
907
908 return true;
909 break;
910
911 case 3:
913 return false;
914
915 return true;
916 break;
917 }
918
919 return false;
920 }
921
923 {
924 switch( posIdx )
925 {
926 case 0:
927 return "doors_driver";
928 break;
929 case 1:
930 return "doors_codriver";
931 break;
932 case 2:
933 return "doors_cargo1";
934 break;
935 case 3:
936 return "doors_cargo2";
937 break;
938 }
939
940 return super.GetDoorSelectionNameFromSeatPos(posIdx);
941 }
942
944 {
945 switch (posIdx)
946 {
947 case 0:
948 return "Offroad_02_Door_1_1";
949 case 1:
950 return "Offroad_02_Door_2_1";
951 case 2:
952 return "Offroad_02_Door_1_2";
953 case 3:
954 return "Offroad_02_Door_2_2";
955 }
956
957 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
958 }
959
961 {
962 switch ( ctrl )
963 {
965 float newValue = 0;
967 {
968 newValue += 0.25;
969 }
970
972 {
973 newValue += 0.25;
974 }
975
977 {
978 newValue += 0.25;
979 }
980
982 {
983 newValue += 0.25;
984 }
985
987 break;
988 }
989
990 return super.OnSound(ctrl, oldValue);
991 }
992
994 {
995 switch (selection)
996 {
997 case "doors_driver":
998 return "DoorsDriver";
999 case "doors_codriver":
1000 return "DoorsCoDriver";
1001 case "doors_cargo1":
1002 return "DoorsCargo1";
1003 case "doors_cargo2":
1004 return "DoorsCargo2";
1005 case "doors_hood":
1006 return "DoorsHood";
1007 case "doors_trunk":
1008 return "DoorsTrunk";
1009 }
1010
1011 return "";
1012 }
1013
1015 {
1016 switch (currentSeat)
1017 {
1018 case 0:
1019 return nextSeat == 1;
1020 case 1:
1021 return nextSeat == 0;
1022 case 2:
1023 return nextSeat == 3;
1024 case 3:
1025 return nextSeat == 2;
1026 }
1027
1028 return false;
1029 }
1030
1032 {
1033 switch (pCurrentSeat)
1034 {
1035 case 0:
1036 return pDoorsSelection == "DoorsDriver";
1037 case 1:
1038 return pDoorsSelection == "DoorsCoDriver";
1039 case 2:
1040 return pDoorsSelection == "DoorsCargo1";
1041 case 3:
1042 return pDoorsSelection == "DoorsCargo2";
1043 }
1044
1045 return false;
1046 }
1047
1049 {
1050 return false;
1051 }
1052
1054 {
1055 return false;
1056 }
1057
1059 {
1061 SpawnAdditionalItems();
1062 FillUpCarFluids();
1063
1069
1076
1077
1080 }
1081}
1082
1083
1085{
1087 {
1089 SpawnAdditionalItems();
1090 FillUpCarFluids();
1091
1092 GetInventory().CreateInInventory("Offroad_02_Wheel");
1093 GetInventory().CreateInInventory("Offroad_02_Wheel");
1094 GetInventory().CreateInInventory("Offroad_02_Wheel");
1095 GetInventory().CreateInInventory("Offroad_02_Wheel");
1096
1097 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1098 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1099 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1100 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1101 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1102 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1103
1104
1105 GetInventory().CreateInInventory("Offroad_02_Wheel");
1106 GetInventory().CreateInInventory("Offroad_02_Wheel");
1107 }
1108}
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.