590{
594
596 {
597
598
605
606 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
607 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
608
611
615 });
619 });
620
623
625
627 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
628 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
629 }
630
632 {
636 }
637
639 {
640 super.EEInit();
641
643 {
650
653 }
654 }
655
657 {
658 return true;
659 }
660
662 {
663 return true;
664 }
665
667 {
668 super.GetElectricitySourceDevice();
669
671 }
672
674 {
675 return "CarBattery";
676 }
677
679 {
680 super.OnEngineStart();
681
683 {
686 }
687 }
688
690 {
691 super.OnEngineStop();
692
694 {
697 }
698 }
699
701 {
703 {
705 {
707 }
708 }
709 }
710
712 {
714 }
715
717 {
718 return 5.1;
719 }
720
722 {
723 return 1.5;
724 }
725
727 {
728 switch (posIdx)
729 {
730 case 0:
732 case 1:
734 case 2:
736 case 3:
738 }
739
740 return 0;
741 }
742
744 {
745 if (!super.CanReleaseAttachment(attachment))
746 {
747 return false;
748 }
749
750 string attType = attachment.GetType();
751 switch (attType)
752 {
753 case "CarBattery":
755 {
756 return false;
757 }
758 break;
759
760 case "GlowPlug":
762 {
763 return false;
764 }
765 break;
766 }
767
768 return true;
769 }
770
772 {
774 }
775
777 {
778 if ( !super.CanDisplayAttachmentCategory(category_name))
779 {
780 return false;
781 }
782
784 if (category_name.
Contains(
"engine"))
785 {
787 {
788 return false;
789 }
790 }
791
792 return true;
793 }
794
796 {
797 if ( !super.CanDisplayCargo() )
798 return false;
799
801 return false;
802
803 return true;
804 }
805
807 {
809
810 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
811 if (!carDoor)
812 {
814 }
815
816 switch (slotType)
817 {
818 case "Offroad_02_Door_1_1":
819 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
820
821 case "Offroad_02_Door_2_1":
822 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
823
824 case "Offroad_02_Door_1_2":
825 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
826
827 case "Offroad_02_Door_2_2":
828 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
829
830 case "Offroad_02_Hood":
831 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
832
833 case "Offroad_02_Trunk":
834 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
835 }
836
838 }
839
840
842 {
843 switch( posIdx )
844 {
845 case 0:
847 return false;
848
849 return true;
850 break;
851
852 case 1:
854 return false;
855
856 return true;
857 break;
858
859 case 2:
861 return false;
862
863 return true;
864 break;
865
866 case 3:
868 return false;
869
870 return true;
871 break;
872 }
873
874 return false;
875 }
876
878 {
879 switch( posIdx )
880 {
881 case 0:
882 return "doors_driver";
883 break;
884 case 1:
885 return "doors_codriver";
886 break;
887 case 2:
888 return "doors_cargo1";
889 break;
890 case 3:
891 return "doors_cargo2";
892 break;
893 }
894
895 return super.GetDoorSelectionNameFromSeatPos(posIdx);
896 }
897
899 {
900 switch (posIdx)
901 {
902 case 0:
903 return "Offroad_02_Door_1_1";
904 case 1:
905 return "Offroad_02_Door_2_1";
906 case 2:
907 return "Offroad_02_Door_1_2";
908 case 3:
909 return "Offroad_02_Door_2_2";
910 }
911
912 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
913 }
914
916 {
917 switch ( ctrl )
918 {
920 float newValue = 0;
922 {
923 newValue += 0.25;
924 }
925
927 {
928 newValue += 0.25;
929 }
930
932 {
933 newValue += 0.25;
934 }
935
937 {
938 newValue += 0.25;
939 }
940
942 break;
943 }
944
945 return super.OnSound(ctrl, oldValue);
946 }
947
949 {
950 switch (selection)
951 {
952 case "doors_driver":
953 return "DoorsDriver";
954 case "doors_codriver":
955 return "DoorsCoDriver";
956 case "doors_cargo1":
957 return "DoorsCargo1";
958 case "doors_cargo2":
959 return "DoorsCargo2";
960 case "doors_hood":
961 return "DoorsHood";
962 case "doors_trunk":
963 return "DoorsTrunk";
964 }
965
966 return "";
967 }
968
970 {
971 switch (currentSeat)
972 {
973 case 0:
974 return nextSeat == 1;
975 case 1:
976 return nextSeat == 0;
977 case 2:
978 return nextSeat == 3;
979 case 3:
980 return nextSeat == 2;
981 }
982
983 return false;
984 }
985
987 {
988 switch (pCurrentSeat)
989 {
990 case 0:
991 return pDoorsSelection == "DoorsDriver";
992 case 1:
993 return pDoorsSelection == "DoorsCoDriver";
994 case 2:
995 return pDoorsSelection == "DoorsCargo1";
996 case 3:
997 return pDoorsSelection == "DoorsCargo2";
998 }
999
1000 return false;
1001 }
1002
1004 {
1005 return false;
1006 }
1007
1009 {
1010 return false;
1011 }
1012
1014 {
1016 SpawnAdditionalItems();
1017 FillUpCarFluids();
1018
1024
1031
1032
1035 }
1036}
1037
1038
1040{
1042 {
1044 SpawnAdditionalItems();
1045 FillUpCarFluids();
1046
1047 GetInventory().CreateInInventory("Offroad_02_Wheel");
1048 GetInventory().CreateInInventory("Offroad_02_Wheel");
1049 GetInventory().CreateInInventory("Offroad_02_Wheel");
1050 GetInventory().CreateInInventory("Offroad_02_Wheel");
1051
1052 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1053 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1054 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1055 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1056 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1057 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1058
1059
1060 GetInventory().CreateInInventory("Offroad_02_Wheel");
1061 GetInventory().CreateInInventory("Offroad_02_Wheel");
1062 }
1063}
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.