Godot Version 4.2
func process_item(item : Item):
var new_item = item_scene.instantiate()
add_child(new_item)
new_item.set_item(item)
# player_inv_ui.grab_focus()
for slot in player_inv_ui.slots:
if check_slot(slot, player_inv_ui, new_item):
set_grids(slot, player_inv_ui, new_item)
place_item(slot, player_inv_ui, new_item) # create new function later thats just place instead of release_grab
# new_item.global_position = slot.global_position
# print(slot.global_position)
break;
Question
godot dosnt want to set the positions of the grid slots no matter what i try…
basically, it prints the wrong position if the control isnt visible on game start, but if i start game and open inventory the close it or just open it; then pickup an item it prints the correct position, so if i want it to work i have to open it atleast once🗿