478{
482
484 {
485
486
493
494 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
495 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
496
499
502
504
506 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
507 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
508 }
509
511 {
515 }
516
518 {
519 super.EEInit();
520
522 {
529
532 }
533 }
534
536 {
537 return true;
538 }
539
541 {
542 super.GetElectricitySourceDevice();
543
545 }
546
548 {
549 return "CarBattery";
550 }
551
553 {
554 super.OnEngineStart();
555
557 {
560 }
561 }
562
564 {
565 super.OnEngineStop();
566
568 {
571 }
572 }
573
575 {
577 {
579 {
581 }
582 }
583 }
584
586 {
588 }
589
591 {
592 switch (posIdx)
593 {
594 case 0:
596 case 1:
598 case 2:
600 case 3:
602 }
603
604 return 0;
605 }
606
608 {
609 if (!super.CanReleaseAttachment(attachment))
610 {
611 return false;
612 }
613
615 {
616 string attType = attachment.GetType();
617 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
618 {
619 return false;
620 }
621 }
622
623 return true;
624 }
625
627 {
629 }
630
632 {
633
634 if ( !super.CanDisplayAttachmentCategory( category_name ) )
635 return false;
636
637
639 if ( category_name.
Contains(
"engine") )
640 {
642 return false;
643 }
644
645 return true;
646 }
647
649 {
650 if ( !super.CanDisplayCargo() )
651 return false;
652
654 return false;
655
656 return true;
657 }
658
660 {
662
663 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
664 if (!carDoor)
665 {
667 }
668
669 switch (slotType)
670 {
671 case "Hatchback_02_Door_1_1":
672 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
673
674 case "Hatchback_02_Door_2_1":
675 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
676
677 case "Hatchback_02_Door_1_2":
678 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
679
680 case "Hatchback_02_Door_2_2":
681 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
682
683 case "Hatchback_02_Hood":
684 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
685
686 case "Hatchback_02_Trunk":
687 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
688 }
689
691 }
692
693
695 {
696 switch (posIdx)
697 {
698 case 0:
700 {
701 return false;
702 }
703
704 return true;
705
706 case 1:
708 {
709 return false;
710 }
711
712 return true;
713
714 case 2:
716 {
717 return false;
718 }
719
720 return true;
721
722 case 3:
724 {
725 return false;
726 }
727
728 return true;
729 }
730
731 return false;
732 }
733
735 {
736 switch( posIdx )
737 {
738 case 0:
739 return "doors_driver";
740 break;
741 case 1:
742 return "doors_codriver";
743 break;
744 case 2:
745 return "doors_cargo1";
746 break;
747 case 3:
748 return "doors_cargo2";
749 break;
750 }
751
752 return super.GetDoorSelectionNameFromSeatPos(posIdx);
753 }
754
756 {
757 switch( posIdx )
758 {
759 case 0:
760 return "Hatchback_02_Door_1_1";
761 break;
762 case 1:
763 return "Hatchback_02_Door_2_1";
764 break;
765 case 2:
766 return "Hatchback_02_Door_1_2";
767 break;
768 case 3:
769 return "Hatchback_02_Door_2_2";
770 break;
771 }
772
773 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
774 }
775
777 {
778 switch (ctrl)
779 {
781 float newValue = 0;
783 {
784 newValue += 0.25;
785 }
786
788 {
789 newValue += 0.25;
790 }
791
793 {
794 newValue += 0.25;
795 }
796
798 {
799 newValue += 0.25;
800 }
801
803 break;
804 }
805
806 return super.OnSound(ctrl, oldValue);
807 }
808
810 {
811 switch( selection )
812 {
813 case "doors_driver":
814 return "DoorsDriver";
815 case "doors_codriver":
816 return "DoorsCoDriver";
817 case "doors_cargo1":
818 return "DoorsCargo1";
819 case "doors_cargo2":
820 return "DoorsCargo2";
821 case "doors_hood":
822 return "DoorsHood";
823 case "doors_trunk":
824 return "DoorsTrunk";
825 }
826
827 return "";
828 }
829
831 {
832 return false;
833 }
834
836 {
837 switch (currentSeat)
838 {
839 case 0:
840 return nextSeat == 1;
841 case 1:
842 return nextSeat == 0;
843 case 2:
844 return nextSeat == 3;
845 case 3:
846 return nextSeat == 2;
847 }
848
849 return false;
850 }
851
853 {
854 switch (pCurrentSeat)
855 {
856 case 0:
857 return pDoorsSelection == "DoorsDriver";
858 case 1:
859 return pDoorsSelection == "DoorsCoDriver";
860 case 2:
861 return pDoorsSelection == "DoorsCargo1";
862 case 3:
863 return pDoorsSelection == "DoorsCargo2";
864 }
865
866 return false;
867 }
868
870 {
872 SpawnAdditionalItems();
873 FillUpCarFluids();
874
880
887
888
891 }
892}
893
895{
897 {
899 SpawnAdditionalItems();
900 FillUpCarFluids();
901
902 GameInventory inventory = GetInventory();
907
914
915
918 }
919}
920
922{
924 {
926 SpawnAdditionalItems();
927 FillUpCarFluids();
928
929 GameInventory inventory = GetInventory();
934
941
942
945 }
946}
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.