537{
541
543 {
544
545
552
553 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
554 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
555
558
562 });
566 });
567
570
572
574 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
575 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
576 }
577
579 {
583 }
584
586 {
587 super.EEInit();
588
590 {
597
600 }
601 }
602
604 {
605 return true;
606 }
607
609 {
610 return true;
611 }
612
614 {
615 super.GetElectricitySourceDevice();
616
618 }
619
621 {
622 return "CarBattery";
623 }
624
626 {
627 super.OnEngineStart();
628
630 {
633 }
634 }
635
637 {
638 super.OnEngineStop();
639
641 {
644 }
645 }
646
648 {
650 {
652 {
654 }
655 }
656 }
657
659 {
661 }
662
664 {
665 return 5.1;
666 }
667
669 {
670 return 1.5;
671 }
672
674 {
675 switch (posIdx)
676 {
677 case 0:
679 case 1:
681 case 2:
683 case 3:
685 }
686
687 return 0;
688 }
689
691 {
692 if (!super.CanReleaseAttachment(attachment))
693 {
694 return false;
695 }
696
697 string attType = attachment.GetType();
698 switch (attType)
699 {
700 case "CarBattery":
702 {
703 return false;
704 }
705 break;
706
707 case "GlowPlug":
709 {
710 return false;
711 }
712 break;
713 }
714
715 return true;
716 }
717
719 {
721 }
722
724 {
725 if ( !super.CanDisplayAttachmentCategory(category_name))
726 {
727 return false;
728 }
729
731 if (category_name.
Contains(
"engine"))
732 {
734 {
735 return false;
736 }
737 }
738
739 return true;
740 }
741
743 {
744 if ( !super.CanDisplayCargo() )
745 return false;
746
748 return false;
749
750 return true;
751 }
752
754 {
756
757 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
758 if (!carDoor)
759 {
761 }
762
763 switch (slotType)
764 {
765 case "Offroad_02_Door_1_1":
766 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
767
768 case "Offroad_02_Door_2_1":
769 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
770
771 case "Offroad_02_Door_1_2":
772 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
773
774 case "Offroad_02_Door_2_2":
775 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
776
777 case "Offroad_02_Hood":
778 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
779
780 case "Offroad_02_Trunk":
781 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
782 }
783
785 }
786
787
789 {
790 switch( posIdx )
791 {
792 case 0:
794 return false;
795
796 return true;
797 break;
798
799 case 1:
801 return false;
802
803 return true;
804 break;
805
806 case 2:
808 return false;
809
810 return true;
811 break;
812
813 case 3:
815 return false;
816
817 return true;
818 break;
819 }
820
821 return false;
822 }
823
825 {
826 switch( posIdx )
827 {
828 case 0:
829 return "doors_driver";
830 break;
831 case 1:
832 return "doors_codriver";
833 break;
834 case 2:
835 return "doors_cargo1";
836 break;
837 case 3:
838 return "doors_cargo2";
839 break;
840 }
841
842 return super.GetDoorSelectionNameFromSeatPos(posIdx);
843 }
844
846 {
847 switch (posIdx)
848 {
849 case 0:
850 return "Offroad_02_Door_1_1";
851 case 1:
852 return "Offroad_02_Door_2_1";
853 case 2:
854 return "Offroad_02_Door_1_2";
855 case 3:
856 return "Offroad_02_Door_2_2";
857 }
858
859 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
860 }
861
863 {
864 switch ( ctrl )
865 {
867 float newValue = 0;
869 {
870 newValue += 0.25;
871 }
872
874 {
875 newValue += 0.25;
876 }
877
879 {
880 newValue += 0.25;
881 }
882
884 {
885 newValue += 0.25;
886 }
887
889 break;
890 }
891
892 return super.OnSound(ctrl, oldValue);
893 }
894
896 {
897 switch (selection)
898 {
899 case "doors_driver":
900 return "DoorsDriver";
901 case "doors_codriver":
902 return "DoorsCoDriver";
903 case "doors_cargo1":
904 return "DoorsCargo1";
905 case "doors_cargo2":
906 return "DoorsCargo2";
907 case "doors_hood":
908 return "DoorsHood";
909 case "doors_trunk":
910 return "DoorsTrunk";
911 }
912
913 return "";
914 }
915
917 {
918 switch (currentSeat)
919 {
920 case 0:
921 return nextSeat == 1;
922 case 1:
923 return nextSeat == 0;
924 case 2:
925 return nextSeat == 3;
926 case 3:
927 return nextSeat == 2;
928 }
929
930 return false;
931 }
932
934 {
935 switch (pCurrentSeat)
936 {
937 case 0:
938 return pDoorsSelection == "DoorsDriver";
939 case 1:
940 return pDoorsSelection == "DoorsCoDriver";
941 case 2:
942 return pDoorsSelection == "DoorsCargo1";
943 case 3:
944 return pDoorsSelection == "DoorsCargo2";
945 }
946
947 return false;
948 }
949
951 {
952 return false;
953 }
954
956 {
957 return false;
958 }
959
961 {
963 SpawnAdditionalItems();
964 FillUpCarFluids();
965
971
978
979
982 }
983}
984
985
987{
989 {
991 SpawnAdditionalItems();
992 FillUpCarFluids();
993
994 GetInventory().CreateInInventory("Offroad_02_Wheel");
995 GetInventory().CreateInInventory("Offroad_02_Wheel");
996 GetInventory().CreateInInventory("Offroad_02_Wheel");
997 GetInventory().CreateInInventory("Offroad_02_Wheel");
998
999 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1000 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1001 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1002 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1003 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1004 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1005
1006
1007 GetInventory().CreateInInventory("Offroad_02_Wheel");
1008 GetInventory().CreateInInventory("Offroad_02_Wheel");
1009 }
1010}
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.