In my game, the player performs actions (A, B, C, D, etc) in a certain order (1, 2, 3, 4, etc). At runtime, I'm using an XYZ array named Journal to store for each action a value corresponding to its order.
The following drawing shows the status of the array at the end of the game. It reads that actions have been performed in the following order :
E, D, A, B, I, etc
I want to create a LogBook function for the player so that they can browse through their game history. So I need to create a function that goes through the array, pick the numbers in their order and add the corresponding action description (A, B, C, etc) to a text file to create a sort of narrative.
How can I do that ?