580{
584
586 {
587
588
595
596 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
597 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
598
601
605 });
609 });
610
613
615
617 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
618 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
619 }
620
622 {
626 }
627
629 {
630 super.EEInit();
631
633 {
640
643 }
644 }
645
647 {
648 return true;
649 }
650
652 {
653 return true;
654 }
655
657 {
658 super.GetElectricitySourceDevice();
659
661 }
662
664 {
665 return "CarBattery";
666 }
667
669 {
670 super.OnEngineStart();
671
673 {
676 }
677 }
678
680 {
681 super.OnEngineStop();
682
684 {
687 }
688 }
689
691 {
693 {
695 {
697 }
698 }
699 }
700
702 {
704 }
705
707 {
708 return 5.1;
709 }
710
712 {
713 return 1.5;
714 }
715
717 {
718 switch (posIdx)
719 {
720 case 0:
722 case 1:
724 case 2:
726 case 3:
728 }
729
730 return 0;
731 }
732
734 {
735 if (!super.CanReleaseAttachment(attachment))
736 {
737 return false;
738 }
739
740 string attType = attachment.GetType();
741 switch (attType)
742 {
743 case "CarBattery":
745 {
746 return false;
747 }
748 break;
749
750 case "GlowPlug":
752 {
753 return false;
754 }
755 break;
756 }
757
758 return true;
759 }
760
762 {
764 }
765
767 {
768 if ( !super.CanDisplayAttachmentCategory(category_name))
769 {
770 return false;
771 }
772
774 if (category_name.
Contains(
"engine"))
775 {
777 {
778 return false;
779 }
780 }
781
782 return true;
783 }
784
786 {
787 if ( !super.CanDisplayCargo() )
788 return false;
789
791 return false;
792
793 return true;
794 }
795
797 {
799
800 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
801 if (!carDoor)
802 {
804 }
805
806 switch (slotType)
807 {
808 case "Offroad_02_Door_1_1":
809 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
810
811 case "Offroad_02_Door_2_1":
812 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
813
814 case "Offroad_02_Door_1_2":
815 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
816
817 case "Offroad_02_Door_2_2":
818 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
819
820 case "Offroad_02_Hood":
821 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
822
823 case "Offroad_02_Trunk":
824 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
825 }
826
828 }
829
830
832 {
833 switch( posIdx )
834 {
835 case 0:
837 return false;
838
839 return true;
840 break;
841
842 case 1:
844 return false;
845
846 return true;
847 break;
848
849 case 2:
851 return false;
852
853 return true;
854 break;
855
856 case 3:
858 return false;
859
860 return true;
861 break;
862 }
863
864 return false;
865 }
866
868 {
869 switch( posIdx )
870 {
871 case 0:
872 return "doors_driver";
873 break;
874 case 1:
875 return "doors_codriver";
876 break;
877 case 2:
878 return "doors_cargo1";
879 break;
880 case 3:
881 return "doors_cargo2";
882 break;
883 }
884
885 return super.GetDoorSelectionNameFromSeatPos(posIdx);
886 }
887
889 {
890 switch (posIdx)
891 {
892 case 0:
893 return "Offroad_02_Door_1_1";
894 case 1:
895 return "Offroad_02_Door_2_1";
896 case 2:
897 return "Offroad_02_Door_1_2";
898 case 3:
899 return "Offroad_02_Door_2_2";
900 }
901
902 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
903 }
904
906 {
907 switch ( ctrl )
908 {
910 float newValue = 0;
912 {
913 newValue += 0.25;
914 }
915
917 {
918 newValue += 0.25;
919 }
920
922 {
923 newValue += 0.25;
924 }
925
927 {
928 newValue += 0.25;
929 }
930
932 break;
933 }
934
935 return super.OnSound(ctrl, oldValue);
936 }
937
939 {
940 switch (selection)
941 {
942 case "doors_driver":
943 return "DoorsDriver";
944 case "doors_codriver":
945 return "DoorsCoDriver";
946 case "doors_cargo1":
947 return "DoorsCargo1";
948 case "doors_cargo2":
949 return "DoorsCargo2";
950 case "doors_hood":
951 return "DoorsHood";
952 case "doors_trunk":
953 return "DoorsTrunk";
954 }
955
956 return "";
957 }
958
960 {
961 switch (currentSeat)
962 {
963 case 0:
964 return nextSeat == 1;
965 case 1:
966 return nextSeat == 0;
967 case 2:
968 return nextSeat == 3;
969 case 3:
970 return nextSeat == 2;
971 }
972
973 return false;
974 }
975
977 {
978 switch (pCurrentSeat)
979 {
980 case 0:
981 return pDoorsSelection == "DoorsDriver";
982 case 1:
983 return pDoorsSelection == "DoorsCoDriver";
984 case 2:
985 return pDoorsSelection == "DoorsCargo1";
986 case 3:
987 return pDoorsSelection == "DoorsCargo2";
988 }
989
990 return false;
991 }
992
994 {
995 return false;
996 }
997
999 {
1000 return false;
1001 }
1002
1004 {
1006 SpawnAdditionalItems();
1007 FillUpCarFluids();
1008
1014
1021
1022
1025 }
1026}
1027
1028
1030{
1032 {
1034 SpawnAdditionalItems();
1035 FillUpCarFluids();
1036
1037 GetInventory().CreateInInventory("Offroad_02_Wheel");
1038 GetInventory().CreateInInventory("Offroad_02_Wheel");
1039 GetInventory().CreateInInventory("Offroad_02_Wheel");
1040 GetInventory().CreateInInventory("Offroad_02_Wheel");
1041
1042 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1043 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1044 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1045 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1046 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1047 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1048
1049
1050 GetInventory().CreateInInventory("Offroad_02_Wheel");
1051 GetInventory().CreateInInventory("Offroad_02_Wheel");
1052 }
1053}
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.