In a precedent question, I asked how to change lights textures. But now, I want to change the light beam colors so that they are the same as the car color. Picture of the intended result : I though about making a lua script that will check the user-selected color and then change the value of the color in the jbeam, but I have no idea how to do it or if it's possible. If I knew how to get the user-selected color and how to modify a jbeam value I probably could make it, but I don't know if it's possible to do either of these actions.
Hey, unfortunately I cannot give you the solution for the lua part. But at least you can create dynamic light beam colors. @warkus created dinamically customizable engine ( http://www.beamng.com/resources/customizable-engines-and-drivetrains.747/ ) You may can use the same solution for light beam color. Afterwards it might be easier to create a custom lua script to compare these values.
Addition: At least there is already a setConfig function within the partmgmt.lua. Now you 'just' need to find a function to read the corresponding data. Will update you, if I found a solution.
I have managed to get dynamic light beams using the same solution as @warkus Thank you, at least there is some progress, maybe this isn't as unrealizable as I first thought. I will continue searching for a solution too and keep you updated
Sadly not, I'm kinda lost in the lua functions, it's hard to figure out what every function and variable mean. So I have kinda lost motivation on this side of the project. i think I'm gonna stick with the same solution as warkus for the moment until i regain enough motivation to start searching again