Solved Setting node weight in lua

Discussion in 'Mod Support' started by chris_lucas, Feb 5, 2017.

  1. chris_lucas

    chris_lucas
    Expand Collapse

    Joined:
    Dec 12, 2012
    Messages:
    1,444
    For example I want to set the weight of a node with node id 24 how would one do it?
     
    • Like Like x 1
  2. Joelvb

    Joelvb
    Expand Collapse

    Joined:
    Aug 7, 2013
    Messages:
    199
    Like every other property.
    Code:
    ["id24", 0, 0.1, 0.2, {"nodeWeight":20}],
     
  3. chris_lucas

    chris_lucas
    Expand Collapse

    Joined:
    Dec 12, 2012
    Messages:
    1,444
    Thanks, but that's not lua.
     
  4. Joelvb

    Joelvb
    Expand Collapse

    Joined:
    Aug 7, 2013
    Messages:
    199
    In Lua. For what do you want nodeweight in lua?
     
  5. Goosah

    Goosah
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Aug 30, 2013
    Messages:
    790
    obj:setNodeMass(id, mass)
     
    • Like Like x 2
    • Informative Informative x 1
  6. chris_lucas

    chris_lucas
    Expand Collapse

    Joined:
    Dec 12, 2012
    Messages:
    1,444
    Thank you very much, works perfectly
     
  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