Godot Version
godot version 4.7.2
Question
I was making a shop sistem and I wanted the buttons to buy the stuff disapear if there’s not an item in its collum (I recently started godot), this is the code I used
if a == 0:
%Button2.hide()
%Button.show()
%Button3.hide()
%Button4.hide()
%Button5.hide()
elif a == 1:
%Button2.show()
%Button3.hide()
%Button4.hide()
%Button5.hide()
elif a == 2:
%Button2.show()
%Button3.show()
%Button4.hide()
%Button5.hide()
elif a == 3:
%Button2.show()
%Button3.show()
%Button4.show()
%Button5.hide()
elif a == 4:
%Button2.show()
%Button3.show()
%Button4.show()
%Button5.show()
it basically sees the length of the list (a) and determines if its shown or not (Im pretty sure theres a more effective way) could someone say me what to look for to why it doesnt work?