Logowanie Google+ Logowanie Rejestracja

Poszukujemy moderatorów, nie czekaj, złóż podanie już teraz: KLIK

nie dziala gas limiter
#1
witam,w fs 15 do ciagnikow dodawalem skrypt gaslimiter.lua, dzieki niemu ciagnik mogl jechac np. 3km\h na najwiekszych obrotach(dodaje obroty silnika),niestety po dodaniu do ciagnika  w fs17 po odpaleniu znikaja zegary i komendy a obrotow nie da sie dodac,linijki  z moddesc

    <specializations>
   <specialization name="interactiveControl"       className="InteractiveControl"   filename="Scripts/InteractiveControl.lua" />
   <specialization name="interactiveWindows"     className="InteractiveWindows"  filename="Scripts/InteractiveWindows.lua" />
   <specialization name="interactiveButtons"       className="InteractiveButtons"   filename="Scripts/InteractiveButtons.lua" />
        <specialization name="SpeedJoystick"            className="SpeedJoystick"          filename="Scripts/SpeedJoystick.lua"/>
        <specialization name="doorOpener"               className="DoorOpener"             filename="Scripts/DoorOpener.lua"/>
<specialization name="gasLimiter" className="gasLimiter" filename="gasLimiter.lua"/>
    </specializations>

   <vehicleTypes>
    <type name="Ursus" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attacherJoints" />
        <specialization name="lights" />
        <specialization name="animatedVehicle" />
        <specialization name="speedRotatingParts" />
        <specialization name="motorized" />
        <specialization name="steerable" />
        <specialization name="drivable" />
        <specialization name="cylindered" />
        <specialization name="aiVehicle" />
        <specialization name="bunkerSiloCompacter" />
        <specialization name="honk" />
        <specialization name="washable" />
        <specialization name="mountable" />
        <specialization name="wheelRotations" />
<specialization name="gasLimiter" />  
    </type>
   </vehicleTypes>

    <inputBindings>
        <input name="INTERACTIVE_CONTROL_SWITCH" category="VEHICLE" key1="KEY_space" key2="" button="" device="0" mouse="" />
<input name="SET_DOOROPENER"                       category="onfoot"    key1="KEY_r"        key2="" button="" device="0" mouse="" />
input name="mehrRPM" category="VEHICLE" key1="KEY_]" key2="" button="" device="0" mouse="" />
<input name="wenigerRPM" category="VEHICLE" key1="KEY_[" key2="" button="" device="0" mouse="" />
    </inputBindings>

a to z gaslimiter.lua

gasLimiter = {};

function gasLimiter.prerequisitesPresent(specializations)
    return SpecializationUtil.hasSpecialization(Motorized, specializations);
end;

function gasLimiter:load(savegame)

end;

function gasLimiter:delete()
end;

function gasLimiter:mouseEvent(posX, posY, isDown, isUp, button)
end;

function gasLimiter:keyEvent(unicode, sym, modifier, isDown)
end;

function gasLimiter:update(dt)
    if self:getIsActiveForInput() then
        if InputBinding.isPressed(InputBinding.MORERPM) then
   self.motor.minRpm = self.motor.minRpm - 100;
elseif InputBinding.isPressed(InputBinding.LESSRPM) then
   self.motor.minRpm = self.motor.minRpm + 100;
   end;
    end;

    if self.isEntered then
if self.motor.minRpm < -1600 then
self.motor.minRpm = -1600;
elseif self.motor.minRpm > 200 then
self.motor.minRpm = 200;
end;
end;
end;

function gasLimiter:stopMotor()
    self.motor.minRpm = 200;
end;

function gasLimiter:onLeave()
    self.motor.minRpm = 200;
end;

function gasLimiter:draw()
if self.isMotorStarted then
        g_currentMission:addExtraPrintText(string.format(g_i18n:getText("Standgas control"), self.typeDesc) .. " " .. InputBinding.getKeyNamesOfDigitalAction(InputBinding.MORE_RPM) .. "/" .. InputBinding.getKeyNamesOfDigitalAction(InputBinding.LESS_RPM));
end;
end;
 
Taka tam sobie reklama.
#2
Bez logu się nie obejdzie, musisz go podać. My Games/FarmingSimulator2017/log.txt
No to jedziemy, gnębić podpadziochów!
 
  


Podobne wątki
Wątek: Autor Odpowiedzi: Wyświetleń: Ostatni post
  skup slomy nie dziala kirowiec tv 2 333 08-25-2017, 11:14
Ostatni post: kirowiec tv
  fs 15 nie dziala rewenant 0 352 10-29-2016, 08:37
Ostatni post: rewenant



Przegląda: 1 gości

Menu