520{
524
526 {
527
528
535
536 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
537 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
538
541
545 });
549 });
550
553
555
557 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
558 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
559 }
560
562 {
566 }
567
569 {
570 super.EEInit();
571
573 {
580
583 }
584 }
585
587 {
588 return true;
589 }
590
592 {
593 return true;
594 }
595
597 {
598 super.GetElectricitySourceDevice();
599
601 }
602
604 {
605 return "CarBattery";
606 }
607
609 {
610 super.OnEngineStart();
611
613 {
616 }
617 }
618
620 {
621 super.OnEngineStop();
622
624 {
627 }
628 }
629
631 {
633 {
635 {
637 }
638 }
639 }
640
642 {
644 }
645
647 {
648 return 5.1;
649 }
650
652 {
653 return 1.5;
654 }
655
657 {
658 switch (posIdx)
659 {
660 case 0:
662 case 1:
664 case 2:
666 case 3:
668 }
669
670 return 0;
671 }
672
674 {
675 if (!super.CanReleaseAttachment(attachment))
676 {
677 return false;
678 }
679
680 string attType = attachment.GetType();
681 switch (attType)
682 {
683 case "CarBattery":
685 {
686 return false;
687 }
688 break;
689
690 case "GlowPlug":
692 {
693 return false;
694 }
695 break;
696 }
697
698 return true;
699 }
700
702 {
704 }
705
707 {
708 if ( !super.CanDisplayAttachmentCategory(category_name))
709 {
710 return false;
711 }
712
714 if (category_name.
Contains(
"engine"))
715 {
717 {
718 return false;
719 }
720 }
721
722 return true;
723 }
724
726 {
727 if ( !super.CanDisplayCargo() )
728 return false;
729
731 return false;
732
733 return true;
734 }
735
737 {
739
740 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
741 if (!carDoor)
742 {
744 }
745
746 switch (slotType)
747 {
748 case "Offroad_02_Door_1_1":
749 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
750
751 case "Offroad_02_Door_2_1":
752 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
753
754 case "Offroad_02_Door_1_2":
755 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
756
757 case "Offroad_02_Door_2_2":
758 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
759
760 case "Offroad_02_Hood":
761 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
762
763 case "Offroad_02_Trunk":
764 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
765 }
766
768 }
769
770
772 {
773 switch( posIdx )
774 {
775 case 0:
777 return false;
778
779 return true;
780 break;
781
782 case 1:
784 return false;
785
786 return true;
787 break;
788
789 case 2:
791 return false;
792
793 return true;
794 break;
795
796 case 3:
798 return false;
799
800 return true;
801 break;
802 }
803
804 return false;
805 }
806
808 {
809 switch( posIdx )
810 {
811 case 0:
812 return "doors_driver";
813 break;
814 case 1:
815 return "doors_codriver";
816 break;
817 case 2:
818 return "doors_cargo1";
819 break;
820 case 3:
821 return "doors_cargo2";
822 break;
823 }
824
825 return super.GetDoorSelectionNameFromSeatPos(posIdx);
826 }
827
829 {
830 switch (posIdx)
831 {
832 case 0:
833 return "Offroad_02_Door_1_1";
834 case 1:
835 return "Offroad_02_Door_2_1";
836 case 2:
837 return "Offroad_02_Door_1_2";
838 case 3:
839 return "Offroad_02_Door_2_2";
840 }
841
842 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
843 }
844
846 {
847 switch ( ctrl )
848 {
850 float newValue = 0;
852 {
853 newValue += 0.25;
854 }
855
857 {
858 newValue += 0.25;
859 }
860
862 {
863 newValue += 0.25;
864 }
865
867 {
868 newValue += 0.25;
869 }
870
872 break;
873 }
874
875 return super.OnSound(ctrl, oldValue);
876 }
877
879 {
880 switch (selection)
881 {
882 case "doors_driver":
883 return "DoorsDriver";
884 case "doors_codriver":
885 return "DoorsCoDriver";
886 case "doors_cargo1":
887 return "DoorsCargo1";
888 case "doors_cargo2":
889 return "DoorsCargo2";
890 case "doors_hood":
891 return "DoorsHood";
892 case "doors_trunk":
893 return "DoorsTrunk";
894 }
895
896 return "";
897 }
898
900 {
901 switch (currentSeat)
902 {
903 case 0:
904 return nextSeat == 1;
905 case 1:
906 return nextSeat == 0;
907 case 2:
908 return nextSeat == 3;
909 case 3:
910 return nextSeat == 2;
911 }
912
913 return false;
914 }
915
917 {
918 switch (pCurrentSeat)
919 {
920 case 0:
921 return pDoorsSelection == "DoorsDriver";
922 case 1:
923 return pDoorsSelection == "DoorsCoDriver";
924 case 2:
925 return pDoorsSelection == "DoorsCargo1";
926 case 3:
927 return pDoorsSelection == "DoorsCargo2";
928 }
929
930 return false;
931 }
932
934 {
935 return false;
936 }
937
939 {
940 return false;
941 }
942
944 {
946 SpawnAdditionalItems();
947 FillUpCarFluids();
948
954
961
962
965 }
966}
967
968
970{
972 {
974 SpawnAdditionalItems();
975 FillUpCarFluids();
976
977 GetInventory().CreateInInventory("Offroad_02_Wheel");
978 GetInventory().CreateInInventory("Offroad_02_Wheel");
979 GetInventory().CreateInInventory("Offroad_02_Wheel");
980 GetInventory().CreateInInventory("Offroad_02_Wheel");
981
982 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
983 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
984 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
985 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
986 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
987 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
988
989
990 GetInventory().CreateInInventory("Offroad_02_Wheel");
991 GetInventory().CreateInInventory("Offroad_02_Wheel");
992 }
993}
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.