Best way to set up a customer order system.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By SugarBeetle

I’m trying to make it so a random order of a set of images spawns after the player fulfills the previous order like a cooking game. What would be the best way to spawn an array of images randomly in specific place on the screen? I thought I could have 3 sprites and randomly set different textures to them but I feel like this is probably the wrong way to go sbout it?
Any advice is welcome.
Thank you!

:bust_in_silhouette: Reply From: Inces

Is it really images You want to spawn ?
Because I would imagine, that in game like this, You would want to spawn some objects, that relate not only to visual appearance, but to a certain data. For example You will spawn “bread” “tomato” “fries”, and each of these data will :

  1. Be displayed as certain image
  2. Expect player to collect certain object to fulfill next order

So I would create some UI with 3 image slots. Whenever a new ingredient condition would be initialized, signal with condition name would be emitted. UI would receive this signal and display image that is named similarily in free slot ( for example “tomato.png” would be created from + “png” ).