I have a 24v cummins engine i made for the D series and would like to add a smoke switch to it. By, pressing a button like "T" and have a sub part to the engine toggle adjust the "Burn efficiency" to the engine. And, possible make that a tune able item so i can find the best setting for it on the go to give the best smoke. What kind of file do i need to make this happen? I have never made something that is tune able. And never made anything that uses a key input.
Can you help point me in the correct direction? I am thinking i need to add a "Keyboard.jbeam file. Like copy the pickup "Keyboard.jbeam" file and changing from "O" to like "T" and renaming from tailgate to smoke switch. As far as the toggle button goes.
That's about right, but there's more to it. To start, I'd copy the input_actions.json from the pickup and rename it to something like "input_actions_smokeswitch". Then you change all the values. For more on key input: https://wiki.beamng.com/Vehicle_Specific_Bindings As for the tune able burn efficiency, I'd copy any jbeam file that has a variable in it. I'd delete everything unecessary until I have one variable, then I'd make that the Burn effeicency. That'll get you started. As for actually making smoke switches and burn efficiency, I've done anything like that. I've provided the two files shown in a zip
This is what i have so far. I do not know what I need in the .lua file to be able to toggle it on and off. Also the variable should be 0.0 - 1.0, but it is -100 - 100.