|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
Irrelevant Person |
I want to make an inv for my character and also Items, which dropped as loot, in this inventory, but I have no idea how to do it in Godot.
Are there specific videos or something, that could help?
|
|
|
|
Reply From: |
Panagiotis Halatsako |
You will have to program your inventory.
A simple implementation could involve a list, that would have non unique items, for example “KEY_RED”, “FLASK_HP20”, “KEY_RED”, “KEY_WHITE”. Each of the items should be parsed along when you need to use them and get an appropriate process from your code.
Another implementation could be having a plain node object in your player and add items (pre-defined nodes) under that node, for example Red Key, Flask 20HP etc, which could be a scripted inherited object.
Same rules apply in both of them, and utilizing the .has() function could save you alot.
For visual representation you can use itemlist: ItemList — Godot Engine (stable) documentation in English