490{
494
496 {
497
498
505
506 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
507 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
508
511
514
516
518 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
519 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
520 }
521
523 {
527 }
528
530 {
531 super.EEInit();
532
534 {
541
544 }
545 }
546
548 {
549 return true;
550 }
551
553 {
554 super.GetElectricitySourceDevice();
555
557 }
558
560 {
561 return "CarBattery";
562 }
563
565 {
566 super.OnEngineStart();
567
569 {
572 }
573 }
574
576 {
577 super.OnEngineStop();
578
580 {
583 }
584 }
585
587 {
589 {
591 {
593 }
594 }
595 }
596
598 {
600 }
601
603 {
604 switch (posIdx)
605 {
606 case 0:
608 case 1:
610 case 2:
612 case 3:
614 }
615
616 return 0;
617 }
618
620 {
621 if (!super.CanReleaseAttachment(attachment))
622 {
623 return false;
624 }
625
627 {
628 string attType = attachment.GetType();
629 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
630 {
631 return false;
632 }
633 }
634
635 return true;
636 }
637
639 {
641 }
642
644 {
645
646 if ( !super.CanDisplayAttachmentCategory( category_name ) )
647 return false;
648
649
651 if ( category_name.
Contains(
"engine") )
652 {
654 return false;
655 }
656
657 return true;
658 }
659
661 {
662 if ( !super.CanDisplayCargo() )
663 return false;
664
666 return false;
667
668 return true;
669 }
670
672 {
674
675 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
676 if (!carDoor)
677 {
679 }
680
681 switch (slotType)
682 {
683 case "Hatchback_02_Door_1_1":
684 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
685
686 case "Hatchback_02_Door_2_1":
687 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
688
689 case "Hatchback_02_Door_1_2":
690 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
691
692 case "Hatchback_02_Door_2_2":
693 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
694
695 case "Hatchback_02_Hood":
696 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
697
698 case "Hatchback_02_Trunk":
699 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
700 }
701
703 }
704
705
707 {
708 switch (posIdx)
709 {
710 case 0:
712 {
713 return false;
714 }
715
716 return true;
717
718 case 1:
720 {
721 return false;
722 }
723
724 return true;
725
726 case 2:
728 {
729 return false;
730 }
731
732 return true;
733
734 case 3:
736 {
737 return false;
738 }
739
740 return true;
741 }
742
743 return false;
744 }
745
747 {
748 switch( posIdx )
749 {
750 case 0:
751 return "doors_driver";
752 break;
753 case 1:
754 return "doors_codriver";
755 break;
756 case 2:
757 return "doors_cargo1";
758 break;
759 case 3:
760 return "doors_cargo2";
761 break;
762 }
763
764 return super.GetDoorSelectionNameFromSeatPos(posIdx);
765 }
766
768 {
769 switch( posIdx )
770 {
771 case 0:
772 return "Hatchback_02_Door_1_1";
773 break;
774 case 1:
775 return "Hatchback_02_Door_2_1";
776 break;
777 case 2:
778 return "Hatchback_02_Door_1_2";
779 break;
780 case 3:
781 return "Hatchback_02_Door_2_2";
782 break;
783 }
784
785 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
786 }
787
789 {
790 switch (ctrl)
791 {
793 float newValue = 0;
795 {
796 newValue += 0.25;
797 }
798
800 {
801 newValue += 0.25;
802 }
803
805 {
806 newValue += 0.25;
807 }
808
810 {
811 newValue += 0.25;
812 }
813
815 break;
816 }
817
818 return super.OnSound(ctrl, oldValue);
819 }
820
822 {
823 switch( selection )
824 {
825 case "doors_driver":
826 return "DoorsDriver";
827 case "doors_codriver":
828 return "DoorsCoDriver";
829 case "doors_cargo1":
830 return "DoorsCargo1";
831 case "doors_cargo2":
832 return "DoorsCargo2";
833 case "doors_hood":
834 return "DoorsHood";
835 case "doors_trunk":
836 return "DoorsTrunk";
837 }
838
839 return "";
840 }
841
843 {
844 return false;
845 }
846
848 {
849 switch (currentSeat)
850 {
851 case 0:
852 return nextSeat == 1;
853 case 1:
854 return nextSeat == 0;
855 case 2:
856 return nextSeat == 3;
857 case 3:
858 return nextSeat == 2;
859 }
860
861 return false;
862 }
863
865 {
866 switch (pCurrentSeat)
867 {
868 case 0:
869 return pDoorsSelection == "DoorsDriver";
870 case 1:
871 return pDoorsSelection == "DoorsCoDriver";
872 case 2:
873 return pDoorsSelection == "DoorsCargo1";
874 case 3:
875 return pDoorsSelection == "DoorsCargo2";
876 }
877
878 return false;
879 }
880
882 {
884 SpawnAdditionalItems();
885 FillUpCarFluids();
886
892
899
900
903 }
904}
905
907{
909 {
911 SpawnAdditionalItems();
912 FillUpCarFluids();
913
914 GameInventory inventory = GetInventory();
919
926
927
930 }
931}
932
934{
936 {
938 SpawnAdditionalItems();
939 FillUpCarFluids();
940
941 GameInventory inventory = GetInventory();
946
953
954
957 }
958}
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.