Godot Version
4.6
Question
Hello :3
Im following MakerTech’s inventory tutorials (currently at the end of the third video rn), and i think i messed up pretty badly
for a little context, ive done almost everything to a T, but for the slots they weren’t adding each other into columns like they were supposed to (video 1), so i added one slot and then copy and pasted it, and then made the other inventory slots as a child. I dont know if that would cause my problem, but its worth mentioning. (with the gridcontainer, when i tried to add more columns in the inspector, they just kept spawning right below each other and I couldnt figure out how to make them spread out)
Now, at the end of the third video, the items I added to the player inventory as tests are not showing up like hers. Is it the grid container, or is there another reason?
Also, heres some code i thing might(?) be a problem? Maybe? (im not sure, im just guessing- this is the script for the inventory)
extends Control
@onready var inventory: Inventory = preload("res://Resources/Playerinv.tres")
@onready var slots: Array = $NinePatchRect.get_children()
var isopen: bool = false
func ready():
update()
func update():
for i in range(min(inventory.items.size(), slots.size())):
slots[i].update(inventory.items[i])