frootloopers Posted November 7, 2023 Share Posted November 7, 2023 Hey everyone. I'm trying to apply the accelerator through a lua script, but when I do cc = vehicle:getController() cc:accelerator(true) It errors out because cc is apparently not a table, when in the lua docs it says getController will yield a CarController. I have confirmed this as well. Does anyone have experience manipulating the CarController? Link to comment Share on other sites More sharing options...
Grimbo Posted November 24, 2023 Share Posted November 24, 2023 (edited) I think what you are looking for is cc:acceleratorOn(true) Take a look at: https://projectzomboid.com/modding/zombie/core/physics/CarController.html However if you are having trouble with getting the CarController, try and get the vehicle using :getVehicle(), returning the BaseVehicle which you can use :getController() on to get the CarController from the player. Take a look at: https://projectzomboid.com/modding/zombie/vehicles/BaseVehicle.html#getController() I'm new to all of this so, sorry if this doesn't help. Edited November 24, 2023 by Grimbo Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now