Forum begins after the advertisement:


[Part 8] Inventory (hold “i” to see it)

Home Forums Video Game Tutorial Series Creating a Metroidvania in Unity [Part 8] Inventory (hold “i” to see it)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13458
    Allan Valin
    Level 5
    Participant
    Helpful?
    Up
    0
    ::

    Hey,
    quick feedback.
    Having to hold the I to see the inventory is kind of annoying. Is there an easy way to make it not go away unless you press “i” again or Esc?
    Considering that, it would be relevant to stop time while you browse. Same goes for when you unlock an ability or spell and get attacked by a monster.

    (Aside from that, I commented on another forum topic where I had an issue with the hearts.)

    Do any of those gets addressed in the last couple videos? Because each part takes me in average 4-8 hours to complete, varying greatly between each video, I’d appreciate feedback before I try to solve that, just to find out I had to watch ahead to find the solution lol.
    The worst offenders I already wrote essays about the problems, but from part 6 on things got better, thought it’s not perfect, since some bugs (or inconsistencies that aren’t addressed) are still there.

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

    Thanks Allan. The inventory issue isn’t addressed in future parts, but you can make it so that pressing I will toggle the inventory instead of having to hold the key. Change your code as follows:

    In PlayerController, update the GetInputs() function as follows:

    void GetInputs()
        {
            xAxis = Input.GetAxisRaw("Horizontal");
            yAxis = Input.GetAxisRaw("Vertical");
            attack = Input.GetButtonDown("Attack");
            openMap = Input.GetButton("Map");
            openInventory = Input.GetButton("Inventory");
            if(Input.GetButtonDown("Inventory")) openInventory = !openInventory;
            if (Input.GetButton("Cast/Heal"))
            {
                castOrHealTimer += Time.deltaTime;
            }
        }

    What this does is that whenever the inventory button is pressed, the state of openInventory is flipped. This will turn it on or off.

    #13461
    Allan Valin
    Level 5
    Participant
    Helpful?
    Up
    0
    ::

    Thanks, that worked nicely =D

    Talking about feedback, since you’re reviewing the series, there’s some features from Hollow Knight that weren’t covered, right? Like the fast travel beetle, the Dream Nail teleport gate, nail upgrades, currency, access to secret areas by destroying walls, dialogue sequences, shops, as well as the equipment power-ups, from the top of my head.
    idk, just a thought.

    Oh, while editing I just remembered that sometimes when I use Desolate Dive, the collision doesn’t work and I go under the ground, falling into the void.

    I’m starting part 9 now, might come back later if anything comes up. After I finish part 10 I’ll try implementing the New Input System; if I get it working I’ll post the PlayerController as reference for your series review.

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

    Yup, I don’t mind covering all of these, but I’m working on the Vampire Survivors series at the moment. Once I’m finished with that, I will be more than happy to cover all of these, but that may be a year or two from now.

    As usual, thanks for documenting all of your thoughts and suggesetions here!

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

Go to Login Page →


Advertisement below: