502{
506
508 {
509
510
517
518 m_CarDoorOpenSound = "offroad_02_door_open_SoundSet";
519 m_CarDoorCloseSound = "offroad_02_door_close_SoundSet";
520
523
527 });
531 });
532
535
537
539 m_CarHornShortSoundName = "Offroad_02_Horn_Short_SoundSet";
540 m_CarHornLongSoundName = "Offroad_02_Horn_SoundSet";
541 }
542
544 {
548 }
549
551 {
552 super.EEInit();
553
555 {
562
565 }
566 }
567
569 {
570 return true;
571 }
572
574 {
575 return true;
576 }
577
579 {
580 super.GetElectricitySourceDevice();
581
583 }
584
586 {
587 return "CarBattery";
588 }
589
591 {
592 super.OnEngineStart();
593
595 {
598 }
599 }
600
602 {
603 super.OnEngineStop();
604
606 {
609 }
610 }
611
613 {
615 {
617 {
619 }
620 }
621 }
622
624 {
626 }
627
629 {
630 return 5.1;
631 }
632
634 {
635 return 1.5;
636 }
637
639 {
640 switch (posIdx)
641 {
642 case 0:
644 case 1:
646 case 2:
648 case 3:
650 }
651
652 return 0;
653 }
654
656 {
657 if (!super.CanReleaseAttachment(attachment))
658 {
659 return false;
660 }
661
662 string attType = attachment.GetType();
663 switch (attType)
664 {
665 case "CarBattery":
667 {
668 return false;
669 }
670 break;
671
672 case "GlowPlug":
674 {
675 return false;
676 }
677 break;
678 }
679
680 return true;
681 }
682
684 {
686 }
687
689 {
690 if ( !super.CanDisplayAttachmentCategory(category_name))
691 {
692 return false;
693 }
694
696 if (category_name.
Contains(
"engine"))
697 {
699 {
700 return false;
701 }
702 }
703
704 return true;
705 }
706
708 {
709 if ( !super.CanDisplayCargo() )
710 return false;
711
713 return false;
714
715 return true;
716 }
717
719 {
721
722 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
723 if (!carDoor)
724 {
726 }
727
728 switch (slotType)
729 {
730 case "Offroad_02_Door_1_1":
731 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
732
733 case "Offroad_02_Door_2_1":
734 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
735
736 case "Offroad_02_Door_1_2":
737 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
738
739 case "Offroad_02_Door_2_2":
740 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
741
742 case "Offroad_02_Hood":
743 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
744
745 case "Offroad_02_Trunk":
746 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
747 }
748
750 }
751
752
754 {
755 switch( posIdx )
756 {
757 case 0:
759 return false;
760
761 return true;
762 break;
763
764 case 1:
766 return false;
767
768 return true;
769 break;
770
771 case 2:
773 return false;
774
775 return true;
776 break;
777
778 case 3:
780 return false;
781
782 return true;
783 break;
784 }
785
786 return false;
787 }
788
790 {
791 switch( posIdx )
792 {
793 case 0:
794 return "doors_driver";
795 break;
796 case 1:
797 return "doors_codriver";
798 break;
799 case 2:
800 return "doors_cargo1";
801 break;
802 case 3:
803 return "doors_cargo2";
804 break;
805 }
806
807 return super.GetDoorSelectionNameFromSeatPos(posIdx);
808 }
809
811 {
812 switch (posIdx)
813 {
814 case 0:
815 return "Offroad_02_Door_1_1";
816 case 1:
817 return "Offroad_02_Door_2_1";
818 case 2:
819 return "Offroad_02_Door_1_2";
820 case 3:
821 return "Offroad_02_Door_2_2";
822 }
823
824 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
825 }
826
828 {
829 switch ( ctrl )
830 {
832 float newValue = 0;
834 {
835 newValue += 0.25;
836 }
837
839 {
840 newValue += 0.25;
841 }
842
844 {
845 newValue += 0.25;
846 }
847
849 {
850 newValue += 0.25;
851 }
852
854 break;
855 }
856
857 return super.OnSound(ctrl, oldValue);
858 }
859
861 {
862 switch (selection)
863 {
864 case "doors_driver":
865 return "DoorsDriver";
866 case "doors_codriver":
867 return "DoorsCoDriver";
868 case "doors_cargo1":
869 return "DoorsCargo1";
870 case "doors_cargo2":
871 return "DoorsCargo2";
872 case "doors_hood":
873 return "DoorsHood";
874 case "doors_trunk":
875 return "DoorsTrunk";
876 }
877
878 return "";
879 }
880
882 {
883 switch (currentSeat)
884 {
885 case 0:
886 return nextSeat == 1;
887 case 1:
888 return nextSeat == 0;
889 case 2:
890 return nextSeat == 3;
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 case 1:
905 return pDoorsSelection == "DoorsCoDriver";
906 case 2:
907 return pDoorsSelection == "DoorsCargo1";
908 case 3:
909 return pDoorsSelection == "DoorsCargo2";
910 }
911
912 return false;
913 }
914
916 {
917 return false;
918 }
919
921 {
922 return false;
923 }
924
926 {
928 SpawnAdditionalItems();
929 FillUpCarFluids();
930
936
943
944
947 }
948}
949
950
952{
954 {
956 SpawnAdditionalItems();
957 FillUpCarFluids();
958
959 GetInventory().CreateInInventory("Offroad_02_Wheel");
960 GetInventory().CreateInInventory("Offroad_02_Wheel");
961 GetInventory().CreateInInventory("Offroad_02_Wheel");
962 GetInventory().CreateInInventory("Offroad_02_Wheel");
963
964 GetInventory().CreateInInventory("Offroad_02_Door_1_1_Beige");
965 GetInventory().CreateInInventory("Offroad_02_Door_1_2_Beige");
966 GetInventory().CreateInInventory("Offroad_02_Door_2_1_Beige");
967 GetInventory().CreateInInventory("Offroad_02_Door_2_2_Beige");
968 GetInventory().CreateInInventory("Offroad_02_Trunk_Beige");
969 GetInventory().CreateInInventory("Offroad_02_Hood_Beige");
970
971
972 GetInventory().CreateInInventory("Offroad_02_Wheel");
973 GetInventory().CreateInInventory("Offroad_02_Wheel");
974 }
975}
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.