Solved Beacon light not spinning

Discussion in 'Mod Support' started by NinetyNine!, Jul 14, 2016.

  1. NinetyNine!

    NinetyNine!
    Expand Collapse
    Staff Member

    Joined:
    Feb 17, 2016
    Messages:
    1,377
    Hi , i'm currently working on a beacon-light for the barstow , but somehow the bulb won't spin.

    the node/beam connections are fine and the beacon 'sits' on it's place.
    screenshot_01780.png screenshot_01781.png

    but as soon as i press on M , it simply won't start spinning. i did that on other cars before , it worked perfectly there , but the barstow seems to have problems with it.

    here is the jbeam :

    Code:
    {
    "vmbarstow_beaconlight_red": {
        "information":{
            "authors":"BeamNG , Ninetynine",
            "name":"Red Beacon Light",
            "value":50,
        }
        "slotType" : "barstow_mod",
        "glowMap":{
                "beaconlight_red":                   {"simpleFunction":"lightbar", "off":"beaconlight_red", "on":"beaconlight_red_on"},
                "beaconlight_red_glass":                   {"simpleFunction":"lightbar", "off":"beaconlight_red_glass", "on":"beaconlight_red_glass_on"},
            },
        "flexbodies": [
             ["mesh", "[group]:", "nonFlexMaterials"],
             ["beaconlight_red", ["beaconlight"], [], {"pos":{"x":0, "y":0.25, "z":1.32}}],
        ],
    
        "props": [
              ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"]
              ["beaconSpin","beaconlight_bulb", "bl2r","bl2l","bl1r",  {"x":270, "y":0, "z":0} , {"x":0, "y":0, "z":1}    , {"x":0.0, "y":0, "z":0}, -360, 360, 0, 1,{"baseTranslation":{"x":0.08, "y":0.08, "z":-0.04}}],
    
              {
                  "lightInnerAngle":0
                  "lightOuterAngle":70
                  "lightBrightness":0.6
                  "lightRange":15
                  "lightColor":{"r":255, "g":50, "b":50, "a":255}
                  "lightAttenuation":{"x":0, "y":0.42, "z":0.07}
                  "lightCastShadows":false
                  "texSize":512
                  "shadowSoftness":1
                  "flareName":"vehicleHeadLightFlare"
                  "flareScale":0.1
              },
    
              ["beaconSpin" ,      "SPOTLIGHT"        , "bl2r","bl2l","bl1r", {"x":85, "y":0, "z":0} , {"x":0, "y":0, "z":-1}    , {"x":0, "y":0, "z":0}, -360, 360, 0, 1, {"baseTranslation":{"x":0.5, "y":0.5, "z":0.09},"deformGroup":"beaconlight_break"}],
              ["beaconSpin" ,      "SPOTLIGHT"        , "bl2r","bl2l","bl1r", {"x":265, "y":0, "z":0} , {"x":0, "y":0, "z":1}    , {"x":0, "y":0, "z":0}, -360, 360, 0, 1, {"baseTranslation":{"x":0.5, "y":0.5, "z":0.09},"deformGroup":"beaconlight_break"}],
          ],
         "nodes": [
             ["id", "posX", "posY", "posZ"],
             {"selfCollision":true}
             {"collision":true}
             {"nodeWeight":0.76},
             {"frictionCoef":0.7},
             {"group":"beaconlight"},
             {"nodeMaterial":"|NM_METAL"},
             ["bl1l", 0.08670, 0.17000, 1.35035],
             ["bl2l", 0.08670, 0.33000, 1.36035],
    
             ["bl3", 0.00000, 0.25000, 1.52035],
    
             ["bl1r", -0.08670, 0.17000, 1.35035],
             ["bl2r", -0.08670, 0.33000, 1.36035],
    
        ],
    
        "beams": [
              ["id1:", "id2:"],
              {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
              {"beamSpring":300000,"beamDamp":60},
              {"beamDeform":30000,"beamStrength":"FLT_MAX"},
              //Main shape
          {"deformGroup":"beaconlight_break"}
            {"deformationTriggerRatio":0.1}
            ["bl1r","bl1l"],
            ["bl2r","bl2l"],
            ["bl1r","bl2r"],
            ["bl1l","bl2l"],
    
            ["bl1r","bl2l"],
            ["bl1l","bl2r"],
    
            ["bl1r","bl3"],
            ["bl2r","bl3"],
            ["bl1l","bl3"],
            ["bl2l","bl3"],
    
    
              //attach
              {"beamSpring":300000,"beamDamp":60},
              {"beamDeform":4000,"beamStrength":5000},
    
              {"breakGroup":"light_attach"},
          ["bl2r","r2"],
          ["bl2l","r2"],
          ["bl1r","r2"],
          ["bl1l","r2"],
          ["bl1r","r1"],
          ["bl1l","r1"],
          ["bl2r","r3"],
          ["bl2l","r3"],
    
          ["bl3","r2rr"],
          ["bl3","r2"],
          ["bl3","r2ll"],
    
          ["bl2r","r2rr"],
          ["bl2l","r2ll"],
          ["bl1r","r2rr"],
          ["bl1l","r2ll"],
    
    
          ["bl1r","r5"],
          ["bl1l","r5"],
          ["bl2r","r5"],
          ["bl2l","r5"],
    
          ["bl3","r5"],
          {"deformGroup":""}
    
    
              {"breakGroup":""},
    
              {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
        ],
    
        "triangles": [
                ["id1:","id2:","id3:"],
                {"group":"beaconlight"},
                {"dragCoef":3},
    
                ["bl3","bl2r","bl1r"],
                ["bl3","bl2l","bl2r"],
                ["bl3","bl1l","bl2l"],
                ["bl3","bl1r","bl1l"],
    
                ["bl1r","bl2r","bl2l"],
                ["bl1r","bl2l","bl1l"],
        ],
    }
    }
    
     
  2. Bernd

    Bernd
    Expand Collapse

    Joined:
    Dec 27, 2015
    Messages:
    1,395
    Afaik it needs a lua file to spin.
     
  3. NinetyNine!

    NinetyNine!
    Expand Collapse
    Staff Member

    Joined:
    Feb 17, 2016
    Messages:
    1,377
    the lua is in the folder. forgot to mention it
     
    • Like Like x 1
  4. Nadeox1

    Nadeox1
    Expand Collapse
    BeamNG.Support
    Staff Member

    Joined:
    Aug 5, 2012
    Messages:
    13,867
    Can you post/PM your files?
     
  5. Nadeox1

    Nadeox1
    Expand Collapse
    BeamNG.Support
    Staff Member

    Joined:
    Aug 5, 2012
    Messages:
    13,867
    Checked the files.

    You can't have the 'lua' folder inside another folder.
    The lua folder must always be in the main vehicle folder

    Code:
    content/vehicles/barstow/lua
    
    NOT
    Code:
    content/vehicles/barstow/folder/lua
     
  6. NinetyNine!

    NinetyNine!
    Expand Collapse
    Staff Member

    Joined:
    Feb 17, 2016
    Messages:
    1,377
    ah alright. solved the problem for me :) Thanks!
     
  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