How to make an image appear?

I’m making something like a gacha for testing, I have a script that is basically an rng, but I wanna make it so an image will appear if a certain munber is generated. How would i go about doing that?

gachapon.zip (16.6 KB)

Here’s a simple one with GUI.

This simple way references animations based on numerical values.

If you want non-numerical names then when you roll for a prize you must add up all of the possible probabilities, associate each item’s name with a number range, and then reward the player with the prize based on the range.

I probably misunderstood your question when you asked it. There are a number of ways to “make images appear”. You could for example use factory.create() to spawn an object and then set its sprite to the animation of the prize. Or do what I did in previous example and simply disable the prize node at the init, and then enable it once it’s ready to display a prize. If you ask more specific questions it may be easier to help you.