I have 3 scripts that I want to interact with each other:
- Customer script - contains gender, age, budget, etc. Different for every customer (randomized) attached to customer
- AI Script - contains decision making functions. Same for every customer. attached to customer
- Catalog script - contains all items and all stats about the item. attached to gameMaster
How it interacts
- Customer accesses AI script to look
at item - AI script gains information from customer script for demographic info
- AI script accesses Catalog script for stats about item for decision
making - Returns a bool that decides whether to buy or not
- If buy, subtract money from customer budget and move on
- If not buy, walk away and look for another item
Is the the most efficient way to do this? I have about 200 items in the catalog script. What is the best way to organize these 3 scripts?