544{
548
550 {
551
552
559
560 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
561 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
562
565
568
570
572 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
573 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
574 }
575
577 {
581 }
582
584 {
585 super.EEInit();
586
588 {
595
598 }
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 4.5;
659 }
660
662 {
663 switch (posIdx)
664 {
665 case 0:
667 case 1:
669 case 2:
671 case 3:
673 }
674
675 return 0;
676 }
677
679 {
680 if( !super.CanReleaseAttachment( attachment ) )
681 return false;
682
683 string attType = attachment.GetType();
684
686 {
687 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
688 return false;
689 }
690
691 return true;
692 }
693
695 {
697 }
698
700 {
701
702 if (!super.CanDisplayAttachmentCategory(category_name))
703 return false;
704
705
707 if (category_name.
Contains(
"engine"))
708 {
710 return false;
711 }
712
713 return true;
714 }
715
717 {
718 if ( !super.CanDisplayCargo() )
719 return false;
720
722 return false;
723
724 return true;
725 }
726
728 {
730
731 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
732 if (!carDoor)
733 {
735 }
736
737 switch (slotType)
738 {
739 case "CivSedanDriverDoors":
740 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
741 break;
742
743 case "CivSedanCoDriverDoors":
744 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
745 break;
746
747 case "CivSedanCargo1Doors":
748 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
749 break;
750
751 case "CivSedanCargo2Doors":
752 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
753 break;
754
755 case "CivSedanTrunk":
756 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
757 break;
758
759 case "CivSedanHood":
760 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
761 break;
762 }
763
765 }
766
767
769 {
770 switch( posIdx )
771 {
772 case 0:
774 return false;
775
776 return true;
777 break;
778
779 case 1:
781 return false;
782
783 return true;
784 break;
785
786 case 2:
788 return false;
789
790 return true;
791 break;
792
793 case 3:
795 return false;
796
797 return true;
798 break;
799 }
800
801 return false;
802 }
803
805 {
806 switch( posIdx )
807 {
808 case 0:
809 return "doors_driver";
810 break;
811 case 1:
812 return "doors_codriver";
813 break;
814 case 2:
815 return "doors_cargo1";
816 break;
817 case 3:
818 return "doors_cargo2";
819 break;
820 }
821
822 return super.GetDoorSelectionNameFromSeatPos(posIdx);
823 }
824
826 {
827 switch( posIdx )
828 {
829 case 0:
830 return "CivSedanDriverDoors";
831 break;
832 case 1:
833 return "CivSedanCoDriverDoors";
834 break;
835 case 2:
836 return "CivSedanCargo1Doors";
837 break;
838 case 3:
839 return "CivSedanCargo2Doors";
840 break;
841 }
842
843 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
844 }
845
846
847
849 {
850 switch (ctrl)
851 {
853 float newValue = 0;
855 {
856 newValue += 0.25;
857 }
858
860 {
861 newValue += 0.25;
862 }
863
865 {
866 newValue += 0.25;
867 }
868
870 {
871 newValue += 0.25;
872 }
873
875 {
876 newValue -= 0.6;
877 }
878
880 {
881 newValue -= 0.6;
882 }
883
885 break;
886 }
887
888 return super.OnSound(ctrl, oldValue);
889 }
890
892 {
893 switch (selection)
894 {
895 case "doors_driver":
896 return "DoorsDriver";
897 case "doors_codriver":
898 return "DoorsCoDriver";
899 case "doors_cargo1":
900 return "DoorsCargo1";
901 case "doors_cargo2":
902 return "DoorsCargo2";
903 case "doors_hood":
904 return "DoorsHood";
905 case "doors_trunk":
906 return "DoorsTrunk";
907 }
908
909 return "";
910 }
911
913 {
914 return false;
915 }
916
918 {
919 switch (currentSeat)
920 {
921 case 0:
922 return nextSeat == 1;
923
924 case 1:
925 return nextSeat == 0;
926
927 case 2:
928 return nextSeat == 3;
929
930 case 3:
931 return nextSeat == 2;
932 }
933
934 return false;
935 }
936
938 {
939 switch (pCurrentSeat)
940 {
941 case 0:
942 return pDoorsSelection == "DoorsDriver";
943
944 case 1:
945 return pDoorsSelection == "DoorsCoDriver";
946
947 case 2:
948 return pDoorsSelection == "DoorsCargo1";
949
950 case 3:
951 return pDoorsSelection == "DoorsCargo2";
952 }
953
954 return false;
955 }
956
958 {
960 SpawnAdditionalItems();
961 FillUpCarFluids();
962
968
975
976
979 }
980
982 {
983 return 1.5;
984 }
985}
986
988{
990 {
992 SpawnAdditionalItems();
993 FillUpCarFluids();
994
995 GameInventory inventory = GetInventory();
1000
1007
1008
1011 }
1012}
1013
1015{
1017 {
1019 SpawnAdditionalItems();
1020 FillUpCarFluids();
1021
1022 GameInventory inventory = GetInventory();
1027
1034
1035
1038 }
1039}
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
void CivilianSedanLightProfileFront()
CivilianSedanLightProfileFront VehicleLightProfileFront CivilianSedanLightProfileRear()
UniversalTemperatureSourceLambdaBaseImpl UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceLambdaEngine()
void VehicleLightData(VehicleLightProfileBase profile)
override float GetPushForceCoefficientMultiplier()
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()
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
override float GetTransportCameraDistance()
override bool CanReleaseAttachment(EntityAI attachment)
override bool CanDisplayCargo()
override EntityAI GetElectricitySourceDevice()
override void OnEngineStart()
override int GetAnimInstance()
override bool CrewCanGetThrough(int posIdx)
override bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
bool CanManipulateSpareWheel(string slotSelectionName)
override bool IsVitalGlowPlug()
override bool NeedElectricitySourceDevice()
override string GetElectricitySourceDeviceType()
override string GetDoorSelectionNameFromSeatPos(int posIdx)
override int GetCarDoorsState(string slotType)
CivilianSedan CarScript OnDebugSpawn()
override bool CanDisplayAttachmentCategory(string category_name)
override void OnDebugSpawn()
override void OnDebugSpawn()
Super root of all classes in Enforce script.
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
script counterpart to engine's class Inventory
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.