575{
579
581 {
582
583
590
591 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
592 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
593
596
600 });
604 });
605
608
610
612 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
613 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
614 }
615
617 {
621 }
622
624 {
625 super.EEInit();
626
628 {
635
638 }
639 }
640
642 {
643 return true;
644 }
645
647 {
648 return true;
649 }
650
652 {
653 super.GetElectricitySourceDevice();
654
656 }
657
659 {
660 return "CarBattery";
661 }
662
664 {
665 super.OnEngineStart();
666
668 {
671 }
672 }
673
675 {
676 super.OnEngineStop();
677
679 {
682 }
683 }
684
686 {
688 {
690 {
692 }
693 }
694 }
695
697 {
699 }
700
702 {
703 return 5.1;
704 }
705
707 {
708 return 1.5;
709 }
710
712 {
713 switch (posIdx)
714 {
715 case 0:
717 case 1:
719 case 2:
721 case 3:
723 }
724
725 return 0;
726 }
727
729 {
730 if (!super.CanReleaseAttachment(attachment))
731 {
732 return false;
733 }
734
735 string attType = attachment.GetType();
736 switch (attType)
737 {
738 case "CarBattery":
740 {
741 return false;
742 }
743 break;
744
745 case "GlowPlug":
747 {
748 return false;
749 }
750 break;
751 }
752
753 return true;
754 }
755
757 {
759 }
760
762 {
763 if ( !super.CanDisplayAttachmentCategory(category_name))
764 {
765 return false;
766 }
767
769 if (category_name.
Contains(
"engine"))
770 {
772 {
773 return false;
774 }
775 }
776
777 return true;
778 }
779
781 {
782 if ( !super.CanDisplayCargo() )
783 return false;
784
786 return false;
787
788 return true;
789 }
790
792 {
794
795 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
796 if (!carDoor)
797 {
799 }
800
801 switch (slotType)
802 {
803 case "Offroad_02_Door_1_1":
804 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
805
806 case "Offroad_02_Door_2_1":
807 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
808
809 case "Offroad_02_Door_1_2":
810 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
811
812 case "Offroad_02_Door_2_2":
813 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
814
815 case "Offroad_02_Hood":
816 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
817
818 case "Offroad_02_Trunk":
819 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
820 }
821
823 }
824
825
827 {
828 switch( posIdx )
829 {
830 case 0:
832 return false;
833
834 return true;
835 break;
836
837 case 1:
839 return false;
840
841 return true;
842 break;
843
844 case 2:
846 return false;
847
848 return true;
849 break;
850
851 case 3:
853 return false;
854
855 return true;
856 break;
857 }
858
859 return false;
860 }
861
863 {
864 switch( posIdx )
865 {
866 case 0:
867 return "doors_driver";
868 break;
869 case 1:
870 return "doors_codriver";
871 break;
872 case 2:
873 return "doors_cargo1";
874 break;
875 case 3:
876 return "doors_cargo2";
877 break;
878 }
879
880 return super.GetDoorSelectionNameFromSeatPos(posIdx);
881 }
882
884 {
885 switch (posIdx)
886 {
887 case 0:
888 return "Offroad_02_Door_1_1";
889 case 1:
890 return "Offroad_02_Door_2_1";
891 case 2:
892 return "Offroad_02_Door_1_2";
893 case 3:
894 return "Offroad_02_Door_2_2";
895 }
896
897 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
898 }
899
901 {
902 switch ( ctrl )
903 {
905 float newValue = 0;
907 {
908 newValue += 0.25;
909 }
910
912 {
913 newValue += 0.25;
914 }
915
917 {
918 newValue += 0.25;
919 }
920
922 {
923 newValue += 0.25;
924 }
925
927 break;
928 }
929
930 return super.OnSound(ctrl, oldValue);
931 }
932
934 {
935 switch (selection)
936 {
937 case "doors_driver":
938 return "DoorsDriver";
939 case "doors_codriver":
940 return "DoorsCoDriver";
941 case "doors_cargo1":
942 return "DoorsCargo1";
943 case "doors_cargo2":
944 return "DoorsCargo2";
945 case "doors_hood":
946 return "DoorsHood";
947 case "doors_trunk":
948 return "DoorsTrunk";
949 }
950
951 return "";
952 }
953
955 {
956 switch (currentSeat)
957 {
958 case 0:
959 return nextSeat == 1;
960 case 1:
961 return nextSeat == 0;
962 case 2:
963 return nextSeat == 3;
964 case 3:
965 return nextSeat == 2;
966 }
967
968 return false;
969 }
970
972 {
973 switch (pCurrentSeat)
974 {
975 case 0:
976 return pDoorsSelection == "DoorsDriver";
977 case 1:
978 return pDoorsSelection == "DoorsCoDriver";
979 case 2:
980 return pDoorsSelection == "DoorsCargo1";
981 case 3:
982 return pDoorsSelection == "DoorsCargo2";
983 }
984
985 return false;
986 }
987
989 {
990 return false;
991 }
992
994 {
995 return false;
996 }
997
999 {
1001 SpawnAdditionalItems();
1002 FillUpCarFluids();
1003
1009
1016
1017
1020 }
1021}
1022
1023
1025{
1027 {
1029 SpawnAdditionalItems();
1030 FillUpCarFluids();
1031
1032 GetInventory().CreateInInventory("Offroad_02_Wheel");
1033 GetInventory().CreateInInventory("Offroad_02_Wheel");
1034 GetInventory().CreateInInventory("Offroad_02_Wheel");
1035 GetInventory().CreateInInventory("Offroad_02_Wheel");
1036
1037 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1038 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1039 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1040 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1041 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1042 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1043
1044
1045 GetInventory().CreateInInventory("Offroad_02_Wheel");
1046 GetInventory().CreateInInventory("Offroad_02_Wheel");
1047 }
1048}
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.