Godot Version
4
Question
ok so idk how to trigger this button to be visible because it takes multiple factors (you have to have all three items) and when i tried (if bread == 5 and milk == 5 and apple == 5:
$checkout.visible = true) it didn’t work, in fact it wont properly type out in the proper code space so that’s why it’s not there
$checkout.visible = true
Hi!
Your problem is hard to understand, tbh. You’re saying that by writing:
if bread == 5 and milk == 5 and apple == 5:
$checkout.visible = true
the checkout node is not set visible properly. Without more context, this could be due to many reasons:
- “$checkout” is not a valid node path.
- bread, milk or apple or actually not equal to 5.
- You may want >= 5 instead of == 5.
- Depending on where the code is, it may just not get called.
I’d suggest you give us a bit more context/more code to read so that we can help you accordingly. Or, maybe in my few guesses there’s one that’s correct, let me know.