506{
510
512 {
513
514
521
522 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
523 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
524
527
530
532
534 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
535 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
536 }
537
539 {
543 }
544
546 {
547 super.EEInit();
548
550 {
557
560 }
561 }
562
564 {
565 return true;
566 }
567
569 {
570 super.GetElectricitySourceDevice();
571
573 }
574
576 {
577 return "CarBattery";
578 }
579
581 {
582 super.OnEngineStart();
583
585 {
588 }
589 }
590
592 {
593 super.OnEngineStop();
594
596 {
599 }
600 }
601
603 {
605 {
607 {
609 }
610 }
611 }
612
614 {
616 }
617
619 {
620 switch (posIdx)
621 {
622 case 0:
624 case 1:
626 case 2:
628 case 3:
630 }
631
632 return 0;
633 }
634
636 {
637 if (!super.CanReleaseAttachment(attachment))
638 {
639 return false;
640 }
641
643 {
644 string attType = attachment.GetType();
645 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
646 {
647 return false;
648 }
649 }
650
651 return true;
652 }
653
655 {
657 }
658
660 {
661
662 if ( !super.CanDisplayAttachmentCategory( category_name ) )
663 return false;
664
665
667 if ( category_name.
Contains(
"engine") )
668 {
670 return false;
671 }
672
673 return true;
674 }
675
677 {
678 if ( !super.CanDisplayCargo() )
679 return false;
680
682 return false;
683
684 return true;
685 }
686
688 {
690
691 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
692 if (!carDoor)
693 {
695 }
696
697 switch (slotType)
698 {
699 case "Hatchback_02_Door_1_1":
700 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
701
702 case "Hatchback_02_Door_2_1":
703 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
704
705 case "Hatchback_02_Door_1_2":
706 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
707
708 case "Hatchback_02_Door_2_2":
709 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
710
711 case "Hatchback_02_Hood":
712 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
713
714 case "Hatchback_02_Trunk":
715 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
716 }
717
719 }
720
721
723 {
724 switch (posIdx)
725 {
726 case 0:
728 {
729 return false;
730 }
731
732 return true;
733
734 case 1:
736 {
737 return false;
738 }
739
740 return true;
741
742 case 2:
744 {
745 return false;
746 }
747
748 return true;
749
750 case 3:
752 {
753 return false;
754 }
755
756 return true;
757 }
758
759 return false;
760 }
761
763 {
764 switch( posIdx )
765 {
766 case 0:
767 return "doors_driver";
768 break;
769 case 1:
770 return "doors_codriver";
771 break;
772 case 2:
773 return "doors_cargo1";
774 break;
775 case 3:
776 return "doors_cargo2";
777 break;
778 }
779
780 return super.GetDoorSelectionNameFromSeatPos(posIdx);
781 }
782
784 {
785 switch( posIdx )
786 {
787 case 0:
788 return "Hatchback_02_Door_1_1";
789 break;
790 case 1:
791 return "Hatchback_02_Door_2_1";
792 break;
793 case 2:
794 return "Hatchback_02_Door_1_2";
795 break;
796 case 3:
797 return "Hatchback_02_Door_2_2";
798 break;
799 }
800
801 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
802 }
803
805 {
806 switch (ctrl)
807 {
809 float newValue = 0;
811 {
812 newValue += 0.25;
813 }
814
816 {
817 newValue += 0.25;
818 }
819
821 {
822 newValue += 0.25;
823 }
824
826 {
827 newValue += 0.25;
828 }
829
831 break;
832 }
833
834 return super.OnSound(ctrl, oldValue);
835 }
836
838 {
839 switch( selection )
840 {
841 case "doors_driver":
842 return "DoorsDriver";
843 case "doors_codriver":
844 return "DoorsCoDriver";
845 case "doors_cargo1":
846 return "DoorsCargo1";
847 case "doors_cargo2":
848 return "DoorsCargo2";
849 case "doors_hood":
850 return "DoorsHood";
851 case "doors_trunk":
852 return "DoorsTrunk";
853 }
854
855 return "";
856 }
857
859 {
860 return false;
861 }
862
864 {
865 switch (currentSeat)
866 {
867 case 0:
868 return nextSeat == 1;
869 case 1:
870 return nextSeat == 0;
871 case 2:
872 return nextSeat == 3;
873 case 3:
874 return nextSeat == 2;
875 }
876
877 return false;
878 }
879
881 {
882 switch (pCurrentSeat)
883 {
884 case 0:
885 return pDoorsSelection == "DoorsDriver";
886 case 1:
887 return pDoorsSelection == "DoorsCoDriver";
888 case 2:
889 return pDoorsSelection == "DoorsCargo1";
890 case 3:
891 return pDoorsSelection == "DoorsCargo2";
892 }
893
894 return false;
895 }
896
898 {
900 SpawnAdditionalItems();
901 FillUpCarFluids();
902
908
915
916
919 }
920}
921
923{
925 {
927 SpawnAdditionalItems();
928 FillUpCarFluids();
929
930 GameInventory inventory = GetInventory();
935
942
943
946 }
947}
948
950{
952 {
954 SpawnAdditionalItems();
955 FillUpCarFluids();
956
957 GameInventory inventory = GetInventory();
962
969
970
973 }
974}
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.