542{
546
548 {
549
550
557
558 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
559 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
560
563
567 });
571 });
572
575
577
579 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
580 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
581 }
582
584 {
588 }
589
591 {
592 super.EEInit();
593
595 {
602
605 }
606 }
607
609 {
610 return true;
611 }
612
614 {
615 return true;
616 }
617
619 {
620 super.GetElectricitySourceDevice();
621
623 }
624
626 {
627 return "CarBattery";
628 }
629
631 {
632 super.OnEngineStart();
633
635 {
638 }
639 }
640
642 {
643 super.OnEngineStop();
644
646 {
649 }
650 }
651
653 {
655 {
657 {
659 }
660 }
661 }
662
664 {
666 }
667
669 {
670 return 5.1;
671 }
672
674 {
675 return 1.5;
676 }
677
679 {
680 switch (posIdx)
681 {
682 case 0:
684 case 1:
686 case 2:
688 case 3:
690 }
691
692 return 0;
693 }
694
696 {
697 if (!super.CanReleaseAttachment(attachment))
698 {
699 return false;
700 }
701
702 string attType = attachment.GetType();
703 switch (attType)
704 {
705 case "CarBattery":
707 {
708 return false;
709 }
710 break;
711
712 case "GlowPlug":
714 {
715 return false;
716 }
717 break;
718 }
719
720 return true;
721 }
722
724 {
726 }
727
729 {
730 if ( !super.CanDisplayAttachmentCategory(category_name))
731 {
732 return false;
733 }
734
736 if (category_name.
Contains(
"engine"))
737 {
739 {
740 return false;
741 }
742 }
743
744 return true;
745 }
746
748 {
749 if ( !super.CanDisplayCargo() )
750 return false;
751
753 return false;
754
755 return true;
756 }
757
759 {
761
762 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
763 if (!carDoor)
764 {
766 }
767
768 switch (slotType)
769 {
770 case "Offroad_02_Door_1_1":
771 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
772
773 case "Offroad_02_Door_2_1":
774 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
775
776 case "Offroad_02_Door_1_2":
777 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
778
779 case "Offroad_02_Door_2_2":
780 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
781
782 case "Offroad_02_Hood":
783 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
784
785 case "Offroad_02_Trunk":
786 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
787 }
788
790 }
791
792
794 {
795 switch( posIdx )
796 {
797 case 0:
799 return false;
800
801 return true;
802 break;
803
804 case 1:
806 return false;
807
808 return true;
809 break;
810
811 case 2:
813 return false;
814
815 return true;
816 break;
817
818 case 3:
820 return false;
821
822 return true;
823 break;
824 }
825
826 return false;
827 }
828
830 {
831 switch( posIdx )
832 {
833 case 0:
834 return "doors_driver";
835 break;
836 case 1:
837 return "doors_codriver";
838 break;
839 case 2:
840 return "doors_cargo1";
841 break;
842 case 3:
843 return "doors_cargo2";
844 break;
845 }
846
847 return super.GetDoorSelectionNameFromSeatPos(posIdx);
848 }
849
851 {
852 switch (posIdx)
853 {
854 case 0:
855 return "Offroad_02_Door_1_1";
856 case 1:
857 return "Offroad_02_Door_2_1";
858 case 2:
859 return "Offroad_02_Door_1_2";
860 case 3:
861 return "Offroad_02_Door_2_2";
862 }
863
864 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
865 }
866
868 {
869 switch ( ctrl )
870 {
872 float newValue = 0;
874 {
875 newValue += 0.25;
876 }
877
879 {
880 newValue += 0.25;
881 }
882
884 {
885 newValue += 0.25;
886 }
887
889 {
890 newValue += 0.25;
891 }
892
894 break;
895 }
896
897 return super.OnSound(ctrl, oldValue);
898 }
899
901 {
902 switch (selection)
903 {
904 case "doors_driver":
905 return "DoorsDriver";
906 case "doors_codriver":
907 return "DoorsCoDriver";
908 case "doors_cargo1":
909 return "DoorsCargo1";
910 case "doors_cargo2":
911 return "DoorsCargo2";
912 case "doors_hood":
913 return "DoorsHood";
914 case "doors_trunk":
915 return "DoorsTrunk";
916 }
917
918 return "";
919 }
920
922 {
923 switch (currentSeat)
924 {
925 case 0:
926 return nextSeat == 1;
927 case 1:
928 return nextSeat == 0;
929 case 2:
930 return nextSeat == 3;
931 case 3:
932 return nextSeat == 2;
933 }
934
935 return false;
936 }
937
939 {
940 switch (pCurrentSeat)
941 {
942 case 0:
943 return pDoorsSelection == "DoorsDriver";
944 case 1:
945 return pDoorsSelection == "DoorsCoDriver";
946 case 2:
947 return pDoorsSelection == "DoorsCargo1";
948 case 3:
949 return pDoorsSelection == "DoorsCargo2";
950 }
951
952 return false;
953 }
954
956 {
957 return false;
958 }
959
961 {
962 return false;
963 }
964
966 {
968 SpawnAdditionalItems();
969 FillUpCarFluids();
970
976
983
984
987 }
988}
989
990
992{
994 {
996 SpawnAdditionalItems();
997 FillUpCarFluids();
998
999 GetInventory().CreateInInventory("Offroad_02_Wheel");
1000 GetInventory().CreateInInventory("Offroad_02_Wheel");
1001 GetInventory().CreateInInventory("Offroad_02_Wheel");
1002 GetInventory().CreateInInventory("Offroad_02_Wheel");
1003
1004 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
1005 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
1006 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
1007 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
1008 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
1009 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
1010
1011
1012 GetInventory().CreateInInventory("Offroad_02_Wheel");
1013 GetInventory().CreateInInventory("Offroad_02_Wheel");
1014 }
1015}
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.