495{
499
501 {
502
503
510
511 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
512 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
513
516
519
521
523 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
524 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
525 }
526
528 {
532 }
533
535 {
536 super.EEInit();
537
539 {
546
549 }
550 }
551
553 {
554 return true;
555 }
556
558 {
559 super.GetElectricitySourceDevice();
560
562 }
563
565 {
566 return "CarBattery";
567 }
568
570 {
571 super.OnEngineStart();
572
574 {
577 }
578 }
579
581 {
582 super.OnEngineStop();
583
585 {
588 }
589 }
590
592 {
594 {
596 {
598 }
599 }
600 }
601
603 {
605 }
606
608 {
609 switch (posIdx)
610 {
611 case 0:
613 case 1:
615 case 2:
617 case 3:
619 }
620
621 return 0;
622 }
623
625 {
626 if (!super.CanReleaseAttachment(attachment))
627 {
628 return false;
629 }
630
632 {
633 string attType = attachment.GetType();
634 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
635 {
636 return false;
637 }
638 }
639
640 return true;
641 }
642
644 {
646 }
647
649 {
650
651 if ( !super.CanDisplayAttachmentCategory( category_name ) )
652 return false;
653
654
656 if ( category_name.
Contains(
"engine") )
657 {
659 return false;
660 }
661
662 return true;
663 }
664
666 {
667 if ( !super.CanDisplayCargo() )
668 return false;
669
671 return false;
672
673 return true;
674 }
675
677 {
679
680 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
681 if (!carDoor)
682 {
684 }
685
686 switch (slotType)
687 {
688 case "Hatchback_02_Door_1_1":
689 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
690
691 case "Hatchback_02_Door_2_1":
692 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
693
694 case "Hatchback_02_Door_1_2":
695 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
696
697 case "Hatchback_02_Door_2_2":
698 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
699
700 case "Hatchback_02_Hood":
701 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
702
703 case "Hatchback_02_Trunk":
704 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
705 }
706
708 }
709
710
712 {
713 switch (posIdx)
714 {
715 case 0:
717 {
718 return false;
719 }
720
721 return true;
722
723 case 1:
725 {
726 return false;
727 }
728
729 return true;
730
731 case 2:
733 {
734 return false;
735 }
736
737 return true;
738
739 case 3:
741 {
742 return false;
743 }
744
745 return true;
746 }
747
748 return false;
749 }
750
752 {
753 switch( posIdx )
754 {
755 case 0:
756 return "doors_driver";
757 break;
758 case 1:
759 return "doors_codriver";
760 break;
761 case 2:
762 return "doors_cargo1";
763 break;
764 case 3:
765 return "doors_cargo2";
766 break;
767 }
768
769 return super.GetDoorSelectionNameFromSeatPos(posIdx);
770 }
771
773 {
774 switch( posIdx )
775 {
776 case 0:
777 return "Hatchback_02_Door_1_1";
778 break;
779 case 1:
780 return "Hatchback_02_Door_2_1";
781 break;
782 case 2:
783 return "Hatchback_02_Door_1_2";
784 break;
785 case 3:
786 return "Hatchback_02_Door_2_2";
787 break;
788 }
789
790 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
791 }
792
794 {
795 switch (ctrl)
796 {
798 float newValue = 0;
800 {
801 newValue += 0.25;
802 }
803
805 {
806 newValue += 0.25;
807 }
808
810 {
811 newValue += 0.25;
812 }
813
815 {
816 newValue += 0.25;
817 }
818
820 break;
821 }
822
823 return super.OnSound(ctrl, oldValue);
824 }
825
827 {
828 switch( selection )
829 {
830 case "doors_driver":
831 return "DoorsDriver";
832 case "doors_codriver":
833 return "DoorsCoDriver";
834 case "doors_cargo1":
835 return "DoorsCargo1";
836 case "doors_cargo2":
837 return "DoorsCargo2";
838 case "doors_hood":
839 return "DoorsHood";
840 case "doors_trunk":
841 return "DoorsTrunk";
842 }
843
844 return "";
845 }
846
848 {
849 return false;
850 }
851
853 {
854 switch (currentSeat)
855 {
856 case 0:
857 return nextSeat == 1;
858 case 1:
859 return nextSeat == 0;
860 case 2:
861 return nextSeat == 3;
862 case 3:
863 return nextSeat == 2;
864 }
865
866 return false;
867 }
868
870 {
871 switch (pCurrentSeat)
872 {
873 case 0:
874 return pDoorsSelection == "DoorsDriver";
875 case 1:
876 return pDoorsSelection == "DoorsCoDriver";
877 case 2:
878 return pDoorsSelection == "DoorsCargo1";
879 case 3:
880 return pDoorsSelection == "DoorsCargo2";
881 }
882
883 return false;
884 }
885
887 {
889 SpawnAdditionalItems();
890 FillUpCarFluids();
891
897
904
905
908 }
909}
910
912{
914 {
916 SpawnAdditionalItems();
917 FillUpCarFluids();
918
919 GameInventory inventory = GetInventory();
924
931
932
935 }
936}
937
939{
941 {
943 SpawnAdditionalItems();
944 FillUpCarFluids();
945
946 GameInventory inventory = GetInventory();
951
958
959
962 }
963}
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.