Replies: 3 comments 11 replies
-
|
@Jalkhov Use the "contents_changed" inventory signals to update your UI, it seems to me that your UI may be updating before things happen in the inventory. |
Beta Was this translation helpful? Give feedback.
3 replies
-
|
Testing i have maded this: if inventoryc.visible:
if Input.is_action_just_pressed("interact"):
print_inventory()
if Input.is_action_just_pressed("add_item_a"):
Global.Inventario.add(item_id, 1)
Global.Inventario.update_stack(0) # Added this
print_inventory()
if Input.is_action_just_pressed("remove_item_a"):
Global.Inventario.remove(item_id, 1)
Global.Inventario.update_stack(0)
print_inventory()And works, but, its the correct way? I feel that parameter its too static |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
If you want i can make a minimal version of my project, just with things that doesn't works, soy you can run and test by yourself |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Well, that, when add items to Inventory, just show icon and stack when its >= x2
Godot_v4.4.1-stable_win64_btGOVpuWDz.mp4
Beta Was this translation helpful? Give feedback.
All reactions