I would like to store various values in an array and then from different levels in the game find the corresponding element and spawn an object from the retrieved value.
For example ...
Player enters the shop on level 1, check array and see that the shop sells a knife, shield, and herbs.
Player enters the shop on level 2, check array and see that the shop sells a sword, armor, and health potion.
Is this a proper way to approach this? If so, what value do I store in the array (name or some id) and how do I spawn based on the retrieved value. (When I try to spawn another object, I only see the drop down menu of existing objects, nothing that can be replaced by a formula or variable)
If there's a different way to do this, I'm also open to hearing that.
Thanks for any help.