607{
611
613 {
614
615
622
623 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
624 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
625
628
632 });
636 });
637
640
642
644 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
645 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
646 }
647
649 {
653 }
654
656 {
657 super.EEInit();
658
660 {
667
670 }
671 }
672
674 {
675 return true;
676 }
677
679 {
680 return true;
681 }
682
684 {
685 super.GetElectricitySourceDevice();
686
688 }
689
691 {
692 return "CarBattery";
693 }
694
696 {
697 super.OnEngineStart();
698
700 {
703 }
704 }
705
707 {
708 super.OnEngineStop();
709
711 {
714 }
715 }
716
718 {
720 {
722 {
724 }
725 }
726 }
727
729 {
731 }
732
734 {
735 return 5.1;
736 }
737
739 {
740 return 1.5;
741 }
742
744 {
745 switch (posIdx)
746 {
747 case 0:
749 case 1:
751 case 2:
753 case 3:
755 }
756
757 return 0;
758 }
759
761 {
762 if (!super.CanReleaseAttachment(attachment))
763 {
764 return false;
765 }
766
767 string attType = attachment.GetType();
768 switch (attType)
769 {
770 case "CarBattery":
772 {
773 return false;
774 }
775 break;
776
777 case "GlowPlug":
779 {
780 return false;
781 }
782 break;
783 }
784
785 return true;
786 }
787
789 {
791 }
792
794 {
795 if ( !super.CanDisplayAttachmentCategory(category_name))
796 {
797 return false;
798 }
799
801 if (category_name.
Contains(
"engine"))
802 {
804 {
805 return false;
806 }
807 }
808
809 return true;
810 }
811
813 {
814 if ( !super.CanDisplayCargo() )
815 return false;
816
818 return false;
819
820 return true;
821 }
822
824 {
826
827 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
828 if (!carDoor)
829 {
831 }
832
833 switch (slotType)
834 {
835 case "Offroad_02_Door_1_1":
836 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
837
838 case "Offroad_02_Door_2_1":
839 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
840
841 case "Offroad_02_Door_1_2":
842 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
843
844 case "Offroad_02_Door_2_2":
845 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
846
847 case "Offroad_02_Hood":
848 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
849
850 case "Offroad_02_Trunk":
851 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
852 }
853
855 }
856
857
859 {
860 switch( posIdx )
861 {
862 case 0:
864 return false;
865
866 return true;
867 break;
868
869 case 1:
871 return false;
872
873 return true;
874 break;
875
876 case 2:
878 return false;
879
880 return true;
881 break;
882
883 case 3:
885 return false;
886
887 return true;
888 break;
889 }
890
891 return false;
892 }
893
895 {
896 switch( posIdx )
897 {
898 case 0:
899 return "doors_driver";
900 break;
901 case 1:
902 return "doors_codriver";
903 break;
904 case 2:
905 return "doors_cargo1";
906 break;
907 case 3:
908 return "doors_cargo2";
909 break;
910 }
911
912 return super.GetDoorSelectionNameFromSeatPos(posIdx);
913 }
914
916 {
917 switch (posIdx)
918 {
919 case 0:
920 return "Offroad_02_Door_1_1";
921 case 1:
922 return "Offroad_02_Door_2_1";
923 case 2:
924 return "Offroad_02_Door_1_2";
925 case 3:
926 return "Offroad_02_Door_2_2";
927 }
928
929 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
930 }
931
933 {
934 switch ( ctrl )
935 {
937 float newValue = 0;
939 {
940 newValue += 0.25;
941 }
942
944 {
945 newValue += 0.25;
946 }
947
949 {
950 newValue += 0.25;
951 }
952
954 {
955 newValue += 0.25;
956 }
957
959 break;
960 }
961
962 return super.OnSound(ctrl, oldValue);
963 }
964
966 {
967 switch (selection)
968 {
969 case "doors_driver":
970 return "DoorsDriver";
971 case "doors_codriver":
972 return "DoorsCoDriver";
973 case "doors_cargo1":
974 return "DoorsCargo1";
975 case "doors_cargo2":
976 return "DoorsCargo2";
977 case "doors_hood":
978 return "DoorsHood";
979 case "doors_trunk":
980 return "DoorsTrunk";
981 }
982
983 return "";
984 }
985
987 {
988 switch (currentSeat)
989 {
990 case 0:
991 return nextSeat == 1;
992 case 1:
993 return nextSeat == 0;
994 case 2:
995 return nextSeat == 3;
996 case 3:
997 return nextSeat == 2;
998 }
999
1000 return false;
1001 }
1002
1004 {
1005 switch (pCurrentSeat)
1006 {
1007 case 0:
1008 return pDoorsSelection == "DoorsDriver";
1009 case 1:
1010 return pDoorsSelection == "DoorsCoDriver";
1011 case 2:
1012 return pDoorsSelection == "DoorsCargo1";
1013 case 3:
1014 return pDoorsSelection == "DoorsCargo2";
1015 }
1016
1017 return false;
1018 }
1019
1021 {
1022 return false;
1023 }
1024
1026 {
1027 return false;
1028 }
1029
1031 {
1033 SpawnAdditionalItems();
1034 FillUpCarFluids();
1035
1041
1048
1049
1052 }
1053}
1054
1055
1057{
1059 {
1061 SpawnAdditionalItems();
1062 FillUpCarFluids();
1063
1064 GetInventory().CreateInInventory("Offroad_02_Wheel");
1065 GetInventory().CreateInInventory("Offroad_02_Wheel");
1066 GetInventory().CreateInInventory("Offroad_02_Wheel");
1067 GetInventory().CreateInInventory("Offroad_02_Wheel");
1068
1069 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1070 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1071 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1072 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1073 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1074 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1075
1076
1077 GetInventory().CreateInInventory("Offroad_02_Wheel");
1078 GetInventory().CreateInInventory("Offroad_02_Wheel");
1079 }
1080}
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.