Forum begins after the advertisement:


[General] The scripts aren’t linked after downloading zip

Home Forums Video Game Tutorial Series Creating a Metroidvania in Unity [General] The scripts aren’t linked after downloading zip

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #16959
    Koen
    Level 10
    Silver Supporter (Patron)
    Helpful?
    Up
    0
    ::

    Hi,

    I’m very new to Unity but I’m trying to make my first game with the help of the metroidvania tutorial videos. I’ve only encountered the issue that after downloading the game files and opening them. None of the scripts are linked to anything. So in the player controller script for example, stuff like the attacks are linked to nothing so it says eg none (transform) Now is there a quick way to link everything or do I need to do it manually, thanks in advance.

    #16962
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    Hi Koen, which part of the project files have you downloaded? Do you see any errors in the Console window after opening the project?

    #16966
    Koen
    Level 10
    Silver Supporter (Patron)
    Helpful?
    Up
    0
    ::

    Mostly that variables aren’t assigned when I try to preview the game. I just downloaded the zip file from the patreon

    #16968
    Ser Apustaja
    Level 2
    AI Assistant
    (BETA)
    Helpful?
    Up
    0
    ::

    I’ll help you troubleshoot the variable assignment issue in your game. Since you’ve downloaded the game files from Patreon, here are some steps to diagnose and potentially resolve the problem:

    1. Check Variable Initialization
    • Make sure all variables are properly initialized before being used
    • Verify that variables are assigned values in the correct script or initialization section
    1. Debugging Steps:
    • Open the script where variables should be assigned
    • Add print statements to check if variables are being set correctly
    • Check for any error messages in the console/output
    1. Common Issues:
    • Scope problems (variables not accessible in all needed areas)
    • Initialization order
    • Potential syntax errors preventing assignment

    Could you provide:

    • The specific programming language/game engine you’re using
    • A code snippet showing the variable assignment
    • Any error messages you’re seeing

    This will help me provide more targeted assistance in resolving your variable assignment problem.

    #16969
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::
    Mostly that variables aren’t assigned when I try to preview the game. I just downloaded the zip file from the patreon

    Are you using the latest project files (i.e. Part 12, or is it some other part)? So I know which files to look at. Everything should be assigned in all of our project files.

    #16977
    Koen
    Level 10
    Silver Supporter (Patron)
    Helpful?
    Up
    0
    ::

    Yes I was using the files from part 12

    #16978
    Ser Apustaja
    Level 2
    AI Assistant
    (BETA)
    Helpful?
    Up
    0
    ::

    It seems like you’re working on a project that references files from a previous part. Could you provide more details about what you’re trying to achieve or what specific issues you’re encountering with those files? This way, I can assist you better with your code or any errors you’re facing!

    #16987
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    Can you try downloading and re-opening the project? Everything in the project files should be linked. You shouldn’t have to re-link anything yourself.

    #16988
    Koen
    Level 10
    Silver Supporter (Patron)
    Helpful?
    Up
    0
    ::

    The game appears to already be more functional as I didn’t change the name of the folder, but the variables are still not linked. https://imgur.com/a/5uwag5x

    #16989
    Ser Apustaja
    Level 2
    AI Assistant
    (BETA)
    Helpful?
    Up
    0
    ::

    It looks like you’re working on a game and having issues with linking variables. While I can’t see the image you shared, I can help you troubleshoot common issues related to variable linking in game development. Here are a few steps you can take:

    1. Check Variable Scope: Ensure that your variables are declared in a scope that is accessible where you’re trying to use them. If they are local to a function, they won’t be available outside of that function.

    2. Initialization: Make sure that all variables are properly initialized before you try to use them. If a variable is undefined or null, it won’t work as expected.

    3. Naming Consistency: Double-check that you’re using the exact same variable names. Variable names are case-sensitive, so myVariable and myvariable would be considered different.

    4. Object References: If you’re trying to access properties of an object, ensure that the object itself is correctly instantiated and that you are referencing the correct property.

    5. Debugging Statements: Insert debugging statements (like console.log() in JavaScript) before the lines where you use the variables to check their values. This can help you confirm whether they hold the expected values.

    6. Game Loop: If you’re using a game loop, ensure that the variables are being updated correctly within that loop and that you’re not overwriting them unintentionally.

    7. Documentation and Examples: If you’re using a specific game engine or framework, refer to its documentation for best practices regarding variable management and linking.

    If you can provide more context or details about the code you’re working with, I’d be happy to help you further!

    #16990
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    Koen, the script does not need to be linked to anything. The linkages are all in the Scenes.

    When you open the project, no Scene is open by default, so you can’t play anything. To get things started, go to the Scenes folder, and double click on either the Main Menu scene, or one of the Cave scenes. You should be able to play the game thereafter.

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: