In the meantime, to anyone: are we able to combine *hide_reuse & *selectable_if? I want the option to only be selectable if a condition is met but, once selected, it canât be selected again.
You canât do that with a double inline command. But instead of *hide_reuse, create some sort of tickbox variable to confirm whether the option has been selected, like below:
Yes, I use true/false rather than integer (unless I need to keep track of multiple possible states for something), but this is what I do all the time. Itâs the only way to combine *hide_reuse and *selectable_if functionality.
*selectable_if ((hallclock >= 0) and exhibit1) #The Whales.
Hallclock starts at 3. With each choice made it ticks down one. When it hits 0, this option (and those like it) become unselectable and, in their place, the âexit the hallâ options become selectable. Exhibit1 is a boolean - set to true for all exhibits - but once selected is set to false. That way you can choose exhibits in any order you want, canât select the same exhibit twice and once you have picked three your only options are to leave the hall.
This appears to be working. I wish there were a more elegant solution.
So you gave me a link to two files. I recreated each of those files, with the same code. The first one starts with *return - shall I include that as well?
Then I need to add in my story " ```
*create my_array 5 5 4 3 2 1"
So those numbers are the values of the things I want to sort. So should that be?
*create my_array {Anthropology} {Astronomy} {Biology} {Entomology} {Geology} {Paleontology} {History}
?
And then I add:
${my_array[1]} = 1
${my_array[2]} = 2
âŚ
${my_array[7]} = 7
?
And if that all works, I can then add code like this?
*temp lowest_value {p_array_ref&â1â}
*temp highest_value {p_array_ref&p_array_ref&âcountâ}
The lowest value is ${lowest_value}.
The highest value is ${highest_value}.
which will allow me to do checks against lowest_value and highest_value to determine if something is at the top or at the bottom.
Where my_array is an array created like youâve suggested above. Youâll also need to *create a variable called âcslib_retâ.
You donât likely want to mess with the implementation of this (so donât go using p_array_ref). Itâs a library function, so the intent is to treat it like an opaque box, feed data in and get data out.
All that said, if you want to know which stat/variable is the highest. This isnât what you want. This is great for dumping an ordered scoreboard or something, but it canât link you to which stat each value belonged to.