591{
595
597 {
598
599
606
607 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
608 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
609
612
615
617
619 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
620 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
621 }
622
624 {
628 }
629
631 {
632 super.EEInit();
633
635 {
642
645 }
646 }
647
649 {
650 return true;
651 }
652
654 {
655 super.GetElectricitySourceDevice();
656
658 }
659
661 {
662 return "CarBattery";
663 }
664
666 {
667 super.OnEngineStart();
668
670 {
673 }
674 }
675
677 {
678 super.OnEngineStop();
679
681 {
684 }
685 }
686
688 {
690 {
692 {
694 }
695 }
696 }
697
699 {
701 }
702
704 {
705 switch (posIdx)
706 {
707 case 0:
709 case 1:
711 case 2:
713 case 3:
715 }
716
717 return 0;
718 }
719
721 {
722 if (!super.CanReleaseAttachment(attachment))
723 {
724 return false;
725 }
726
728 {
729 string attType = attachment.GetType();
730 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
731 {
732 return false;
733 }
734 }
735
736 return true;
737 }
738
740 {
742 }
743
745 {
746
747 if ( !super.CanDisplayAttachmentCategory( category_name ) )
748 return false;
749
750
752 if ( category_name.
Contains(
"engine") )
753 {
755 return false;
756 }
757
758 return true;
759 }
760
762 {
763 if ( !super.CanDisplayCargo() )
764 return false;
765
767 return false;
768
769 return true;
770 }
771
773 {
775
776 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
777 if (!carDoor)
778 {
780 }
781
782 switch (slotType)
783 {
784 case "Hatchback_02_Door_1_1":
785 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
786
787 case "Hatchback_02_Door_2_1":
788 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
789
790 case "Hatchback_02_Door_1_2":
791 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
792
793 case "Hatchback_02_Door_2_2":
794 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
795
796 case "Hatchback_02_Hood":
797 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
798
799 case "Hatchback_02_Trunk":
800 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
801 }
802
804 }
805
806
808 {
809 switch (posIdx)
810 {
811 case 0:
813 {
814 return false;
815 }
816
817 return true;
818
819 case 1:
821 {
822 return false;
823 }
824
825 return true;
826
827 case 2:
829 {
830 return false;
831 }
832
833 return true;
834
835 case 3:
837 {
838 return false;
839 }
840
841 return true;
842 }
843
844 return false;
845 }
846
848 {
849 switch( posIdx )
850 {
851 case 0:
852 return "doors_driver";
853 break;
854 case 1:
855 return "doors_codriver";
856 break;
857 case 2:
858 return "doors_cargo1";
859 break;
860 case 3:
861 return "doors_cargo2";
862 break;
863 }
864
865 return super.GetDoorSelectionNameFromSeatPos(posIdx);
866 }
867
869 {
870 switch( posIdx )
871 {
872 case 0:
873 return "Hatchback_02_Door_1_1";
874 break;
875 case 1:
876 return "Hatchback_02_Door_2_1";
877 break;
878 case 2:
879 return "Hatchback_02_Door_1_2";
880 break;
881 case 3:
882 return "Hatchback_02_Door_2_2";
883 break;
884 }
885
886 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
887 }
888
890 {
891 switch (ctrl)
892 {
894 float newValue = 0;
896 {
897 newValue += 0.25;
898 }
899
901 {
902 newValue += 0.25;
903 }
904
906 {
907 newValue += 0.25;
908 }
909
911 {
912 newValue += 0.25;
913 }
914
916 break;
917 }
918
919 return super.OnSound(ctrl, oldValue);
920 }
921
923 {
924 switch( selection )
925 {
926 case "doors_driver":
927 return "DoorsDriver";
928 case "doors_codriver":
929 return "DoorsCoDriver";
930 case "doors_cargo1":
931 return "DoorsCargo1";
932 case "doors_cargo2":
933 return "DoorsCargo2";
934 case "doors_hood":
935 return "DoorsHood";
936 case "doors_trunk":
937 return "DoorsTrunk";
938 }
939
940 return "";
941 }
942
944 {
945 return false;
946 }
947
949 {
950 switch (currentSeat)
951 {
952 case 0:
953 return nextSeat == 1;
954 case 1:
955 return nextSeat == 0;
956 case 2:
957 return nextSeat == 3;
958 case 3:
959 return nextSeat == 2;
960 }
961
962 return false;
963 }
964
966 {
967 switch (pCurrentSeat)
968 {
969 case 0:
970 return pDoorsSelection == "DoorsDriver";
971 case 1:
972 return pDoorsSelection == "DoorsCoDriver";
973 case 2:
974 return pDoorsSelection == "DoorsCargo1";
975 case 3:
976 return pDoorsSelection == "DoorsCargo2";
977 }
978
979 return false;
980 }
981
983 {
985 SpawnAdditionalItems();
986 FillUpCarFluids();
987
993
1000
1001
1004 }
1005}
1006
1008{
1010 {
1012 SpawnAdditionalItems();
1013 FillUpCarFluids();
1014
1015 GameInventory inventory = GetInventory();
1020
1027
1028
1031 }
1032}
1033
1035{
1037 {
1039 SpawnAdditionalItems();
1040 FillUpCarFluids();
1041
1042 GameInventory inventory = GetInventory();
1047
1054
1055
1058 }
1059}
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.