I'm working on my character selection passage. I have three different characters that the player can choose. I'd like the list of possibilities appear in random order, so that different people, or the same person on replay, get a different character as the first listed choice. (I think people are more likely to pick the first option on the list, but I want all the options to have equal weight, as much as possible.)
Attempts so far:
1. Using (random:). I tried
(if: (random: 1,3) is 1)[You can choose to be Char1, Char2, or Char3!]
But this would require doing six different randoms to get all the possible list orders.
2. Using (shuffled:). I tried
(set: $choosechar to (a: "Char1","Char2","Char3")
(print: (shuffled: ...$choosechar)
This, while random, only prints one of the three choices.
Is there a better way to get a random list order?
Comments
and it printed the entire shuffled array, separated by commas. Does that not work?
If you'd like a slightly prettier presentation, you can slip some Javascript into the print statement:
I went ahead and shuffled the array before assigning it to $choosechar.