Variable Strings inside variables
I am working on a game where the player can bring up the daily newspaper to read the headlines. I am using the text string object to print the headlines. What I need to do is
if the player is in a certain city, one of a group of 2o specific headlines will appear, and if he is in another city
another of a group will appear, this is for eight different cities. But the next day I want another of the twenty headline to appear, and each day rotate with another until
all twenty headline appear, and then start over.
Any ideas would be appreciated.
Re: Variable Strings inside variables
Hey.
Use list objects to store the headlines. One list object for each city and fill them with the headlines.
To pick a random headline, simply pick a random line from the list object, and then delete that line. Use Random(Number of lines in the list object) so that the first day it will pick among 20, the next day 19 and then among 18 lines etc as there are fewer headlines to choose from.
When the list is empty you have to fill it again with new or old headlines. Perhaps store all the headlines in another list or variable.