640{
644
646 {
647
648
655
656 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
657 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
658
661
665 });
669 });
670
673
675
677 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
678 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
679 }
680
682 {
686 }
687
689 {
690 super.EEInit();
691
693 {
700
703 }
704 }
705
707 {
708 return true;
709 }
710
712 {
713 return true;
714 }
715
717 {
718 super.GetElectricitySourceDevice();
719
721 }
722
724 {
725 return "CarBattery";
726 }
727
729 {
730 super.OnEngineStart();
731
733 {
736 }
737 }
738
740 {
741 super.OnEngineStop();
742
744 {
747 }
748 }
749
751 {
753 {
755 {
757 }
758 }
759 }
760
762 {
764 }
765
767 {
768 return 5.1;
769 }
770
772 {
773 return 1.5;
774 }
775
777 {
778 switch (posIdx)
779 {
780 case 0:
782 case 1:
784 case 2:
786 case 3:
788 }
789
790 return 0;
791 }
792
794 {
795 if (!super.CanReleaseAttachment(attachment))
796 {
797 return false;
798 }
799
800 string attType = attachment.GetType();
801 switch (attType)
802 {
803 case "CarBattery":
805 {
806 return false;
807 }
808 break;
809
810 case "GlowPlug":
812 {
813 return false;
814 }
815 break;
816 }
817
818 return true;
819 }
820
822 {
824 }
825
827 {
828 if ( !super.CanDisplayAttachmentCategory(category_name))
829 {
830 return false;
831 }
832
834 if (category_name.
Contains(
"engine"))
835 {
837 {
838 return false;
839 }
840 }
841
842 return true;
843 }
844
846 {
847 if ( !super.CanDisplayCargo() )
848 return false;
849
851 return false;
852
853 return true;
854 }
855
857 {
859
860 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
861 if (!carDoor)
862 {
864 }
865
866 switch (slotType)
867 {
868 case "Offroad_02_Door_1_1":
869 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
870
871 case "Offroad_02_Door_2_1":
872 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
873
874 case "Offroad_02_Door_1_2":
875 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
876
877 case "Offroad_02_Door_2_2":
878 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
879
880 case "Offroad_02_Hood":
881 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
882
883 case "Offroad_02_Trunk":
884 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
885 }
886
888 }
889
890
892 {
893 switch( posIdx )
894 {
895 case 0:
897 return false;
898
899 return true;
900 break;
901
902 case 1:
904 return false;
905
906 return true;
907 break;
908
909 case 2:
911 return false;
912
913 return true;
914 break;
915
916 case 3:
918 return false;
919
920 return true;
921 break;
922 }
923
924 return false;
925 }
926
928 {
929 switch( posIdx )
930 {
931 case 0:
932 return "doors_driver";
933 break;
934 case 1:
935 return "doors_codriver";
936 break;
937 case 2:
938 return "doors_cargo1";
939 break;
940 case 3:
941 return "doors_cargo2";
942 break;
943 }
944
945 return super.GetDoorSelectionNameFromSeatPos(posIdx);
946 }
947
949 {
950 switch (posIdx)
951 {
952 case 0:
953 return "Offroad_02_Door_1_1";
954 case 1:
955 return "Offroad_02_Door_2_1";
956 case 2:
957 return "Offroad_02_Door_1_2";
958 case 3:
959 return "Offroad_02_Door_2_2";
960 }
961
962 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
963 }
964
966 {
967 switch ( ctrl )
968 {
970 float newValue = 0;
972 {
973 newValue += 0.25;
974 }
975
977 {
978 newValue += 0.25;
979 }
980
982 {
983 newValue += 0.25;
984 }
985
987 {
988 newValue += 0.25;
989 }
990
992 break;
993 }
994
995 return super.OnSound(ctrl, oldValue);
996 }
997
999 {
1000 switch (selection)
1001 {
1002 case "doors_driver":
1003 return "DoorsDriver";
1004 case "doors_codriver":
1005 return "DoorsCoDriver";
1006 case "doors_cargo1":
1007 return "DoorsCargo1";
1008 case "doors_cargo2":
1009 return "DoorsCargo2";
1010 case "doors_hood":
1011 return "DoorsHood";
1012 case "doors_trunk":
1013 return "DoorsTrunk";
1014 }
1015
1016 return "";
1017 }
1018
1020 {
1021 switch (currentSeat)
1022 {
1023 case 0:
1024 return nextSeat == 1;
1025 case 1:
1026 return nextSeat == 0;
1027 case 2:
1028 return nextSeat == 3;
1029 case 3:
1030 return nextSeat == 2;
1031 }
1032
1033 return false;
1034 }
1035
1037 {
1038 switch (pCurrentSeat)
1039 {
1040 case 0:
1041 return pDoorsSelection == "DoorsDriver";
1042 case 1:
1043 return pDoorsSelection == "DoorsCoDriver";
1044 case 2:
1045 return pDoorsSelection == "DoorsCargo1";
1046 case 3:
1047 return pDoorsSelection == "DoorsCargo2";
1048 }
1049
1050 return false;
1051 }
1052
1054 {
1055 return false;
1056 }
1057
1059 {
1060 return false;
1061 }
1062
1064 {
1066 SpawnAdditionalItems();
1067 FillUpCarFluids();
1068
1074
1081
1082
1085 }
1086}
1087
1088
1090{
1092 {
1094 SpawnAdditionalItems();
1095 FillUpCarFluids();
1096
1097 GetInventory().CreateInInventory("Offroad_02_Wheel");
1098 GetInventory().CreateInInventory("Offroad_02_Wheel");
1099 GetInventory().CreateInInventory("Offroad_02_Wheel");
1100 GetInventory().CreateInInventory("Offroad_02_Wheel");
1101
1102 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1103 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1104 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1105 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1106 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1107 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1108
1109
1110 GetInventory().CreateInInventory("Offroad_02_Wheel");
1111 GetInventory().CreateInInventory("Offroad_02_Wheel");
1112 }
1113}
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.