495{
499
501 {
502
503
510
511 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
512 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
513
516
520 });
524 });
525
528
530
532 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
533 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
534 }
535
537 {
541 }
542
544 {
545 super.EEInit();
546
548 {
555
558 }
559 }
560
562 {
563 return true;
564 }
565
567 {
568 return true;
569 }
570
572 {
573 super.GetElectricitySourceDevice();
574
576 }
577
579 {
580 return "CarBattery";
581 }
582
584 {
585 super.OnEngineStart();
586
588 {
591 }
592 }
593
595 {
596 super.OnEngineStop();
597
599 {
602 }
603 }
604
606 {
608 {
610 {
612 }
613 }
614 }
615
617 {
619 }
620
622 {
623 return 5.1;
624 }
625
627 {
628 return 1.5;
629 }
630
632 {
633 switch (posIdx)
634 {
635 case 0:
637 case 1:
639 case 2:
641 case 3:
643 }
644
645 return 0;
646 }
647
649 {
650 if (!super.CanReleaseAttachment(attachment))
651 {
652 return false;
653 }
654
655 string attType = attachment.GetType();
656 switch (attType)
657 {
658 case "CarBattery":
660 {
661 return false;
662 }
663 break;
664
665 case "GlowPlug":
667 {
668 return false;
669 }
670 break;
671 }
672
673 return true;
674 }
675
677 {
679 }
680
682 {
683 if ( !super.CanDisplayAttachmentCategory(category_name))
684 {
685 return false;
686 }
687
689 if (category_name.
Contains(
"engine"))
690 {
692 {
693 return false;
694 }
695 }
696
697 return true;
698 }
699
701 {
702 if ( !super.CanDisplayCargo() )
703 return false;
704
706 return false;
707
708 return true;
709 }
710
712 {
714
715 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
716 if (!carDoor)
717 {
719 }
720
721 switch (slotType)
722 {
723 case "Offroad_02_Door_1_1":
724 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
725
726 case "Offroad_02_Door_2_1":
727 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
728
729 case "Offroad_02_Door_1_2":
730 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
731
732 case "Offroad_02_Door_2_2":
733 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
734
735 case "Offroad_02_Hood":
736 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
737
738 case "Offroad_02_Trunk":
739 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
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 "Offroad_02_Door_1_1";
809 case 1:
810 return "Offroad_02_Door_2_1";
811 case 2:
812 return "Offroad_02_Door_1_2";
813 case 3:
814 return "Offroad_02_Door_2_2";
815 }
816
817 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
818 }
819
821 {
822 switch ( ctrl )
823 {
825 float newValue = 0;
827 {
828 newValue += 0.25;
829 }
830
832 {
833 newValue += 0.25;
834 }
835
837 {
838 newValue += 0.25;
839 }
840
842 {
843 newValue += 0.25;
844 }
845
847 break;
848 }
849
850 return super.OnSound(ctrl, oldValue);
851 }
852
854 {
855 switch (selection)
856 {
857 case "doors_driver":
858 return "DoorsDriver";
859 case "doors_codriver":
860 return "DoorsCoDriver";
861 case "doors_cargo1":
862 return "DoorsCargo1";
863 case "doors_cargo2":
864 return "DoorsCargo2";
865 case "doors_hood":
866 return "DoorsHood";
867 case "doors_trunk":
868 return "DoorsTrunk";
869 }
870
871 return "";
872 }
873
875 {
876 switch (currentSeat)
877 {
878 case 0:
879 return nextSeat == 1;
880 case 1:
881 return nextSeat == 0;
882 case 2:
883 return nextSeat == 3;
884 case 3:
885 return nextSeat == 2;
886 }
887
888 return false;
889 }
890
892 {
893 switch (pCurrentSeat)
894 {
895 case 0:
896 return pDoorsSelection == "DoorsDriver";
897 case 1:
898 return pDoorsSelection == "DoorsCoDriver";
899 case 2:
900 return pDoorsSelection == "DoorsCargo1";
901 case 3:
902 return pDoorsSelection == "DoorsCargo2";
903 }
904
905 return false;
906 }
907
909 {
910 return false;
911 }
912
914 {
915 return false;
916 }
917
919 {
921 SpawnAdditionalItems();
922 FillUpCarFluids();
923
929
936
937
940 }
941}
942
943
945{
947 {
949 SpawnAdditionalItems();
950 FillUpCarFluids();
951
952 GetInventory().CreateInInventory("Offroad_02_Wheel");
953 GetInventory().CreateInInventory("Offroad_02_Wheel");
954 GetInventory().CreateInInventory("Offroad_02_Wheel");
955 GetInventory().CreateInInventory("Offroad_02_Wheel");
956
957 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
958 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
959 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
960 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
961 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
962 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
963
964
965 GetInventory().CreateInInventory("Offroad_02_Wheel");
966 GetInventory().CreateInInventory("Offroad_02_Wheel");
967 }
968}
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.