Help with steering variables

Discussion in 'Programming' started by phoob, Jun 24, 2018.

  1. phoob

    phoob
    Expand Collapse

    Joined:
    May 15, 2018
    Messages:
    81
    Im working on a mod that allows customization to the steering and im stuck.
    Code:
            ["$angle1", "range", "", "Alignment", -0.175, -0.100, -0.200, "Turn angle 1", "NOTE THIS VALUE HAS TO BE THE SAME AS TURN ANGLE 2 BUT THIS ONE IS NEGATIVE"]
            ["$angle2", "range", "", "Alignment", 0.175, 0.100, 0.200, "Turn angle 2", "NOTE THIS VALUE HAS TO BE THE SAME AS TURN ANGLE 1"]
    ^ Those are my variables and i want to combine the two to one the reason being that it is simple and easier to use
    Code:
        "hydros": [
            ["id1:","id2:"],
            {"beamPrecompression":1.0, "beamType":"|NORMAL", "beamLongBound":1, "beamShortBound":1},
            {"beamSpring":5501000,"beamDamp":50,"beamDeform":"FLT_MAX","beamStrength":300000},
            ["fh6r","fx5l",{"factor":"$angle2","steeringWheelLock":510,"inRate":1.25,"outRate":1.25}],
            ["fh6l","fx5r",{"factor":"$angle1","steeringWheelLock":510,"inRate":1.25,"outRate":1.25}],
            {"beamPrecompression":1.0, "beamType":"|NORMAL", "beamLongBound":1, "beamShortBound":1},
    Thats what the variables are going to they are editing how far the wheels turn at full lock
    I need to have it where they change one value in the tuning section to a value lets say 2
    When they put two it changes the value inside $angle1 to a negative ( EX : "-$angle1"
    when i do
    Code:
    ["fh6l","fx5r",{"factor":"-$angle1","steeringWheelLock":510,"inRate":1.25,"outRate":1.25}],
    It does not like the code and will not load the vehicle
    and when i do
    Code:
    ["fh6l","fx5r",{"factor":-"$angle1","steeringWheelLock":510,"inRate":1.25,"outRate":1.25}],
    it also does not load the vehicle.
    (The difference is where the negative is placed)
    If anyone has a solution that would be great.
     
  2. crashmaster

    crashmaster
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,448
    Bump cuz i wanna make this work too. ive been trying to make an adjustable drift steering but im running into the same issues..
    --- Post updated ---
    Plot twist. turns out i just found out how to do it lmao.

    Code:
            ["$steer_angle_node", "range", "+m", "Wheel Alignment", 0.24, 0.2, 0.9, "Node Position", "Steering node adjustments on the x axis", {"stepDis":0.001,"subCategory":"Front"}]
    
             ["fh6r", "$=-$steer_angle_node", -1.09, 0.177],
             ["fh6l", "$steer_angle_node", -1.09, 0.177],
    you need to add $=- in front of the one you want a negative value.
     
    • Informative Informative x 2
  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