553{
557
559 {
560
561
568
569 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
570 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
571
574
578 });
582 });
583
586
588
590 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
591 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
592 }
593
595 {
599 }
600
602 {
603 super.EEInit();
604
606 {
613
616 }
617 }
618
620 {
621 return true;
622 }
623
625 {
626 return true;
627 }
628
630 {
631 super.GetElectricitySourceDevice();
632
634 }
635
637 {
638 return "CarBattery";
639 }
640
642 {
643 super.OnEngineStart();
644
646 {
649 }
650 }
651
653 {
654 super.OnEngineStop();
655
657 {
660 }
661 }
662
664 {
666 {
668 {
670 }
671 }
672 }
673
675 {
677 }
678
680 {
681 return 5.1;
682 }
683
685 {
686 return 1.5;
687 }
688
690 {
691 switch (posIdx)
692 {
693 case 0:
695 case 1:
697 case 2:
699 case 3:
701 }
702
703 return 0;
704 }
705
707 {
708 if (!super.CanReleaseAttachment(attachment))
709 {
710 return false;
711 }
712
713 string attType = attachment.GetType();
714 switch (attType)
715 {
716 case "CarBattery":
718 {
719 return false;
720 }
721 break;
722
723 case "GlowPlug":
725 {
726 return false;
727 }
728 break;
729 }
730
731 return true;
732 }
733
735 {
737 }
738
740 {
741 if ( !super.CanDisplayAttachmentCategory(category_name))
742 {
743 return false;
744 }
745
747 if (category_name.
Contains(
"engine"))
748 {
750 {
751 return false;
752 }
753 }
754
755 return true;
756 }
757
759 {
760 if ( !super.CanDisplayCargo() )
761 return false;
762
764 return false;
765
766 return true;
767 }
768
770 {
772
773 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
774 if (!carDoor)
775 {
777 }
778
779 switch (slotType)
780 {
781 case "Offroad_02_Door_1_1":
782 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
783
784 case "Offroad_02_Door_2_1":
785 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
786
787 case "Offroad_02_Door_1_2":
788 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
789
790 case "Offroad_02_Door_2_2":
791 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
792
793 case "Offroad_02_Hood":
794 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
795
796 case "Offroad_02_Trunk":
797 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
798 }
799
801 }
802
803
805 {
806 switch( posIdx )
807 {
808 case 0:
810 return false;
811
812 return true;
813 break;
814
815 case 1:
817 return false;
818
819 return true;
820 break;
821
822 case 2:
824 return false;
825
826 return true;
827 break;
828
829 case 3:
831 return false;
832
833 return true;
834 break;
835 }
836
837 return false;
838 }
839
841 {
842 switch( posIdx )
843 {
844 case 0:
845 return "doors_driver";
846 break;
847 case 1:
848 return "doors_codriver";
849 break;
850 case 2:
851 return "doors_cargo1";
852 break;
853 case 3:
854 return "doors_cargo2";
855 break;
856 }
857
858 return super.GetDoorSelectionNameFromSeatPos(posIdx);
859 }
860
862 {
863 switch (posIdx)
864 {
865 case 0:
866 return "Offroad_02_Door_1_1";
867 case 1:
868 return "Offroad_02_Door_2_1";
869 case 2:
870 return "Offroad_02_Door_1_2";
871 case 3:
872 return "Offroad_02_Door_2_2";
873 }
874
875 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
876 }
877
879 {
880 switch ( ctrl )
881 {
883 float newValue = 0;
885 {
886 newValue += 0.25;
887 }
888
890 {
891 newValue += 0.25;
892 }
893
895 {
896 newValue += 0.25;
897 }
898
900 {
901 newValue += 0.25;
902 }
903
905 break;
906 }
907
908 return super.OnSound(ctrl, oldValue);
909 }
910
912 {
913 switch (selection)
914 {
915 case "doors_driver":
916 return "DoorsDriver";
917 case "doors_codriver":
918 return "DoorsCoDriver";
919 case "doors_cargo1":
920 return "DoorsCargo1";
921 case "doors_cargo2":
922 return "DoorsCargo2";
923 case "doors_hood":
924 return "DoorsHood";
925 case "doors_trunk":
926 return "DoorsTrunk";
927 }
928
929 return "";
930 }
931
933 {
934 switch (currentSeat)
935 {
936 case 0:
937 return nextSeat == 1;
938 case 1:
939 return nextSeat == 0;
940 case 2:
941 return nextSeat == 3;
942 case 3:
943 return nextSeat == 2;
944 }
945
946 return false;
947 }
948
950 {
951 switch (pCurrentSeat)
952 {
953 case 0:
954 return pDoorsSelection == "DoorsDriver";
955 case 1:
956 return pDoorsSelection == "DoorsCoDriver";
957 case 2:
958 return pDoorsSelection == "DoorsCargo1";
959 case 3:
960 return pDoorsSelection == "DoorsCargo2";
961 }
962
963 return false;
964 }
965
967 {
968 return false;
969 }
970
972 {
973 return false;
974 }
975
977 {
979 SpawnAdditionalItems();
980 FillUpCarFluids();
981
987
994
995
998 }
999}
1000
1001
1003{
1005 {
1007 SpawnAdditionalItems();
1008 FillUpCarFluids();
1009
1010 GetInventory().CreateInInventory("Offroad_02_Wheel");
1011 GetInventory().CreateInInventory("Offroad_02_Wheel");
1012 GetInventory().CreateInInventory("Offroad_02_Wheel");
1013 GetInventory().CreateInInventory("Offroad_02_Wheel");
1014
1015 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1016 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1017 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1018 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1019 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1020 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1021
1022
1023 GetInventory().CreateInInventory("Offroad_02_Wheel");
1024 GetInventory().CreateInInventory("Offroad_02_Wheel");
1025 }
1026}
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.