How to Make an Inventory System in Godot - Hotbar Scrolling (#6)

Поділитися
Вставка
  • Опубліковано 4 лют 2025

КОМЕНТАРІ • 35

  • @cer0652
    @cer0652 3 роки тому +15

    As I always say, people who do tutorials on the internet are gods among mortals. Especially if they are godot tutorials.
    .
    +1 sub.

  • @Gamedev00100
    @Gamedev00100 3 роки тому +9

    you know that coding is easier when watching your episodes, nice keep it up.

  • @NocturnalMorning
    @NocturnalMorning 3 роки тому

    Thanks to you I have an inventory system almost completed for my game. Really awesome tutorials. I look forward to seeing more of them.

  • @phunq_
    @phunq_ 3 роки тому

    Thanks a lot for those tutorials, they are fast, well made, and help a lot when learning game dev!

    • @Arkeve
      @Arkeve  3 роки тому +1

      Glad to hear that!

  • @cjgamedev7890
    @cjgamedev7890 3 місяці тому +3

    Thank you for tutorial and for godot 4.2
    PlayerInventory.active_item_updated.connect(slots[i].refresh_style )

  • @Tam_Hawkins
    @Tam_Hawkins 3 роки тому +2

    This time I strayed from your script a bit.
    I made it so that my Hotbar would change from inventory slots 0-9 to 10-19 and so on with scrolling the mouse wheel and then I made the number keys (not numpad) to switch between the hotbar slots. Way to many if/elif/else though, there is probably a way to make that slimmer. And at the end I made a mistake by applying the same system I have for scroling through the inventory slots with my hotbar to the active slot, forgeting that the active slot goes for the hotbar slots and not the inventory slots. Obviously once I scrolled my hotbar I did not see the active slot anymore. Not obvious for me though, i needed quit a bit of time before I realised that I overenginered my script^^.
    Thanks for the Tutorial.

  • @futilefoxx6512
    @futilefoxx6512 3 роки тому +2

    Arkeve... you have achieved G.O.A.T. status.
    also wanna ask if you are gonna do a dialog tutorial with json because that would be absolutely awesome

    • @Arkeve
      @Arkeve  3 роки тому

      I'll try to do one sometime soon!

  • @NigelsPad
    @NigelsPad 3 роки тому

    Awesome series! Can't wait for the next part, I'm assuming being able to put inv slots in equip slots and vice versa is the next topic?

  • @unethicalhacker4610
    @unethicalhacker4610 3 роки тому +2

    Do you might know why my selected texture is not showing? I wrote the same exact code as you but it is not showing in my hotbar

    • @baconator2391
      @baconator2391 2 роки тому

      i have that same problem

    • @lee8728
      @lee8728 2 роки тому

      Hi, try to change the logic of refresh_style function like this
      func refresh_style():
      if item == null:
      set('custom_styles/panel', empty_style);
      if slot_type == SlotType.HOTBAR and PlayerInventory.active_item_slot == slot_index:
      print(slot_index);
      print("HOTBAR")
      set('custom_styles/panel', selected_style);
      else:
      set('custom_styles/panel', default_style);

    • @lee8728
      @lee8728 2 роки тому

      oo i found another error, you just need to change if to elif. Line elif item == null:
      func refresh_style():
      if slot_type == SlotType.HOTBAR and PlayerInventory.active_item_slot == slot_index:
      set('custom_styles/panel', selected_style);
      elif item == null:
      set('custom_styles/panel', empty_style);
      else:
      set('custom_styles/panel', default_style);

  • @skelonz2612
    @skelonz2612 3 роки тому +2

    Are you gonna be making more devlogs again?

    • @Arkeve
      @Arkeve  3 роки тому

      Yeah, hopefully soon

  • @Mrtargi
    @Mrtargi Рік тому +1

    Have somebody updated connect function in the hotbar to godot 4?

    • @kristoffercummings
      @kristoffercummings Рік тому +3

      Could try this
      PlayerInventory.active_item_updated.connect(slots[i].refresh_style)

    • @Mrtargi
      @Mrtargi Рік тому +1

      @@kristoffercummings thank you for the answer)

  • @mio-xh1ln
    @mio-xh1ln Рік тому

    I'm getting the error code: "Invalid set index 'texture' (on base: 'Nil') with value of type 'StyleBoxTexture'." Anyone any ideas on why ? :(

  • @baconator2391
    @baconator2391 2 роки тому

    i cant get the hot bar scrolling to work

  • @glaedr0173
    @glaedr0173 3 роки тому +1

    Hi, I was wondering if you could add one more episode where you make a chest like in Minecraft or Stardew Valley, where you can store items. I have been working on this and having a difficult time. If you would prefer instead, maybe we can talk 1 on 1 and you could help me with this. Thanks in advance

    • @Arkeve
      @Arkeve  3 роки тому +1

      I hopefully will make a video on making chests soon

    • @glaedr0173
      @glaedr0173 3 роки тому

      @@Arkeve I have tried my hand at it, it's a bit buggy but works mostly but I could send it to you if that'll help

    • @glaedr0173
      @glaedr0173 3 роки тому

      @@Arkeve I have it working now, not buggy at all lol

    • @buterbrodxd7259
      @buterbrodxd7259 3 роки тому

      @@glaedr0173 Hi, how did you manage to do this, I have been sitting with this problem for many days.
      Have you made an inventory's for each chest?

  • @ritikung2350
    @ritikung2350 3 роки тому +1

    Can you make a drop item function?

    • @Arkeve
      @Arkeve  3 роки тому

      Ill add that in the to do list :)

  • @eugenegalway5112
    @eugenegalway5112 3 роки тому

    YYYYEEEESSSS!!!!

  • @gengami
    @gengami 3 роки тому

    Bro please make a dialogue system tutorial from scratch ....plezzzzz 🙏

  • @ggrandfatherr2294
    @ggrandfatherr2294 3 роки тому +3

    THANKS ARKEVE!!!