A variable for the jbeam files, but defined by a LUA file

Discussion in 'Programming' started by NOCARGO, Apr 28, 2020.

  1. NOCARGO

    NOCARGO
    Expand Collapse

    Joined:
    Apr 1, 2019
    Messages:
    1,514
    Hi,

    I would like to make a variable in the "variables" section of a jbeam file. But I want the value of this variable to
    be determined by a custom LUA file.
    Is this possible ?

    Thanks
     
  2. Diamondback

    Diamondback
    Expand Collapse
    Vehicle Systems Lead
    BeamNG Team

    Joined:
    Apr 8, 2014
    Messages:
    1,957
    No, that's not possible like this, variables are handled in the jbeam loader, which is before any other vlua code runs. So at the time you can execute your own code, the magic all already happened.
    Best bet is to look into other ways of achieving this.
     
    • Informative Informative x 1
  3. NOCARGO

    NOCARGO
    Expand Collapse

    Joined:
    Apr 1, 2019
    Messages:
    1,514
    I was already afraid that would be the case but I wanted to ask anyway. Thanks :)
     
  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