Unsolved Dynamically change values for automation wing

Discussion in 'Mod Support' started by Nicloas, Aug 3, 2020.

  1. Nicloas

    Nicloas
    Expand Collapse

    Joined:
    Jul 25, 2020
    Messages:
    22
    I wanted to try some sort of basic active wing, without going too deep and messing with beams and other complex things.

    I was able to put variables into wing and change it in tuning menu and thus changing wing properties

    ["EFixtureType::EFT_WING06", "EFixtureType::EFT_WING03", "EFixtureType::EFT_WING07", {"dragCoef":"$dragCoef", "liftCoef":"$liftCoef", "stallAngle":"$stallAngle"}],
    ["EFixtureType::EFT_WING06", "EFixtureType::EFT_WING02", "EFixtureType::EFT_WING03", {"dragCoef":"$dragCoef", "liftCoef":"$liftCoef", "stallAngle":"$stallAngle"}],

    but I would like to do it thru lua and change them depending on car speed or brake (making an air brake)
    But I am unable to push any values into it via lua.

    Could you please show me ho to make lua and variable to push the value into wing stats for liftCoef and dragCoef

    ideally into code

    local M = {}
    local p_dragkoef = 500
    local function init(jbeamData)
    M.jbeamData = jbeamData
    end
    local function updateGFX(dt)
    electrics.values.p_dragkoef = 500
    end
    print("value:" ..p_dragkoef)
    M.updateGFX = updateGFX
    M.init = init
    return M

    ["EFixtureType::EFT_WING06", "EFixtureType::EFT_WING02", "EFixtureType::EFT_WING03", {"dragCoef":variable_from_lua, "liftCoef":"$liftCoef", "stallAngle":"$stallAngle"}],
     
  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