'How do I Incorporate Lists into my Scratch Game?

I want to incorporate a list for my tycoon game, but I do not know how. I tried a lot of ways and failed each time. How can I incorporate a list into my scratch.mit.edu cash tycoon game? I am thinking of having an investment feature but I do not know how to use a list for something like that. I attached an image of my current code: https://i.stack.imgur.com/xbjmo.png



Solution 1:[1]

have three lists:

  1. a list of all investment options(names)
  2. a list of their price incressis(the same order as the first list)
  3. a list on what investments you have(the names)

repeat every ? seconds:
now loop over the last list and based off of the item number of the first list add $ based off the second one

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 myrccar