1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

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

Mission and scenario, can we use LUA ?

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by Frag2000, May 23, 2023.

  1. Frag2000

    Frag2000
    Expand Collapse

    Joined:
    May 22, 2023
    Messages:
    6
    Hi guys,

    I am a professional software developers and got deeply interested in BeamNG recently. I played around with the flowchart editor but I find it a bit overwhelming. Briefly, from my point of view it would be easier for me to code in LUA directly.

    I know that there help around while using LUA with cars, but can use LUA to write scenarios and mission instead of the flowgraph? If yes, would there be references somewhere or a simple mission we could look at? I did not find much help

    I found this, but these classes are not covering much. Is there any code I could look at for all vehicle/maps/envrionment properties?

    https://wiki.beamng.com/Lua_Reference-2.html#mainLevel.lua

    Thanks
     
  2. Gamergull

    Gamergull
    Expand Collapse
    BeamNG Team

    Joined:
    Jun 3, 2018
    Messages:
    460
    Yes, it is indeed possible. You can use the old scenario system to create gameplay with custom Lua. The old system isn't really supported or documented these days, but it still works nicely.

    I attached a sample scenario that you can play and inspect. Place the .zip file here:
    Code:
    <user-folder>/mods/repo/
    You can also extract it and place the resulting folder here:
    Code:
    <user-folder>/mods/unpacked/
    Then, you can easily edit it. You can try the scenario from the Scenarios menu.

    As for the Lua reference... it is rather incomplete. Often, you can find what you want by searching or inspecting the existing Lua modules.
     

    Attached Files:

    • Like Like x 1
  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