Doors not showing in the game.

Discussion in 'Content Creation' started by Mert Y., Feb 20, 2024.

  1. Mert Y.

    Mert Y.
    Expand Collapse

    Joined:
    Nov 29, 2015
    Messages:
    49
    Hello, everyone. I'm trying to create simple models that include more than one part. But I'm stuck at a point. Even if I tried all possible ways, I couldn't make it to get doors shown up in the game. Can you help me to figure this problem out? I will upload the zip file if you want to check it. I appreciate any help you can provide.
     

    Attached Files:

  2. SineMatic

    SineMatic
    Expand Collapse

    Joined:
    Nov 17, 2022
    Messages:
    60
    The body is the main part, so you should write the following code to body_jbeam.jbeam file:

    Code:
    "body_jbeam":{ /*this is the part name*/
       "information":{
           "authors":"your name",
           "name":"body",  /*here is the name for parts selector*/     
        }
    "slotType" : "main", -- this means that the 'body_jbeam' part is the root (or parent) for all other parts
    "slots": [
       ["type", "default", "description"],
       ["the_doors" /*slot name*/,  "door_jbeam" /*default part name*/, "The Doors /*this the slot name that you see in the part selection menu*/"]
    ],
    
    Everything between /* and */ comments out. // comments out just one line

    In the door_jbeam.jbeam file:

    Code:
    "door_jbeam":{
       "information":{
           "authors":"your name",
           "name":"Doors 1" /*this part name appears in the parts selector*/}
      },
    
    "slotType" : "the_doors",
    //for example, you can add a slot for a handle:
    "slots": [
       ["type", "default", "description"],
       ["handle",  "door_handle_1", "Door Handle"]
    ],
     
    #2 SineMatic, Feb 20, 2024
    Last edited: Feb 20, 2024
    • Like Like x 1
  3. Mert Y.

    Mert Y.
    Expand Collapse

    Joined:
    Nov 29, 2015
    Messages:
    49
    Thank you so much. I really appreciate it!
     
  4. Mert Y.

    Mert Y.
    Expand Collapse

    Joined:
    Nov 29, 2015
    Messages:
    49
    I followed all the steps, but nothing changed :(
     

    Attached Files:

    • 1.jpg
  5. SineMatic

    SineMatic
    Expand Collapse

    Joined:
    Nov 17, 2022
    Messages:
    60
    Issue #1: incomplete file structure.
    Your mod should look like this: modName.zip > vehicles > vehicleName > all the files (jbeam, dae, json etc)

    Issue #2: syntax
    54th line of your code contains an error: {"group":"body_","door_"},
    It should look like this instead: {"group":["body_","door_"]},
    Square parentheses create a list of something. In this case, the elements "body_" and "door_"
    Btw, if your car has issues, there will be error messages in the console.

    Issue #3: wrong refNodes
    The refNodes orientation you've chosen is facing backwards. That's why the vehicle turns 180 degrees when resetting.

    I fixed these issues and uploaded a zip file. Ask me if you need more help :)
     

    Attached Files:

    • Like Like x 1
  6. Mert Y.

    Mert Y.
    Expand Collapse

    Joined:
    Nov 29, 2015
    Messages:
    49
    I'm sorry for bothering you. Thank you very much for your valuable help!
     
    • Agree Agree 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