505{
509
511 {
512
513
520
521 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
522 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
523
526
529
531
533 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
534 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
535 }
536
538 {
542 }
543
545 {
546 super.EEInit();
547
549 {
556
559 }
560 }
561
563 {
564 return true;
565 }
566
568 {
569 super.GetElectricitySourceDevice();
570
572 }
573
575 {
576 return "CarBattery";
577 }
578
580 {
581 super.OnEngineStart();
582
584 {
587 }
588 }
589
591 {
592 super.OnEngineStop();
593
595 {
598 }
599 }
600
602 {
604 {
606 {
608 }
609 }
610 }
611
613 {
615 }
616
618 {
619 return 4.5;
620 }
621
623 {
624 switch (posIdx)
625 {
626 case 0:
628 case 1:
630 case 2:
632 case 3:
634 }
635
636 return 0;
637 }
638
640 {
641 if( !super.CanReleaseAttachment( attachment ) )
642 return false;
643
644 string attType = attachment.GetType();
645
647 {
648 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
649 return false;
650 }
651
652 return true;
653 }
654
656 {
658 }
659
661 {
662
663 if (!super.CanDisplayAttachmentCategory(category_name))
664 return false;
665
666
668 if (category_name.
Contains(
"engine"))
669 {
671 return false;
672 }
673
674 return true;
675 }
676
678 {
679 if ( !super.CanDisplayCargo() )
680 return false;
681
683 return false;
684
685 return true;
686 }
687
689 {
691
692 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
693 if (!carDoor)
694 {
696 }
697
698 switch (slotType)
699 {
700 case "CivSedanDriverDoors":
701 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
702 break;
703
704 case "CivSedanCoDriverDoors":
705 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
706 break;
707
708 case "CivSedanCargo1Doors":
709 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
710 break;
711
712 case "CivSedanCargo2Doors":
713 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
714 break;
715
716 case "CivSedanTrunk":
717 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
718 break;
719
720 case "CivSedanHood":
721 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
722 break;
723 }
724
726 }
727
728
730 {
731 switch( posIdx )
732 {
733 case 0:
735 return false;
736
737 return true;
738 break;
739
740 case 1:
742 return false;
743
744 return true;
745 break;
746
747 case 2:
749 return false;
750
751 return true;
752 break;
753
754 case 3:
756 return false;
757
758 return true;
759 break;
760 }
761
762 return false;
763 }
764
766 {
767 switch( posIdx )
768 {
769 case 0:
770 return "doors_driver";
771 break;
772 case 1:
773 return "doors_codriver";
774 break;
775 case 2:
776 return "doors_cargo1";
777 break;
778 case 3:
779 return "doors_cargo2";
780 break;
781 }
782
783 return super.GetDoorSelectionNameFromSeatPos(posIdx);
784 }
785
787 {
788 switch( posIdx )
789 {
790 case 0:
791 return "CivSedanDriverDoors";
792 break;
793 case 1:
794 return "CivSedanCoDriverDoors";
795 break;
796 case 2:
797 return "CivSedanCargo1Doors";
798 break;
799 case 3:
800 return "CivSedanCargo2Doors";
801 break;
802 }
803
804 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
805 }
806
807
808
810 {
811 switch (ctrl)
812 {
814 float newValue = 0;
816 {
817 newValue += 0.25;
818 }
819
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.6;
838 }
839
841 {
842 newValue -= 0.6;
843 }
844
846 break;
847 }
848
849 return super.OnSound(ctrl, oldValue);
850 }
851
853 {
854 switch (selection)
855 {
856 case "doors_driver":
857 return "DoorsDriver";
858 case "doors_codriver":
859 return "DoorsCoDriver";
860 case "doors_cargo1":
861 return "DoorsCargo1";
862 case "doors_cargo2":
863 return "DoorsCargo2";
864 case "doors_hood":
865 return "DoorsHood";
866 case "doors_trunk":
867 return "DoorsTrunk";
868 }
869
870 return "";
871 }
872
874 {
875 return false;
876 }
877
879 {
880 switch (currentSeat)
881 {
882 case 0:
883 return nextSeat == 1;
884
885 case 1:
886 return nextSeat == 0;
887
888 case 2:
889 return nextSeat == 3;
890
891 case 3:
892 return nextSeat == 2;
893 }
894
895 return false;
896 }
897
899 {
900 switch (pCurrentSeat)
901 {
902 case 0:
903 return pDoorsSelection == "DoorsDriver";
904
905 case 1:
906 return pDoorsSelection == "DoorsCoDriver";
907
908 case 2:
909 return pDoorsSelection == "DoorsCargo1";
910
911 case 3:
912 return pDoorsSelection == "DoorsCargo2";
913 }
914
915 return false;
916 }
917
919 {
921 SpawnAdditionalItems();
922 FillUpCarFluids();
923
929
936
937
940 }
941
943 {
944 return 1.5;
945 }
946}
947
949{
951 {
953 SpawnAdditionalItems();
954 FillUpCarFluids();
955
956 GameInventory inventory = GetInventory();
961
968
969
972 }
973}
974
976{
978 {
980 SpawnAdditionalItems();
981 FillUpCarFluids();
982
983 GameInventory inventory = GetInventory();
988
995
996
999 }
1000}
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.