1. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  2. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.25 Bug Reporting thread
    Solutions and more information may already be available.

Problem with nodeOffset

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by mumboking, Jan 4, 2016.

  1. mumboking

    mumboking
    Expand Collapse

    Joined:
    Jun 11, 2015
    Messages:
    1,404
    I've added a nodeOffset to a slot. For some reason, when I equip the part the car disappears and the log spits this out:
    Code:
     47.06051|E|libbeamng.object|spawnVehicle: got exception: lua/vehicle/jbeam/jbeam_main.lua:1474: attempt to compare string with number
    Of course it then starts constantly filling the log with
    Code:
    278.30047|E|libbeamng.object|lua/vehicle/drivetrain.lua:488: attempt to perform arithmetic on field 'clutch' (a nil value)
    It shouldn't be a typo because I tried copying the part slot from the H-Series, where it is working fine.
    I've only changed the variables.
    Code:
        "slots": [
            ["type","default","description"]
            ["example","examplePart","Example", {"nodeOffset":{"x":0, "y":1, "z":0}}],
        ],
    If I use this, then the car works fine but I don't have an offset.
    Code:
        "slots": [
            ["type","default","description"]
            "example","examplePart","Example", {"nodeOffset":""}],
        ],
    I'm not sure where I'm going wrong here.
     
    #1 mumboking, Jan 4, 2016
    Last edited: Jan 4, 2016
  2. Scepheo

    Scepheo
    Expand Collapse

    Joined:
    Feb 10, 2015
    Messages:
    601
    And if you add the ".0" after the numbers? I don't know how BeamNG handles those numbers, but in some languages that's used to indicate the number is a double, so there's a chance it'll affect parsing.
     
  3. mumboking

    mumboking
    Expand Collapse

    Joined:
    Jun 11, 2015
    Messages:
    1,404
    Same thing happens.
     
  4. Scepheo

    Scepheo
    Expand Collapse

    Joined:
    Feb 10, 2015
    Messages:
    601
    This is a fairly wild stab in the dark, as I don't have any more information as to what slot you're trying to give a node offset, or what vehicle you're doing it to, but does the slot you're adding it to have this:
    Code:
    "nodes": [
        ["id", "posX", "posY", "posZ"],
        ...,
    ]
     
  5. mumboking

    mumboking
    Expand Collapse

    Joined:
    Jun 11, 2015
    Messages:
    1,404
    I'm experimenting with the 80s Pessima.
    I have a part that fits in the pessima_seats_R slot that contains this new slot which I'd like to have a nodeOffset on.

    Code:
    {
    "pessima_example": {
        "information":{
            "authors":"mumboking",
            "name":"Some part",
            "value":0,
        }
        "slotType" : "pessima_seats_R",
        "slots": [
            ["type","default","description"]
            ["example","examplePart","Example", {"nodeOffset":{"x":0.0, "y":1.0, "z":0.0}}],
        ],
    }
    }
    If I don't equip a part in that slot, it works. If I equip a part in that slot, it breaks.

    EDIT: I'm stupid... All the nodes in the part that goes in this new slot are like this:
    Code:
    ["exampleNodeName", "0", "0.17", "1.98"],
    I'm assuming they should be like this:
    Code:
    ["exampleNodeName", 0, 0.17, 1.98],

    EDIT 2: Yep, removing the quotes from the node coordinates fixed it.
    Thank you Scepheo for making me actually look closer at the nodes section. :)
     
    #5 mumboking, Jan 4, 2016
    Last edited: Jan 4, 2016
  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