SOLVED - Lua code to turn on pointlights in JBEAM

Discussion in 'Programming' started by MrRadYT, Jun 2, 2023.

  1. MrRadYT

    MrRadYT
    Expand Collapse

    Joined:
    Jan 18, 2023
    Messages:
    237
    So I am experimenting with the Wentward DT40L and its lua. I have added point lights to the roof to emulate lights that turn on when the headlights do, but I also added another light for the doors when they open. Is there any way I can enable the lights to turn on when the doors opened? Thanks in advance!
     
    • Like Like x 1
  2. Iamthelaw105

    Iamthelaw105
    Expand Collapse

    Joined:
    Feb 16, 2021
    Messages:
    99
    i did it without lua
    just created a connection to the door open/close triggers
    and a event which switches an electric value for a glowmap

    i've marked the needed lines on the left
    --- Post updated ---
    via lua i would use the doorCoupler states to enable / disable the lights
     

    Attached Files:

    • Screenshot2023-06-08013559.png
  3. MrRadYT

    MrRadYT
    Expand Collapse

    Joined:
    Jan 18, 2023
    Messages:
    237
    Its not using triggers though, its an input map for the doors, that I would like to use to turn on the pointlights defined in the roofs .jbeam. I'll send a screenshot of the roof lights jbeam when I get onto my PC.

    Code_7Ezz6aCmO7.png
    Heres my .jbeam code for the lights
     
    #3 MrRadYT, Jun 8, 2023
    Last edited: Jun 8, 2023
  4. MrRadYT

    MrRadYT
    Expand Collapse

    Joined:
    Jan 18, 2023
    Messages:
    237
    I solved the issue. All I had to do was assign the function from when the headlights come on, to when the doors are opened. I found the function in the input maps file, its called 'dooropen'
     
    • Like Like x 1
  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