How Do You Control Weather Using Lua?

Discussion in 'Content Creation' started by Jack The Fox, May 2, 2025.

  1. Jack The Fox

    Jack The Fox
    Expand Collapse

    Joined:
    Jan 22, 2025
    Messages:
    34
    Hey everyone,

    I'm working on a Lua mod for BeamNG.drive and I want to control the weather dynamically. I’ve figured out how to control wind using obj:setWind(), but I’m not sure how to change other weather effects.

    Specifically, I’m wondering:

    • Can you change fog using Lua?

    • Is there a way to trigger lightning or rain?

    • Can you adjust the sky color, cloud coverage, or make it look more stormy?
    I’m open to using either vehicle-side Lua or GE Lua, depending on what works. If anyone knows what functions or objects I should use, I’d really appreciate the help. I would really appreciate it if anyone could give me a full code to control the fog rain and making it cloudy with rain to make it look like a storm.

    Thanks!
    – Jack The Fox
     
  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