Solved lua controller issues

Discussion in 'Mod Support' started by fillman86, Jan 8, 2025.

  1. fillman86

    fillman86
    Expand Collapse

    Joined:
    Apr 18, 2020
    Messages:
    208
    I wish I knew coding better, but learning is hard for me.

    I want to get a node's cid and I find I can only do that in the controller folder (*mod name/vehicles/bastion/lua/controller), but I then want to do some stuff with key-binding inputs, but I'm finding I can only do that in the root lua folder (*mod name/vehicles/bastion/lua). (This is to change a node's weight when pressing a key)

    is there a way to pass values between these different files, or am I doing something wrong? (examples of how the code would look will help)
     
  2. fillman86

    fillman86
    Expand Collapse

    Joined:
    Apr 18, 2020
    Messages:
    208
    I figured it out with help, I put it in the lua/vehicle/extensions/auto folder, and had to set the electrics value to a numeric value on initiation so I could use it for maths, otherwise it starts as nil and bugs the car out on spawn
     
  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