Hellooo everyone,
So I'm trying creating a Shop that stays on the menu of my game, my idea is that the player does not choose the item to buy, but after paying he will receive a random item. I saw that Godot has some visual elements to create an interface but I don't know how to execute my idea.
Thanks!
Creating a Random Drop System
You should watch some tutorials on creating UI if you aren't familiar with it.
This one is good to start with:
And then maybe this one would help you:
Then for your purpose, instead maybe the "mystery item" chooses at random from an array.
var item = array_of_items[randi_range(0, array_of_items.size())]
Or you could use a better method described on this page:
https://docs.godotengine.org/en/stable/tutorials/math/random_number_generation.html#doc-random-number-generation-weighted-random-probability