530{
534
536 {
537
538
545
546 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
547 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
548
551
555 });
559 });
560
563
565
567 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
568 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
569 }
570
572 {
576 }
577
579 {
580 super.EEInit();
581
583 {
590
593 }
594 }
595
597 {
598 return true;
599 }
600
602 {
603 return true;
604 }
605
607 {
608 super.GetElectricitySourceDevice();
609
611 }
612
614 {
615 return "CarBattery";
616 }
617
619 {
620 super.OnEngineStart();
621
623 {
626 }
627 }
628
630 {
631 super.OnEngineStop();
632
634 {
637 }
638 }
639
641 {
643 {
645 {
647 }
648 }
649 }
650
652 {
654 }
655
657 {
658 return 5.1;
659 }
660
662 {
663 return 1.5;
664 }
665
667 {
668 switch (posIdx)
669 {
670 case 0:
672 case 1:
674 case 2:
676 case 3:
678 }
679
680 return 0;
681 }
682
684 {
685 if (!super.CanReleaseAttachment(attachment))
686 {
687 return false;
688 }
689
690 string attType = attachment.GetType();
691 switch (attType)
692 {
693 case "CarBattery":
695 {
696 return false;
697 }
698 break;
699
700 case "GlowPlug":
702 {
703 return false;
704 }
705 break;
706 }
707
708 return true;
709 }
710
712 {
714 }
715
717 {
718 if ( !super.CanDisplayAttachmentCategory(category_name))
719 {
720 return false;
721 }
722
724 if (category_name.
Contains(
"engine"))
725 {
727 {
728 return false;
729 }
730 }
731
732 return true;
733 }
734
736 {
737 if ( !super.CanDisplayCargo() )
738 return false;
739
741 return false;
742
743 return true;
744 }
745
747 {
749
750 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
751 if (!carDoor)
752 {
754 }
755
756 switch (slotType)
757 {
758 case "Offroad_02_Door_1_1":
759 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
760
761 case "Offroad_02_Door_2_1":
762 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
763
764 case "Offroad_02_Door_1_2":
765 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
766
767 case "Offroad_02_Door_2_2":
768 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
769
770 case "Offroad_02_Hood":
771 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
772
773 case "Offroad_02_Trunk":
774 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
775 }
776
778 }
779
780
782 {
783 switch( posIdx )
784 {
785 case 0:
787 return false;
788
789 return true;
790 break;
791
792 case 1:
794 return false;
795
796 return true;
797 break;
798
799 case 2:
801 return false;
802
803 return true;
804 break;
805
806 case 3:
808 return false;
809
810 return true;
811 break;
812 }
813
814 return false;
815 }
816
818 {
819 switch( posIdx )
820 {
821 case 0:
822 return "doors_driver";
823 break;
824 case 1:
825 return "doors_codriver";
826 break;
827 case 2:
828 return "doors_cargo1";
829 break;
830 case 3:
831 return "doors_cargo2";
832 break;
833 }
834
835 return super.GetDoorSelectionNameFromSeatPos(posIdx);
836 }
837
839 {
840 switch (posIdx)
841 {
842 case 0:
843 return "Offroad_02_Door_1_1";
844 case 1:
845 return "Offroad_02_Door_2_1";
846 case 2:
847 return "Offroad_02_Door_1_2";
848 case 3:
849 return "Offroad_02_Door_2_2";
850 }
851
852 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
853 }
854
856 {
857 switch ( ctrl )
858 {
860 float newValue = 0;
862 {
863 newValue += 0.25;
864 }
865
867 {
868 newValue += 0.25;
869 }
870
872 {
873 newValue += 0.25;
874 }
875
877 {
878 newValue += 0.25;
879 }
880
882 break;
883 }
884
885 return super.OnSound(ctrl, oldValue);
886 }
887
889 {
890 switch (selection)
891 {
892 case "doors_driver":
893 return "DoorsDriver";
894 case "doors_codriver":
895 return "DoorsCoDriver";
896 case "doors_cargo1":
897 return "DoorsCargo1";
898 case "doors_cargo2":
899 return "DoorsCargo2";
900 case "doors_hood":
901 return "DoorsHood";
902 case "doors_trunk":
903 return "DoorsTrunk";
904 }
905
906 return "";
907 }
908
910 {
911 switch (currentSeat)
912 {
913 case 0:
914 return nextSeat == 1;
915 case 1:
916 return nextSeat == 0;
917 case 2:
918 return nextSeat == 3;
919 case 3:
920 return nextSeat == 2;
921 }
922
923 return false;
924 }
925
927 {
928 switch (pCurrentSeat)
929 {
930 case 0:
931 return pDoorsSelection == "DoorsDriver";
932 case 1:
933 return pDoorsSelection == "DoorsCoDriver";
934 case 2:
935 return pDoorsSelection == "DoorsCargo1";
936 case 3:
937 return pDoorsSelection == "DoorsCargo2";
938 }
939
940 return false;
941 }
942
944 {
945 return false;
946 }
947
949 {
950 return false;
951 }
952
954 {
956 SpawnAdditionalItems();
957 FillUpCarFluids();
958
964
971
972
975 }
976}
977
978
980{
982 {
984 SpawnAdditionalItems();
985 FillUpCarFluids();
986
987 GetInventory().CreateInInventory("Offroad_02_Wheel");
988 GetInventory().CreateInInventory("Offroad_02_Wheel");
989 GetInventory().CreateInInventory("Offroad_02_Wheel");
990 GetInventory().CreateInInventory("Offroad_02_Wheel");
991
992 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
993 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
994 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
995 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
996 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
997 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
998
999
1000 GetInventory().CreateInInventory("Offroad_02_Wheel");
1001 GetInventory().CreateInInventory("Offroad_02_Wheel");
1002 }
1003}
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.