I've been trying to create a personnel database in an object with an option to retrieve random 3 persons/values. I am quite content with repeating the same code three times, since I most probably won't be needing to pull more than 3 values at once, but I just can't get over the fact I have no idea how to make that work in a loop, the way I want it to work.
As far as I can get is this:
<<set $Database = ["Person1", "Person2", "Person3", "Person4"]>>
<<for $i to 0; $i lte 3; $i++>>
<<set $Random = (0, 3)>>
<<set $RetrievedPerson1 = $Database[$Random]>> <--Here is where my problem starts. I have no idea how to format the "Retrieved Person" name the way for the loop to increase the number with each loop iteration. I am guessing it can be done easily, but I couldn't find an answer. I don't even know how to properly formulate the question.
I would appreciate any suggestions.
It also would be good to know how to put an object within an object in Twine and how to recover that values, but I guess I can figure out a way around that.
Sorry for my english.