585{
589
591 {
592
593
600
601 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
602 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
603
606
610 });
614 });
615
618
620
622 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
623 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
624 }
625
627 {
631 }
632
634 {
635 super.EEInit();
636
638 {
645
648 }
649 }
650
652 {
653 return true;
654 }
655
657 {
658 return true;
659 }
660
662 {
663 super.GetElectricitySourceDevice();
664
666 }
667
669 {
670 return "CarBattery";
671 }
672
674 {
675 super.OnEngineStart();
676
678 {
681 }
682 }
683
685 {
686 super.OnEngineStop();
687
689 {
692 }
693 }
694
696 {
698 {
700 {
702 }
703 }
704 }
705
707 {
709 }
710
712 {
713 return 5.1;
714 }
715
717 {
718 return 1.5;
719 }
720
722 {
723 switch (posIdx)
724 {
725 case 0:
727 case 1:
729 case 2:
731 case 3:
733 }
734
735 return 0;
736 }
737
739 {
740 if (!super.CanReleaseAttachment(attachment))
741 {
742 return false;
743 }
744
745 string attType = attachment.GetType();
746 switch (attType)
747 {
748 case "CarBattery":
750 {
751 return false;
752 }
753 break;
754
755 case "GlowPlug":
757 {
758 return false;
759 }
760 break;
761 }
762
763 return true;
764 }
765
767 {
769 }
770
772 {
773 if ( !super.CanDisplayAttachmentCategory(category_name))
774 {
775 return false;
776 }
777
779 if (category_name.
Contains(
"engine"))
780 {
782 {
783 return false;
784 }
785 }
786
787 return true;
788 }
789
791 {
792 if ( !super.CanDisplayCargo() )
793 return false;
794
796 return false;
797
798 return true;
799 }
800
802 {
804
805 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
806 if (!carDoor)
807 {
809 }
810
811 switch (slotType)
812 {
813 case "Offroad_02_Door_1_1":
814 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
815
816 case "Offroad_02_Door_2_1":
817 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
818
819 case "Offroad_02_Door_1_2":
820 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
821
822 case "Offroad_02_Door_2_2":
823 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
824
825 case "Offroad_02_Hood":
826 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
827
828 case "Offroad_02_Trunk":
829 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
830 }
831
833 }
834
835
837 {
838 switch( posIdx )
839 {
840 case 0:
842 return false;
843
844 return true;
845 break;
846
847 case 1:
849 return false;
850
851 return true;
852 break;
853
854 case 2:
856 return false;
857
858 return true;
859 break;
860
861 case 3:
863 return false;
864
865 return true;
866 break;
867 }
868
869 return false;
870 }
871
873 {
874 switch( posIdx )
875 {
876 case 0:
877 return "doors_driver";
878 break;
879 case 1:
880 return "doors_codriver";
881 break;
882 case 2:
883 return "doors_cargo1";
884 break;
885 case 3:
886 return "doors_cargo2";
887 break;
888 }
889
890 return super.GetDoorSelectionNameFromSeatPos(posIdx);
891 }
892
894 {
895 switch (posIdx)
896 {
897 case 0:
898 return "Offroad_02_Door_1_1";
899 case 1:
900 return "Offroad_02_Door_2_1";
901 case 2:
902 return "Offroad_02_Door_1_2";
903 case 3:
904 return "Offroad_02_Door_2_2";
905 }
906
907 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
908 }
909
911 {
912 switch ( ctrl )
913 {
915 float newValue = 0;
917 {
918 newValue += 0.25;
919 }
920
922 {
923 newValue += 0.25;
924 }
925
927 {
928 newValue += 0.25;
929 }
930
932 {
933 newValue += 0.25;
934 }
935
937 break;
938 }
939
940 return super.OnSound(ctrl, oldValue);
941 }
942
944 {
945 switch (selection)
946 {
947 case "doors_driver":
948 return "DoorsDriver";
949 case "doors_codriver":
950 return "DoorsCoDriver";
951 case "doors_cargo1":
952 return "DoorsCargo1";
953 case "doors_cargo2":
954 return "DoorsCargo2";
955 case "doors_hood":
956 return "DoorsHood";
957 case "doors_trunk":
958 return "DoorsTrunk";
959 }
960
961 return "";
962 }
963
965 {
966 switch (currentSeat)
967 {
968 case 0:
969 return nextSeat == 1;
970 case 1:
971 return nextSeat == 0;
972 case 2:
973 return nextSeat == 3;
974 case 3:
975 return nextSeat == 2;
976 }
977
978 return false;
979 }
980
982 {
983 switch (pCurrentSeat)
984 {
985 case 0:
986 return pDoorsSelection == "DoorsDriver";
987 case 1:
988 return pDoorsSelection == "DoorsCoDriver";
989 case 2:
990 return pDoorsSelection == "DoorsCargo1";
991 case 3:
992 return pDoorsSelection == "DoorsCargo2";
993 }
994
995 return false;
996 }
997
999 {
1000 return false;
1001 }
1002
1004 {
1005 return false;
1006 }
1007
1009 {
1011 SpawnAdditionalItems();
1012 FillUpCarFluids();
1013
1019
1026
1027
1030 }
1031}
1032
1033
1035{
1037 {
1039 SpawnAdditionalItems();
1040 FillUpCarFluids();
1041
1042 GetInventory().CreateInInventory("Offroad_02_Wheel");
1043 GetInventory().CreateInInventory("Offroad_02_Wheel");
1044 GetInventory().CreateInInventory("Offroad_02_Wheel");
1045 GetInventory().CreateInInventory("Offroad_02_Wheel");
1046
1047 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1048 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1049 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1050 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1051 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1052 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1053
1054
1055 GetInventory().CreateInInventory("Offroad_02_Wheel");
1056 GetInventory().CreateInInventory("Offroad_02_Wheel");
1057 }
1058}
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.