483{
487
489 {
490
491
498
499 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
500 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
501
504
507
509
511 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
512 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
513 }
514
516 {
520 }
521
523 {
524 super.EEInit();
525
527 {
534
537 }
538 }
539
541 {
542 return true;
543 }
544
546 {
547 super.GetElectricitySourceDevice();
548
550 }
551
553 {
554 return "CarBattery";
555 }
556
558 {
559 super.OnEngineStart();
560
562 {
565 }
566 }
567
569 {
570 super.OnEngineStop();
571
573 {
576 }
577 }
578
580 {
582 {
584 {
586 }
587 }
588 }
589
591 {
593 }
594
596 {
597 switch (posIdx)
598 {
599 case 0:
601 case 1:
603 case 2:
605 case 3:
607 }
608
609 return 0;
610 }
611
613 {
614 if (!super.CanReleaseAttachment(attachment))
615 {
616 return false;
617 }
618
620 {
621 string attType = attachment.GetType();
622 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
623 {
624 return false;
625 }
626 }
627
628 return true;
629 }
630
632 {
634 }
635
637 {
638
639 if ( !super.CanDisplayAttachmentCategory( category_name ) )
640 return false;
641
642
644 if ( category_name.
Contains(
"engine") )
645 {
647 return false;
648 }
649
650 return true;
651 }
652
654 {
655 if ( !super.CanDisplayCargo() )
656 return false;
657
659 return false;
660
661 return true;
662 }
663
665 {
667
668 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
669 if (!carDoor)
670 {
672 }
673
674 switch (slotType)
675 {
676 case "Hatchback_02_Door_1_1":
677 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
678
679 case "Hatchback_02_Door_2_1":
680 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
681
682 case "Hatchback_02_Door_1_2":
683 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
684
685 case "Hatchback_02_Door_2_2":
686 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
687
688 case "Hatchback_02_Hood":
689 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
690
691 case "Hatchback_02_Trunk":
692 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
693 }
694
696 }
697
698
700 {
701 switch (posIdx)
702 {
703 case 0:
705 {
706 return false;
707 }
708
709 return true;
710
711 case 1:
713 {
714 return false;
715 }
716
717 return true;
718
719 case 2:
721 {
722 return false;
723 }
724
725 return true;
726
727 case 3:
729 {
730 return false;
731 }
732
733 return true;
734 }
735
736 return false;
737 }
738
740 {
741 switch( posIdx )
742 {
743 case 0:
744 return "doors_driver";
745 break;
746 case 1:
747 return "doors_codriver";
748 break;
749 case 2:
750 return "doors_cargo1";
751 break;
752 case 3:
753 return "doors_cargo2";
754 break;
755 }
756
757 return super.GetDoorSelectionNameFromSeatPos(posIdx);
758 }
759
761 {
762 switch( posIdx )
763 {
764 case 0:
765 return "Hatchback_02_Door_1_1";
766 break;
767 case 1:
768 return "Hatchback_02_Door_2_1";
769 break;
770 case 2:
771 return "Hatchback_02_Door_1_2";
772 break;
773 case 3:
774 return "Hatchback_02_Door_2_2";
775 break;
776 }
777
778 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
779 }
780
782 {
783 switch (ctrl)
784 {
786 float newValue = 0;
788 {
789 newValue += 0.25;
790 }
791
793 {
794 newValue += 0.25;
795 }
796
798 {
799 newValue += 0.25;
800 }
801
803 {
804 newValue += 0.25;
805 }
806
808 break;
809 }
810
811 return super.OnSound(ctrl, oldValue);
812 }
813
815 {
816 switch( selection )
817 {
818 case "doors_driver":
819 return "DoorsDriver";
820 case "doors_codriver":
821 return "DoorsCoDriver";
822 case "doors_cargo1":
823 return "DoorsCargo1";
824 case "doors_cargo2":
825 return "DoorsCargo2";
826 case "doors_hood":
827 return "DoorsHood";
828 case "doors_trunk":
829 return "DoorsTrunk";
830 }
831
832 return "";
833 }
834
836 {
837 return false;
838 }
839
841 {
842 switch (currentSeat)
843 {
844 case 0:
845 return nextSeat == 1;
846 case 1:
847 return nextSeat == 0;
848 case 2:
849 return nextSeat == 3;
850 case 3:
851 return nextSeat == 2;
852 }
853
854 return false;
855 }
856
858 {
859 switch (pCurrentSeat)
860 {
861 case 0:
862 return pDoorsSelection == "DoorsDriver";
863 case 1:
864 return pDoorsSelection == "DoorsCoDriver";
865 case 2:
866 return pDoorsSelection == "DoorsCargo1";
867 case 3:
868 return pDoorsSelection == "DoorsCargo2";
869 }
870
871 return false;
872 }
873
875 {
877 SpawnAdditionalItems();
878 FillUpCarFluids();
879
885
892
893
896 }
897}
898
900{
902 {
904 SpawnAdditionalItems();
905 FillUpCarFluids();
906
907 GameInventory inventory = GetInventory();
912
919
920
923 }
924}
925
927{
929 {
931 SpawnAdditionalItems();
932 FillUpCarFluids();
933
934 GameInventory inventory = GetInventory();
939
946
947
950 }
951}
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.