602{
606
608 {
609
610
617
618 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
619 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
620
623
626
628
630 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
631 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
632 }
633
635 {
639 }
640
642 {
643 super.EEInit();
644
646 {
653
656 }
657 }
658
660 {
661 return true;
662 }
663
665 {
666 super.GetElectricitySourceDevice();
667
669 }
670
672 {
673 return "CarBattery";
674 }
675
677 {
678 super.OnEngineStart();
679
681 {
684 }
685 }
686
688 {
689 super.OnEngineStop();
690
692 {
695 }
696 }
697
699 {
701 {
703 {
705 }
706 }
707 }
708
710 {
712 }
713
715 {
716 switch (posIdx)
717 {
718 case 0:
720 case 1:
722 case 2:
724 case 3:
726 }
727
728 return 0;
729 }
730
732 {
733 if (!super.CanReleaseAttachment(attachment))
734 {
735 return false;
736 }
737
739 {
740 string attType = attachment.GetType();
741 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
742 {
743 return false;
744 }
745 }
746
747 return true;
748 }
749
751 {
753 }
754
756 {
757
758 if ( !super.CanDisplayAttachmentCategory( category_name ) )
759 return false;
760
761
763 if ( category_name.
Contains(
"engine") )
764 {
766 return false;
767 }
768
769 return true;
770 }
771
773 {
774 if ( !super.CanDisplayCargo() )
775 return false;
776
778 return false;
779
780 return true;
781 }
782
784 {
786
787 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
788 if (!carDoor)
789 {
791 }
792
793 switch (slotType)
794 {
795 case "Hatchback_02_Door_1_1":
796 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
797
798 case "Hatchback_02_Door_2_1":
799 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
800
801 case "Hatchback_02_Door_1_2":
802 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
803
804 case "Hatchback_02_Door_2_2":
805 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
806
807 case "Hatchback_02_Hood":
808 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
809
810 case "Hatchback_02_Trunk":
811 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
812 }
813
815 }
816
817
819 {
820 switch (posIdx)
821 {
822 case 0:
824 {
825 return false;
826 }
827
828 return true;
829
830 case 1:
832 {
833 return false;
834 }
835
836 return true;
837
838 case 2:
840 {
841 return false;
842 }
843
844 return true;
845
846 case 3:
848 {
849 return false;
850 }
851
852 return true;
853 }
854
855 return false;
856 }
857
859 {
860 switch( posIdx )
861 {
862 case 0:
863 return "doors_driver";
864 break;
865 case 1:
866 return "doors_codriver";
867 break;
868 case 2:
869 return "doors_cargo1";
870 break;
871 case 3:
872 return "doors_cargo2";
873 break;
874 }
875
876 return super.GetDoorSelectionNameFromSeatPos(posIdx);
877 }
878
880 {
881 switch( posIdx )
882 {
883 case 0:
884 return "Hatchback_02_Door_1_1";
885 break;
886 case 1:
887 return "Hatchback_02_Door_2_1";
888 break;
889 case 2:
890 return "Hatchback_02_Door_1_2";
891 break;
892 case 3:
893 return "Hatchback_02_Door_2_2";
894 break;
895 }
896
897 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
898 }
899
901 {
902 switch (ctrl)
903 {
905 float newValue = 0;
907 {
908 newValue += 0.25;
909 }
910
912 {
913 newValue += 0.25;
914 }
915
917 {
918 newValue += 0.25;
919 }
920
922 {
923 newValue += 0.25;
924 }
925
927 break;
928 }
929
930 return super.OnSound(ctrl, oldValue);
931 }
932
934 {
935 switch( selection )
936 {
937 case "doors_driver":
938 return "DoorsDriver";
939 case "doors_codriver":
940 return "DoorsCoDriver";
941 case "doors_cargo1":
942 return "DoorsCargo1";
943 case "doors_cargo2":
944 return "DoorsCargo2";
945 case "doors_hood":
946 return "DoorsHood";
947 case "doors_trunk":
948 return "DoorsTrunk";
949 }
950
951 return "";
952 }
953
955 {
956 return false;
957 }
958
960 {
961 switch (currentSeat)
962 {
963 case 0:
964 return nextSeat == 1;
965 case 1:
966 return nextSeat == 0;
967 case 2:
968 return nextSeat == 3;
969 case 3:
970 return nextSeat == 2;
971 }
972
973 return false;
974 }
975
977 {
978 switch (pCurrentSeat)
979 {
980 case 0:
981 return pDoorsSelection == "DoorsDriver";
982 case 1:
983 return pDoorsSelection == "DoorsCoDriver";
984 case 2:
985 return pDoorsSelection == "DoorsCargo1";
986 case 3:
987 return pDoorsSelection == "DoorsCargo2";
988 }
989
990 return false;
991 }
992
994 {
996 SpawnAdditionalItems();
997 FillUpCarFluids();
998
1004
1011
1012
1015 }
1016}
1017
1019{
1021 {
1023 SpawnAdditionalItems();
1024 FillUpCarFluids();
1025
1026 GameInventory inventory = GetInventory();
1031
1038
1039
1042 }
1043}
1044
1046{
1048 {
1050 SpawnAdditionalItems();
1051 FillUpCarFluids();
1052
1053 GameInventory inventory = GetInventory();
1058
1065
1066
1069 }
1070}
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.