510{
514
516 {
517
518
525
526 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
527 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
528
531
534
536
538 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
539 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
540 }
541
543 {
547 }
548
550 {
551 super.EEInit();
552
554 {
561
564 }
565 }
566
568 {
569 return true;
570 }
571
573 {
574 super.GetElectricitySourceDevice();
575
577 }
578
580 {
581 return "CarBattery";
582 }
583
585 {
586 super.OnEngineStart();
587
589 {
592 }
593 }
594
596 {
597 super.OnEngineStop();
598
600 {
603 }
604 }
605
607 {
609 {
611 {
613 }
614 }
615 }
616
618 {
620 }
621
623 {
624 return 4.5;
625 }
626
628 {
629 switch (posIdx)
630 {
631 case 0:
633 case 1:
635 case 2:
637 case 3:
639 }
640
641 return 0;
642 }
643
645 {
646 if( !super.CanReleaseAttachment( attachment ) )
647 return false;
648
649 string attType = attachment.GetType();
650
652 {
653 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
654 return false;
655 }
656
657 return true;
658 }
659
661 {
663 }
664
666 {
667
668 if (!super.CanDisplayAttachmentCategory(category_name))
669 return false;
670
671
673 if (category_name.
Contains(
"engine"))
674 {
676 return false;
677 }
678
679 return true;
680 }
681
683 {
684 if ( !super.CanDisplayCargo() )
685 return false;
686
688 return false;
689
690 return true;
691 }
692
694 {
696
697 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
698 if (!carDoor)
699 {
701 }
702
703 switch (slotType)
704 {
705 case "CivSedanDriverDoors":
706 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
707 break;
708
709 case "CivSedanCoDriverDoors":
710 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
711 break;
712
713 case "CivSedanCargo1Doors":
714 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
715 break;
716
717 case "CivSedanCargo2Doors":
718 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
719 break;
720
721 case "CivSedanTrunk":
722 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
723 break;
724
725 case "CivSedanHood":
726 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
727 break;
728 }
729
731 }
732
733
735 {
736 switch( posIdx )
737 {
738 case 0:
740 return false;
741
742 return true;
743 break;
744
745 case 1:
747 return false;
748
749 return true;
750 break;
751
752 case 2:
754 return false;
755
756 return true;
757 break;
758
759 case 3:
761 return false;
762
763 return true;
764 break;
765 }
766
767 return false;
768 }
769
771 {
772 switch( posIdx )
773 {
774 case 0:
775 return "doors_driver";
776 break;
777 case 1:
778 return "doors_codriver";
779 break;
780 case 2:
781 return "doors_cargo1";
782 break;
783 case 3:
784 return "doors_cargo2";
785 break;
786 }
787
788 return super.GetDoorSelectionNameFromSeatPos(posIdx);
789 }
790
792 {
793 switch( posIdx )
794 {
795 case 0:
796 return "CivSedanDriverDoors";
797 break;
798 case 1:
799 return "CivSedanCoDriverDoors";
800 break;
801 case 2:
802 return "CivSedanCargo1Doors";
803 break;
804 case 3:
805 return "CivSedanCargo2Doors";
806 break;
807 }
808
809 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
810 }
811
812
813
815 {
816 switch (ctrl)
817 {
819 float newValue = 0;
821 {
822 newValue += 0.25;
823 }
824
826 {
827 newValue += 0.25;
828 }
829
831 {
832 newValue += 0.25;
833 }
834
836 {
837 newValue += 0.25;
838 }
839
841 {
842 newValue -= 0.6;
843 }
844
846 {
847 newValue -= 0.6;
848 }
849
851 break;
852 }
853
854 return super.OnSound(ctrl, oldValue);
855 }
856
858 {
859 switch (selection)
860 {
861 case "doors_driver":
862 return "DoorsDriver";
863 case "doors_codriver":
864 return "DoorsCoDriver";
865 case "doors_cargo1":
866 return "DoorsCargo1";
867 case "doors_cargo2":
868 return "DoorsCargo2";
869 case "doors_hood":
870 return "DoorsHood";
871 case "doors_trunk":
872 return "DoorsTrunk";
873 }
874
875 return "";
876 }
877
879 {
880 return false;
881 }
882
884 {
885 switch (currentSeat)
886 {
887 case 0:
888 return nextSeat == 1;
889
890 case 1:
891 return nextSeat == 0;
892
893 case 2:
894 return nextSeat == 3;
895
896 case 3:
897 return nextSeat == 2;
898 }
899
900 return false;
901 }
902
904 {
905 switch (pCurrentSeat)
906 {
907 case 0:
908 return pDoorsSelection == "DoorsDriver";
909
910 case 1:
911 return pDoorsSelection == "DoorsCoDriver";
912
913 case 2:
914 return pDoorsSelection == "DoorsCargo1";
915
916 case 3:
917 return pDoorsSelection == "DoorsCargo2";
918 }
919
920 return false;
921 }
922
924 {
926 SpawnAdditionalItems();
927 FillUpCarFluids();
928
934
941
942
945 }
946
948 {
949 return 1.5;
950 }
951}
952
954{
956 {
958 SpawnAdditionalItems();
959 FillUpCarFluids();
960
961 GameInventory inventory = GetInventory();
966
973
974
977 }
978}
979
981{
983 {
985 SpawnAdditionalItems();
986 FillUpCarFluids();
987
988 GameInventory inventory = GetInventory();
993
1000
1001
1004 }
1005}
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.