Solved Mod conflict issue [adj. Ramp, Wipers Mod]

Discussion in 'Mod Support' started by aljowen, Dec 1, 2018.

  1. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    Hi,

    It has been mentioned to me that my Adjustable Ramp mod doesn't work when the Animated Wipers mod is installed.


    upload_2018-12-1_14-1-37.png
    This points to the following code:
    upload_2018-12-1_14-2-42.png
    Code:
    electrics.values['wipers'] = 1-(wipersEnabled / 2)
        if(input.keys.Y and wiperKey == 0) then
            if(wipersEnabled == 0) then
                wipersEnabled = 1
                wiperMaxTimer = 150
                gui.message("Wipers: Slow", 5, "wiperMsg")
            elseif(wipersEnabled == 1) then
                wipersEnabled = 2
                wiperMaxTimer = 50
                gui.message("Wipers: Fast", 5, "wiperMsg")
            else
                wipersEnabled = 0
    
                gui.message("Wipers: Off", 5, "wiperMsg")
            end
            wiperKey = 1
        end
        if(not input.keys.Y) then wiperKey = 0 end    <======================
    
        if(not wiperForward and wipersEnabled > 0) then
            wiperTimer = wiperTimer + 1
            if(wiperTimer > wiperMaxTimer) then
                queueWiperSwing = true
                wiperForward = true
                wiperTimer = 0
            end
        end

    This leaves me a little confused, since I don't see any variable name conflicts, or jbeam configuration/variable conflicts. I am not sure what other potential factors exist?


    The animated wipers mod is old and unsupported. It also runs constantly in the background regardless of whether it is or isn't in use, which I would guess is where the real problem is. However, I don't want my mod to be crashing for people who have other mods installed. Any ideas on how to solve the conflict? Or things I should do to make the Adjustable Ramp mod more resilient?

    Animated Wipers Mod: https://www.beamng.com/threads/animated-wipers-mod-v0-2.41531/
    Adjustable Ramp Mod: https://www.beamng.com/resources/adjustable-ramp.6597/


    Thanks,
    Aljowen
     
  2. thomatoes50

    thomatoes50
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 31, 2013
    Messages:
    722
    No I think the error happens because it's a prop, so it doesn't have an automatic gearbox

    In your lua file add this inside the `onInit` function

    Code:
     electrics.values['gear_A'] = 0
        electrics.values['drivetrain_4wd'] = 0
        electrics.values['wiperVal'] = 0
        electrics.values['wipers'] =0
        electrics.values['keyTurn']=0
     
    • Informative Informative x 2
  3. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    Thanks, I haven't tested it just yet, hopefully I will find time to test and release an update soon :)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice