Hello everyone! I don't know anything about lua code so have to ask how hard is it for noob to make one or how it's even possible? Making a map https://www.beamng.com/threads/carkour_chaos.91129/ and would need it in there which is driving from point A to B and in some 'checkpoint' areas i want player to change few car parts, but would be much easier for the player just drive to a garage and it would spawn new car without the hassle of changing those one by one. Big thanks in advance! Is there easy place to learn lua code for beam ng? For world editor thingys mostly? Or any ready code thingys anywhere what could use? I only know teleport lua xD
Hello If you're new to Lua, I recommend checking out https://www.tutorialspoint.com/lua/lua_overview.htm and https://devdocs.io/lua~5.1/ (5.1 because of LuaJIT but also check out newer versions since LuaJIT adds some of those features). There's no API for BeamNG so you'll have to spend some time going through the lua files to find what you want. Since you want to change parts, I would start off by looking through the javascript for the parts selector and find how that changes the part. My guess is that it has an object of changes parts and then it gets sent to Lua. That's generally how you mod BeamNG, it takes time but I find it fun. I just wish the developers added some funny comments so I have something to laugh at as I scroll through. I hope that somewhat helps