522{
526
528 {
529
530
537
538 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
539 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
540
543
546
548
550 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
551 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
552 }
553
555 {
559 }
560
562 {
563 super.EEInit();
564
566 {
573
576 }
577 }
578
580 {
581 return true;
582 }
583
585 {
586 super.GetElectricitySourceDevice();
587
589 }
590
592 {
593 return "CarBattery";
594 }
595
597 {
598 super.OnEngineStart();
599
601 {
604 }
605 }
606
608 {
609 super.OnEngineStop();
610
612 {
615 }
616 }
617
619 {
621 {
623 {
625 }
626 }
627 }
628
630 {
632 }
633
635 {
636 return 4.5;
637 }
638
640 {
641 switch (posIdx)
642 {
643 case 0:
645 case 1:
647 case 2:
649 case 3:
651 }
652
653 return 0;
654 }
655
657 {
658 if( !super.CanReleaseAttachment( attachment ) )
659 return false;
660
661 string attType = attachment.GetType();
662
664 {
665 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
666 return false;
667 }
668
669 return true;
670 }
671
673 {
675 }
676
678 {
679
680 if (!super.CanDisplayAttachmentCategory(category_name))
681 return false;
682
683
685 if (category_name.
Contains(
"engine"))
686 {
688 return false;
689 }
690
691 return true;
692 }
693
695 {
696 if ( !super.CanDisplayCargo() )
697 return false;
698
700 return false;
701
702 return true;
703 }
704
706 {
708
709 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
710 if (!carDoor)
711 {
713 }
714
715 switch (slotType)
716 {
717 case "CivSedanDriverDoors":
718 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
719 break;
720
721 case "CivSedanCoDriverDoors":
722 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
723 break;
724
725 case "CivSedanCargo1Doors":
726 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
727 break;
728
729 case "CivSedanCargo2Doors":
730 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
731 break;
732
733 case "CivSedanTrunk":
734 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
735 break;
736
737 case "CivSedanHood":
738 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
739 break;
740 }
741
743 }
744
745
747 {
748 switch( posIdx )
749 {
750 case 0:
752 return false;
753
754 return true;
755 break;
756
757 case 1:
759 return false;
760
761 return true;
762 break;
763
764 case 2:
766 return false;
767
768 return true;
769 break;
770
771 case 3:
773 return false;
774
775 return true;
776 break;
777 }
778
779 return false;
780 }
781
783 {
784 switch( posIdx )
785 {
786 case 0:
787 return "doors_driver";
788 break;
789 case 1:
790 return "doors_codriver";
791 break;
792 case 2:
793 return "doors_cargo1";
794 break;
795 case 3:
796 return "doors_cargo2";
797 break;
798 }
799
800 return super.GetDoorSelectionNameFromSeatPos(posIdx);
801 }
802
804 {
805 switch( posIdx )
806 {
807 case 0:
808 return "CivSedanDriverDoors";
809 break;
810 case 1:
811 return "CivSedanCoDriverDoors";
812 break;
813 case 2:
814 return "CivSedanCargo1Doors";
815 break;
816 case 3:
817 return "CivSedanCargo2Doors";
818 break;
819 }
820
821 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
822 }
823
824
825
827 {
828 switch (ctrl)
829 {
831 float newValue = 0;
833 {
834 newValue += 0.25;
835 }
836
838 {
839 newValue += 0.25;
840 }
841
843 {
844 newValue += 0.25;
845 }
846
848 {
849 newValue += 0.25;
850 }
851
853 {
854 newValue -= 0.6;
855 }
856
858 {
859 newValue -= 0.6;
860 }
861
863 break;
864 }
865
866 return super.OnSound(ctrl, oldValue);
867 }
868
870 {
871 switch (selection)
872 {
873 case "doors_driver":
874 return "DoorsDriver";
875 case "doors_codriver":
876 return "DoorsCoDriver";
877 case "doors_cargo1":
878 return "DoorsCargo1";
879 case "doors_cargo2":
880 return "DoorsCargo2";
881 case "doors_hood":
882 return "DoorsHood";
883 case "doors_trunk":
884 return "DoorsTrunk";
885 }
886
887 return "";
888 }
889
891 {
892 return false;
893 }
894
896 {
897 switch (currentSeat)
898 {
899 case 0:
900 return nextSeat == 1;
901
902 case 1:
903 return nextSeat == 0;
904
905 case 2:
906 return nextSeat == 3;
907
908 case 3:
909 return nextSeat == 2;
910 }
911
912 return false;
913 }
914
916 {
917 switch (pCurrentSeat)
918 {
919 case 0:
920 return pDoorsSelection == "DoorsDriver";
921
922 case 1:
923 return pDoorsSelection == "DoorsCoDriver";
924
925 case 2:
926 return pDoorsSelection == "DoorsCargo1";
927
928 case 3:
929 return pDoorsSelection == "DoorsCargo2";
930 }
931
932 return false;
933 }
934
936 {
938 SpawnAdditionalItems();
939 FillUpCarFluids();
940
946
953
954
957 }
958
960 {
961 return 1.5;
962 }
963}
964
966{
968 {
970 SpawnAdditionalItems();
971 FillUpCarFluids();
972
973 GameInventory inventory = GetInventory();
978
985
986
989 }
990}
991
993{
995 {
997 SpawnAdditionalItems();
998 FillUpCarFluids();
999
1000 GameInventory inventory = GetInventory();
1005
1012
1013
1016 }
1017}
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.