Hello Community, is there a way to set the throttle level with Javascript (not for holding a constant speed rather for holding a constant rpm)? I´ve already looked into the cruise control app, but they use a custom lua extension (I guess) and I don´t understand how to create my own (if neccessary). excerpt out of the "app.js" file at path /..\BeamNG.drive\ui\modules\apps\CruiseControl, line 40: Code: bngApi.activeObjectLua('extensions.use("cruiseControl").holdCurrentSpeed()'); I appreciate all hints. And if it possible to send lua commands directly to the "vehicle lua"-engine via "bngApi.engineLua();" ? Then I could use somethink like Code: bngApi.engineLua('input.event("throttle", 0.5)');
Code: bngApi.activeObjectLua('input.event("throttle", 0.5)'); Should work, have you tried it? I'm not a pro when it comes to BeamNG's UI System, but I think the "activeObjectLua" part is equal to the vehicle lua, correct me if I'm wrong. If that doesn't work, try this? Code: bngApi.engineLua("be:getPlayerVehicle(0):queueLuaCommand('input.event(\"throttle\", 0.5)')")