517{
521
523 {
524
525
532
533 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
534 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
535
538
541
543
545 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
546 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
547 }
548
550 {
554 }
555
557 {
558 super.EEInit();
559
561 {
568
571 }
572 }
573
575 {
576 return true;
577 }
578
580 {
581 super.GetElectricitySourceDevice();
582
584 }
585
587 {
588 return "CarBattery";
589 }
590
592 {
593 super.OnEngineStart();
594
596 {
599 }
600 }
601
603 {
604 super.OnEngineStop();
605
607 {
610 }
611 }
612
614 {
616 {
618 {
620 }
621 }
622 }
623
625 {
627 }
628
630 {
631 switch (posIdx)
632 {
633 case 0:
635 case 1:
637 case 2:
639 case 3:
641 }
642
643 return 0;
644 }
645
647 {
648 if (!super.CanReleaseAttachment(attachment))
649 {
650 return false;
651 }
652
654 {
655 string attType = attachment.GetType();
656 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
657 {
658 return false;
659 }
660 }
661
662 return true;
663 }
664
666 {
668 }
669
671 {
672
673 if ( !super.CanDisplayAttachmentCategory( category_name ) )
674 return false;
675
676
678 if ( category_name.
Contains(
"engine") )
679 {
681 return false;
682 }
683
684 return true;
685 }
686
688 {
689 if ( !super.CanDisplayCargo() )
690 return false;
691
693 return false;
694
695 return true;
696 }
697
699 {
701
702 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
703 if (!carDoor)
704 {
706 }
707
708 switch (slotType)
709 {
710 case "Hatchback_02_Door_1_1":
711 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
712
713 case "Hatchback_02_Door_2_1":
714 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
715
716 case "Hatchback_02_Door_1_2":
717 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
718
719 case "Hatchback_02_Door_2_2":
720 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
721
722 case "Hatchback_02_Hood":
723 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
724
725 case "Hatchback_02_Trunk":
726 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
727 }
728
730 }
731
732
734 {
735 switch (posIdx)
736 {
737 case 0:
739 {
740 return false;
741 }
742
743 return true;
744
745 case 1:
747 {
748 return false;
749 }
750
751 return true;
752
753 case 2:
755 {
756 return false;
757 }
758
759 return true;
760
761 case 3:
763 {
764 return false;
765 }
766
767 return true;
768 }
769
770 return false;
771 }
772
774 {
775 switch( posIdx )
776 {
777 case 0:
778 return "doors_driver";
779 break;
780 case 1:
781 return "doors_codriver";
782 break;
783 case 2:
784 return "doors_cargo1";
785 break;
786 case 3:
787 return "doors_cargo2";
788 break;
789 }
790
791 return super.GetDoorSelectionNameFromSeatPos(posIdx);
792 }
793
795 {
796 switch( posIdx )
797 {
798 case 0:
799 return "Hatchback_02_Door_1_1";
800 break;
801 case 1:
802 return "Hatchback_02_Door_2_1";
803 break;
804 case 2:
805 return "Hatchback_02_Door_1_2";
806 break;
807 case 3:
808 return "Hatchback_02_Door_2_2";
809 break;
810 }
811
812 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
813 }
814
816 {
817 switch (ctrl)
818 {
820 float newValue = 0;
822 {
823 newValue += 0.25;
824 }
825
827 {
828 newValue += 0.25;
829 }
830
832 {
833 newValue += 0.25;
834 }
835
837 {
838 newValue += 0.25;
839 }
840
842 break;
843 }
844
845 return super.OnSound(ctrl, oldValue);
846 }
847
849 {
850 switch( selection )
851 {
852 case "doors_driver":
853 return "DoorsDriver";
854 case "doors_codriver":
855 return "DoorsCoDriver";
856 case "doors_cargo1":
857 return "DoorsCargo1";
858 case "doors_cargo2":
859 return "DoorsCargo2";
860 case "doors_hood":
861 return "DoorsHood";
862 case "doors_trunk":
863 return "DoorsTrunk";
864 }
865
866 return "";
867 }
868
870 {
871 return false;
872 }
873
875 {
876 switch (currentSeat)
877 {
878 case 0:
879 return nextSeat == 1;
880 case 1:
881 return nextSeat == 0;
882 case 2:
883 return nextSeat == 3;
884 case 3:
885 return nextSeat == 2;
886 }
887
888 return false;
889 }
890
892 {
893 switch (pCurrentSeat)
894 {
895 case 0:
896 return pDoorsSelection == "DoorsDriver";
897 case 1:
898 return pDoorsSelection == "DoorsCoDriver";
899 case 2:
900 return pDoorsSelection == "DoorsCargo1";
901 case 3:
902 return pDoorsSelection == "DoorsCargo2";
903 }
904
905 return false;
906 }
907
909 {
911 SpawnAdditionalItems();
912 FillUpCarFluids();
913
919
926
927
930 }
931}
932
934{
936 {
938 SpawnAdditionalItems();
939 FillUpCarFluids();
940
941 GameInventory inventory = GetInventory();
946
953
954
957 }
958}
959
961{
963 {
965 SpawnAdditionalItems();
966 FillUpCarFluids();
967
968 GameInventory inventory = GetInventory();
973
980
981
984 }
985}
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.