564{
568
570 {
571
572
579
580 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
581 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
582
585
589 });
593 });
594
597
599
601 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
602 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
603 }
604
606 {
610 }
611
613 {
614 super.EEInit();
615
617 {
624
627 }
628 }
629
631 {
632 return true;
633 }
634
636 {
637 return true;
638 }
639
641 {
642 super.GetElectricitySourceDevice();
643
645 }
646
648 {
649 return "CarBattery";
650 }
651
653 {
654 super.OnEngineStart();
655
657 {
660 }
661 }
662
664 {
665 super.OnEngineStop();
666
668 {
671 }
672 }
673
675 {
677 {
679 {
681 }
682 }
683 }
684
686 {
688 }
689
691 {
692 return 5.1;
693 }
694
696 {
697 return 1.5;
698 }
699
701 {
702 switch (posIdx)
703 {
704 case 0:
706 case 1:
708 case 2:
710 case 3:
712 }
713
714 return 0;
715 }
716
718 {
719 if (!super.CanReleaseAttachment(attachment))
720 {
721 return false;
722 }
723
724 string attType = attachment.GetType();
725 switch (attType)
726 {
727 case "CarBattery":
729 {
730 return false;
731 }
732 break;
733
734 case "GlowPlug":
736 {
737 return false;
738 }
739 break;
740 }
741
742 return true;
743 }
744
746 {
748 }
749
751 {
752 if ( !super.CanDisplayAttachmentCategory(category_name))
753 {
754 return false;
755 }
756
758 if (category_name.
Contains(
"engine"))
759 {
761 {
762 return false;
763 }
764 }
765
766 return true;
767 }
768
770 {
771 if ( !super.CanDisplayCargo() )
772 return false;
773
775 return false;
776
777 return true;
778 }
779
781 {
783
784 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
785 if (!carDoor)
786 {
788 }
789
790 switch (slotType)
791 {
792 case "Offroad_02_Door_1_1":
793 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
794
795 case "Offroad_02_Door_2_1":
796 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
797
798 case "Offroad_02_Door_1_2":
799 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
800
801 case "Offroad_02_Door_2_2":
802 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
803
804 case "Offroad_02_Hood":
805 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
806
807 case "Offroad_02_Trunk":
808 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
809 }
810
812 }
813
814
816 {
817 switch( posIdx )
818 {
819 case 0:
821 return false;
822
823 return true;
824 break;
825
826 case 1:
828 return false;
829
830 return true;
831 break;
832
833 case 2:
835 return false;
836
837 return true;
838 break;
839
840 case 3:
842 return false;
843
844 return true;
845 break;
846 }
847
848 return false;
849 }
850
852 {
853 switch( posIdx )
854 {
855 case 0:
856 return "doors_driver";
857 break;
858 case 1:
859 return "doors_codriver";
860 break;
861 case 2:
862 return "doors_cargo1";
863 break;
864 case 3:
865 return "doors_cargo2";
866 break;
867 }
868
869 return super.GetDoorSelectionNameFromSeatPos(posIdx);
870 }
871
873 {
874 switch (posIdx)
875 {
876 case 0:
877 return "Offroad_02_Door_1_1";
878 case 1:
879 return "Offroad_02_Door_2_1";
880 case 2:
881 return "Offroad_02_Door_1_2";
882 case 3:
883 return "Offroad_02_Door_2_2";
884 }
885
886 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
887 }
888
890 {
891 switch ( ctrl )
892 {
894 float newValue = 0;
896 {
897 newValue += 0.25;
898 }
899
901 {
902 newValue += 0.25;
903 }
904
906 {
907 newValue += 0.25;
908 }
909
911 {
912 newValue += 0.25;
913 }
914
916 break;
917 }
918
919 return super.OnSound(ctrl, oldValue);
920 }
921
923 {
924 switch (selection)
925 {
926 case "doors_driver":
927 return "DoorsDriver";
928 case "doors_codriver":
929 return "DoorsCoDriver";
930 case "doors_cargo1":
931 return "DoorsCargo1";
932 case "doors_cargo2":
933 return "DoorsCargo2";
934 case "doors_hood":
935 return "DoorsHood";
936 case "doors_trunk":
937 return "DoorsTrunk";
938 }
939
940 return "";
941 }
942
944 {
945 switch (currentSeat)
946 {
947 case 0:
948 return nextSeat == 1;
949 case 1:
950 return nextSeat == 0;
951 case 2:
952 return nextSeat == 3;
953 case 3:
954 return nextSeat == 2;
955 }
956
957 return false;
958 }
959
961 {
962 switch (pCurrentSeat)
963 {
964 case 0:
965 return pDoorsSelection == "DoorsDriver";
966 case 1:
967 return pDoorsSelection == "DoorsCoDriver";
968 case 2:
969 return pDoorsSelection == "DoorsCargo1";
970 case 3:
971 return pDoorsSelection == "DoorsCargo2";
972 }
973
974 return false;
975 }
976
978 {
979 return false;
980 }
981
983 {
984 return false;
985 }
986
988 {
990 SpawnAdditionalItems();
991 FillUpCarFluids();
992
998
1005
1006
1009 }
1010}
1011
1012
1014{
1016 {
1018 SpawnAdditionalItems();
1019 FillUpCarFluids();
1020
1021 GetInventory().CreateInInventory("Offroad_02_Wheel");
1022 GetInventory().CreateInInventory("Offroad_02_Wheel");
1023 GetInventory().CreateInInventory("Offroad_02_Wheel");
1024 GetInventory().CreateInInventory("Offroad_02_Wheel");
1025
1026 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1027 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1028 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1029 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1030 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1031 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1032
1033
1034 GetInventory().CreateInInventory("Offroad_02_Wheel");
1035 GetInventory().CreateInInventory("Offroad_02_Wheel");
1036 }
1037}
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.