525{
529
531 {
532
533
540
541 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
542 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
543
546
550 });
554 });
555
558
560
562 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
563 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
564 }
565
567 {
571 }
572
574 {
575 super.EEInit();
576
578 {
585
588 }
589 }
590
592 {
593 return true;
594 }
595
597 {
598 return true;
599 }
600
602 {
603 super.GetElectricitySourceDevice();
604
606 }
607
609 {
610 return "CarBattery";
611 }
612
614 {
615 super.OnEngineStart();
616
618 {
621 }
622 }
623
625 {
626 super.OnEngineStop();
627
629 {
632 }
633 }
634
636 {
638 {
640 {
642 }
643 }
644 }
645
647 {
649 }
650
652 {
653 return 5.1;
654 }
655
657 {
658 return 1.5;
659 }
660
662 {
663 switch (posIdx)
664 {
665 case 0:
667 case 1:
669 case 2:
671 case 3:
673 }
674
675 return 0;
676 }
677
679 {
680 if (!super.CanReleaseAttachment(attachment))
681 {
682 return false;
683 }
684
685 string attType = attachment.GetType();
686 switch (attType)
687 {
688 case "CarBattery":
690 {
691 return false;
692 }
693 break;
694
695 case "GlowPlug":
697 {
698 return false;
699 }
700 break;
701 }
702
703 return true;
704 }
705
707 {
709 }
710
712 {
713 if ( !super.CanDisplayAttachmentCategory(category_name))
714 {
715 return false;
716 }
717
719 if (category_name.
Contains(
"engine"))
720 {
722 {
723 return false;
724 }
725 }
726
727 return true;
728 }
729
731 {
732 if ( !super.CanDisplayCargo() )
733 return false;
734
736 return false;
737
738 return true;
739 }
740
742 {
744
745 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
746 if (!carDoor)
747 {
749 }
750
751 switch (slotType)
752 {
753 case "Offroad_02_Door_1_1":
754 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
755
756 case "Offroad_02_Door_2_1":
757 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
758
759 case "Offroad_02_Door_1_2":
760 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
761
762 case "Offroad_02_Door_2_2":
763 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
764
765 case "Offroad_02_Hood":
766 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
767
768 case "Offroad_02_Trunk":
769 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
770 }
771
773 }
774
775
777 {
778 switch( posIdx )
779 {
780 case 0:
782 return false;
783
784 return true;
785 break;
786
787 case 1:
789 return false;
790
791 return true;
792 break;
793
794 case 2:
796 return false;
797
798 return true;
799 break;
800
801 case 3:
803 return false;
804
805 return true;
806 break;
807 }
808
809 return false;
810 }
811
813 {
814 switch( posIdx )
815 {
816 case 0:
817 return "doors_driver";
818 break;
819 case 1:
820 return "doors_codriver";
821 break;
822 case 2:
823 return "doors_cargo1";
824 break;
825 case 3:
826 return "doors_cargo2";
827 break;
828 }
829
830 return super.GetDoorSelectionNameFromSeatPos(posIdx);
831 }
832
834 {
835 switch (posIdx)
836 {
837 case 0:
838 return "Offroad_02_Door_1_1";
839 case 1:
840 return "Offroad_02_Door_2_1";
841 case 2:
842 return "Offroad_02_Door_1_2";
843 case 3:
844 return "Offroad_02_Door_2_2";
845 }
846
847 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
848 }
849
851 {
852 switch ( ctrl )
853 {
855 float newValue = 0;
857 {
858 newValue += 0.25;
859 }
860
862 {
863 newValue += 0.25;
864 }
865
867 {
868 newValue += 0.25;
869 }
870
872 {
873 newValue += 0.25;
874 }
875
877 break;
878 }
879
880 return super.OnSound(ctrl, oldValue);
881 }
882
884 {
885 switch (selection)
886 {
887 case "doors_driver":
888 return "DoorsDriver";
889 case "doors_codriver":
890 return "DoorsCoDriver";
891 case "doors_cargo1":
892 return "DoorsCargo1";
893 case "doors_cargo2":
894 return "DoorsCargo2";
895 case "doors_hood":
896 return "DoorsHood";
897 case "doors_trunk":
898 return "DoorsTrunk";
899 }
900
901 return "";
902 }
903
905 {
906 switch (currentSeat)
907 {
908 case 0:
909 return nextSeat == 1;
910 case 1:
911 return nextSeat == 0;
912 case 2:
913 return nextSeat == 3;
914 case 3:
915 return nextSeat == 2;
916 }
917
918 return false;
919 }
920
922 {
923 switch (pCurrentSeat)
924 {
925 case 0:
926 return pDoorsSelection == "DoorsDriver";
927 case 1:
928 return pDoorsSelection == "DoorsCoDriver";
929 case 2:
930 return pDoorsSelection == "DoorsCargo1";
931 case 3:
932 return pDoorsSelection == "DoorsCargo2";
933 }
934
935 return false;
936 }
937
939 {
940 return false;
941 }
942
944 {
945 return false;
946 }
947
949 {
951 SpawnAdditionalItems();
952 FillUpCarFluids();
953
959
966
967
970 }
971}
972
973
975{
977 {
979 SpawnAdditionalItems();
980 FillUpCarFluids();
981
982 GetInventory().CreateInInventory("Offroad_02_Wheel");
983 GetInventory().CreateInInventory("Offroad_02_Wheel");
984 GetInventory().CreateInInventory("Offroad_02_Wheel");
985 GetInventory().CreateInInventory("Offroad_02_Wheel");
986
987 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
988 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
989 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
990 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
991 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
992 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
993
994
995 GetInventory().CreateInInventory("Offroad_02_Wheel");
996 GetInventory().CreateInInventory("Offroad_02_Wheel");
997 }
998}
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
Offroad_02LightProfileFront VehicleLightProfileFront Offroad_02LightProfileRear()
void Offroad_02LightProfileFront()
UniversalTemperatureSourceLambdaBaseImpl UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceLambdaEngine()
void VehicleLightData(VehicleLightProfileBase profile)
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
override bool IsVitalRadiator()
override bool IsVitalSparkPlug()
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 float GetTransportCameraDistance()
override bool CanReleaseAttachment(EntityAI attachment)
override bool CanDisplayCargo()
Offroad_02 CarScript OnDebugSpawn()
override EntityAI GetElectricitySourceDevice()
override void OnEngineStart()
override bool HasGangedTailAndBrakeLights()
override int GetAnimInstance()
override bool CrewCanGetThrough(int posIdx)
override bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
bool CanManipulateSpareWheel(string slotSelectionName)
override bool NeedElectricitySourceDevice()
override float GetWeightCoef()
override string GetElectricitySourceDeviceType()
override string GetDoorSelectionNameFromSeatPos(int posIdx)
override int GetCarDoorsState(string slotType)
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()
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.