1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.37 Bug Reporting thread
    Solutions and more information may already be available.

Console Command for damaging the Piston Rings/Head Gasket

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by Pyro Katwulf, Mar 31, 2016.

  1. Pyro Katwulf

    Pyro Katwulf
    Expand Collapse

    Joined:
    Mar 31, 2016
    Messages:
    3
    I wanted to know what the console commands are for damaging the piston rings and head gasket for the vehicles....if you could help that would be great....thanks!!!
     
    • Like Like x 1
  2. GameNoobTV

    GameNoobTV
    Expand Collapse

    Joined:
    Aug 28, 2015
    Messages:
    413
    If there is, I would also be interested in learning this command
     
  3. Scepheo

    Scepheo
    Expand Collapse

    Joined:
    Feb 10, 2015
    Messages:
    601
    The console commands are just Lua code that's executed, so in vehicle Lua mode, you can run any Lua code on the vehicle. The main vehicle Lua loads a number of modules, among which the engine module. You can find the code for this module in engine.lua (Steam\steamapps\common\BeamNG.drive\lua\vehicle\engine.lua): any variable or function that's set on the M variable in there is accessible from the vehicle, so to set the head gasket to damaged you'd run: engine.headGasketBlown = true

    The same is true for any other variable in there (you could also set the oil temperature with engine.oilTemperature) and any other module used by the main vehicle Lua (you could turn on the high beams by calling electrics.setLightsState(2)).
     
    • Like Like x 1
  4. Pyro Katwulf

    Pyro Katwulf
    Expand Collapse

    Joined:
    Mar 31, 2016
    Messages:
    3
    I just tried putting in "engine.headGasketBlown = true" and it gives me a fatal lua error
     
  5. Scepheo

    Scepheo
    Expand Collapse

    Joined:
    Feb 10, 2015
    Messages:
    601
     
  6. GameNoobTV

    GameNoobTV
    Expand Collapse

    Joined:
    Aug 28, 2015
    Messages:
    413
    Still doesn't work
     
  7. Scepheo

    Scepheo
    Expand Collapse

    Joined:
    Feb 10, 2015
    Messages:
    601
    A bit more information, please. The logs from when you entered the command would be useful.
     
  8. GameNoobTV

    GameNoobTV
    Expand Collapse

    Joined:
    Aug 28, 2015
    Messages:
    413
    Code:
    ***FATAL LUA ERROR: [string "string:]:1: attempt to index global 'engine' (a nil value)
     
  9. Scepheo

    Scepheo
    Expand Collapse

    Joined:
    Feb 10, 2015
    Messages:
    601
    Does the bit in front of that error say this:
    Code:
    |E|libbeamng.lua.V|
     
  10. Suokkola

    Suokkola
    Expand Collapse

    Joined:
    Dec 27, 2013
    Messages:
    30
    "drivetrain.engine.headGasketBlown = true" should work (just tested it myself).
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice