Hello everyone, I'm currently working on a hybrid SUV in BeamNG.drive that is equipped with an electric continuously-variable transmission (eCVT) based on @Arcanox hybrid ETK mod and a dual-range transfer case. I am attempting to simulate GM's "Two Mode" hybrid drive. The transfer case is supposed to shift automatically between high and low range based on the vehicle speed and throttle position, but I'm having trouble getting it to work properly. I've tried several different approaches to the automatic shifting logic, but so far none of them have been successful. Attached is the most recent version of the code I'm using. Unfortunately, this code does not seem to be working as intended. The transfer case remains stuck in high range, even when the throttle is pressed aggressively and the vehicle speed is low. I would greatly appreciate any suggestions or ideas you might have. Thank you in advance for your help!
I'm on my phone so I can edit it for you, but it looks like you forgot to set up all of the functions at the bottom. I have made a few configs to use the same mod, but I haven't written any lua code yet. However every mod I've seen has a bit of function assignment code towards the bottom. UpdateGfx being the most important.