528{
532
534 {
535
536
543
544 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
545 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
546
549
552
554
556 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
557 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
558 }
559
561 {
565 }
566
568 {
569 super.EEInit();
570
572 {
579
582 }
583 }
584
586 {
587 return true;
588 }
589
591 {
592 super.GetElectricitySourceDevice();
593
595 }
596
598 {
599 return "CarBattery";
600 }
601
603 {
604 super.OnEngineStart();
605
607 {
610 }
611 }
612
614 {
615 super.OnEngineStop();
616
618 {
621 }
622 }
623
625 {
627 {
629 {
631 }
632 }
633 }
634
636 {
638 }
639
641 {
642 switch (posIdx)
643 {
644 case 0:
646 case 1:
648 case 2:
650 case 3:
652 }
653
654 return 0;
655 }
656
658 {
659 if (!super.CanReleaseAttachment(attachment))
660 {
661 return false;
662 }
663
665 {
666 string attType = attachment.GetType();
667 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
668 {
669 return false;
670 }
671 }
672
673 return true;
674 }
675
677 {
679 }
680
682 {
683
684 if ( !super.CanDisplayAttachmentCategory( category_name ) )
685 return false;
686
687
689 if ( category_name.
Contains(
"engine") )
690 {
692 return false;
693 }
694
695 return true;
696 }
697
699 {
700 if ( !super.CanDisplayCargo() )
701 return false;
702
704 return false;
705
706 return true;
707 }
708
710 {
712
713 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
714 if (!carDoor)
715 {
717 }
718
719 switch (slotType)
720 {
721 case "Hatchback_02_Door_1_1":
722 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
723
724 case "Hatchback_02_Door_2_1":
725 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
726
727 case "Hatchback_02_Door_1_2":
728 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
729
730 case "Hatchback_02_Door_2_2":
731 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
732
733 case "Hatchback_02_Hood":
734 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
735
736 case "Hatchback_02_Trunk":
737 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
738 }
739
741 }
742
743
745 {
746 switch (posIdx)
747 {
748 case 0:
750 {
751 return false;
752 }
753
754 return true;
755
756 case 1:
758 {
759 return false;
760 }
761
762 return true;
763
764 case 2:
766 {
767 return false;
768 }
769
770 return true;
771
772 case 3:
774 {
775 return false;
776 }
777
778 return true;
779 }
780
781 return false;
782 }
783
785 {
786 switch( posIdx )
787 {
788 case 0:
789 return "doors_driver";
790 break;
791 case 1:
792 return "doors_codriver";
793 break;
794 case 2:
795 return "doors_cargo1";
796 break;
797 case 3:
798 return "doors_cargo2";
799 break;
800 }
801
802 return super.GetDoorSelectionNameFromSeatPos(posIdx);
803 }
804
806 {
807 switch( posIdx )
808 {
809 case 0:
810 return "Hatchback_02_Door_1_1";
811 break;
812 case 1:
813 return "Hatchback_02_Door_2_1";
814 break;
815 case 2:
816 return "Hatchback_02_Door_1_2";
817 break;
818 case 3:
819 return "Hatchback_02_Door_2_2";
820 break;
821 }
822
823 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
824 }
825
827 {
828 switch (ctrl)
829 {
831 float newValue = 0;
833 {
834 newValue += 0.25;
835 }
836
838 {
839 newValue += 0.25;
840 }
841
843 {
844 newValue += 0.25;
845 }
846
848 {
849 newValue += 0.25;
850 }
851
853 break;
854 }
855
856 return super.OnSound(ctrl, oldValue);
857 }
858
860 {
861 switch( selection )
862 {
863 case "doors_driver":
864 return "DoorsDriver";
865 case "doors_codriver":
866 return "DoorsCoDriver";
867 case "doors_cargo1":
868 return "DoorsCargo1";
869 case "doors_cargo2":
870 return "DoorsCargo2";
871 case "doors_hood":
872 return "DoorsHood";
873 case "doors_trunk":
874 return "DoorsTrunk";
875 }
876
877 return "";
878 }
879
881 {
882 return false;
883 }
884
886 {
887 switch (currentSeat)
888 {
889 case 0:
890 return nextSeat == 1;
891 case 1:
892 return nextSeat == 0;
893 case 2:
894 return nextSeat == 3;
895 case 3:
896 return nextSeat == 2;
897 }
898
899 return false;
900 }
901
903 {
904 switch (pCurrentSeat)
905 {
906 case 0:
907 return pDoorsSelection == "DoorsDriver";
908 case 1:
909 return pDoorsSelection == "DoorsCoDriver";
910 case 2:
911 return pDoorsSelection == "DoorsCargo1";
912 case 3:
913 return pDoorsSelection == "DoorsCargo2";
914 }
915
916 return false;
917 }
918
920 {
922 SpawnAdditionalItems();
923 FillUpCarFluids();
924
930
937
938
941 }
942}
943
945{
947 {
949 SpawnAdditionalItems();
950 FillUpCarFluids();
951
952 GameInventory inventory = GetInventory();
957
964
965
968 }
969}
970
972{
974 {
976 SpawnAdditionalItems();
977 FillUpCarFluids();
978
979 GameInventory inventory = GetInventory();
984
991
992
995 }
996}
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.