550{
554
556 {
557
558
565
566 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
567 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
568
571
574
576
578 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
579 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
580 }
581
583 {
587 }
588
590 {
591 super.EEInit();
592
594 {
601
604 }
605 }
606
608 {
609 return true;
610 }
611
613 {
614 super.GetElectricitySourceDevice();
615
617 }
618
620 {
621 return "CarBattery";
622 }
623
625 {
626 super.OnEngineStart();
627
629 {
632 }
633 }
634
636 {
637 super.OnEngineStop();
638
640 {
643 }
644 }
645
647 {
649 {
651 {
653 }
654 }
655 }
656
658 {
660 }
661
663 {
664 switch (posIdx)
665 {
666 case 0:
668 case 1:
670 case 2:
672 case 3:
674 }
675
676 return 0;
677 }
678
680 {
681 if (!super.CanReleaseAttachment(attachment))
682 {
683 return false;
684 }
685
687 {
688 string attType = attachment.GetType();
689 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
690 {
691 return false;
692 }
693 }
694
695 return true;
696 }
697
699 {
701 }
702
704 {
705
706 if ( !super.CanDisplayAttachmentCategory( category_name ) )
707 return false;
708
709
711 if ( category_name.
Contains(
"engine") )
712 {
714 return false;
715 }
716
717 return true;
718 }
719
721 {
722 if ( !super.CanDisplayCargo() )
723 return false;
724
726 return false;
727
728 return true;
729 }
730
732 {
734
735 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
736 if (!carDoor)
737 {
739 }
740
741 switch (slotType)
742 {
743 case "Hatchback_02_Door_1_1":
744 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
745
746 case "Hatchback_02_Door_2_1":
747 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
748
749 case "Hatchback_02_Door_1_2":
750 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
751
752 case "Hatchback_02_Door_2_2":
753 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
754
755 case "Hatchback_02_Hood":
756 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
757
758 case "Hatchback_02_Trunk":
759 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
760 }
761
763 }
764
765
767 {
768 switch (posIdx)
769 {
770 case 0:
772 {
773 return false;
774 }
775
776 return true;
777
778 case 1:
780 {
781 return false;
782 }
783
784 return true;
785
786 case 2:
788 {
789 return false;
790 }
791
792 return true;
793
794 case 3:
796 {
797 return false;
798 }
799
800 return true;
801 }
802
803 return false;
804 }
805
807 {
808 switch( posIdx )
809 {
810 case 0:
811 return "doors_driver";
812 break;
813 case 1:
814 return "doors_codriver";
815 break;
816 case 2:
817 return "doors_cargo1";
818 break;
819 case 3:
820 return "doors_cargo2";
821 break;
822 }
823
824 return super.GetDoorSelectionNameFromSeatPos(posIdx);
825 }
826
828 {
829 switch( posIdx )
830 {
831 case 0:
832 return "Hatchback_02_Door_1_1";
833 break;
834 case 1:
835 return "Hatchback_02_Door_2_1";
836 break;
837 case 2:
838 return "Hatchback_02_Door_1_2";
839 break;
840 case 3:
841 return "Hatchback_02_Door_2_2";
842 break;
843 }
844
845 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
846 }
847
849 {
850 switch (ctrl)
851 {
853 float newValue = 0;
855 {
856 newValue += 0.25;
857 }
858
860 {
861 newValue += 0.25;
862 }
863
865 {
866 newValue += 0.25;
867 }
868
870 {
871 newValue += 0.25;
872 }
873
875 break;
876 }
877
878 return super.OnSound(ctrl, oldValue);
879 }
880
882 {
883 switch( selection )
884 {
885 case "doors_driver":
886 return "DoorsDriver";
887 case "doors_codriver":
888 return "DoorsCoDriver";
889 case "doors_cargo1":
890 return "DoorsCargo1";
891 case "doors_cargo2":
892 return "DoorsCargo2";
893 case "doors_hood":
894 return "DoorsHood";
895 case "doors_trunk":
896 return "DoorsTrunk";
897 }
898
899 return "";
900 }
901
903 {
904 return false;
905 }
906
908 {
909 switch (currentSeat)
910 {
911 case 0:
912 return nextSeat == 1;
913 case 1:
914 return nextSeat == 0;
915 case 2:
916 return nextSeat == 3;
917 case 3:
918 return nextSeat == 2;
919 }
920
921 return false;
922 }
923
925 {
926 switch (pCurrentSeat)
927 {
928 case 0:
929 return pDoorsSelection == "DoorsDriver";
930 case 1:
931 return pDoorsSelection == "DoorsCoDriver";
932 case 2:
933 return pDoorsSelection == "DoorsCargo1";
934 case 3:
935 return pDoorsSelection == "DoorsCargo2";
936 }
937
938 return false;
939 }
940
942 {
944 SpawnAdditionalItems();
945 FillUpCarFluids();
946
952
959
960
963 }
964}
965
967{
969 {
971 SpawnAdditionalItems();
972 FillUpCarFluids();
973
974 GameInventory inventory = GetInventory();
979
986
987
990 }
991}
992
994{
996 {
998 SpawnAdditionalItems();
999 FillUpCarFluids();
1000
1001 GameInventory inventory = GetInventory();
1006
1013
1014
1017 }
1018}
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.