(LUA) part vehicle condition?

Discussion in 'Programming' started by x_MoToRyNkA, Jan 22, 2021.

  1. x_MoToRyNkA

    x_MoToRyNkA
    Expand Collapse

    Joined:
    Jun 10, 2020
    Messages:
    5
    Hi, is there any function (lua) that would check "state / health"? vehicle parts?
    I would like to create an additional control light that would show that one of our lamps is broken.

    Below is a photo of such an example control light (Ford galaxy mk1)
     

    Attached Files:

    • fordgalaxy.png
  2. SuperShep1

    SuperShep1
    Expand Collapse

    Joined:
    Apr 14, 2019
    Messages:
    2,682
    i mean if you damage the engine, the check engine light comes on
     
  3. x_MoToRyNkA

    x_MoToRyNkA
    Expand Collapse

    Joined:
    Jun 10, 2020
    Messages:
    5
    Adding a "check engine" is not difficult. I mean, if we break the headlamp, it will show a warning light. I need help with the function in lua.
     

    Attached Files:

    • etkkkkkkk.png
  4. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,060
    Just check if any beam in the lamp's deformgroup is deformed (idk how to do it but should be possible), that will mean that the lamp is broken
     
  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