I’ve discussed the following issue in private with Draconis, in relation to his Booleans extension (it basically uses objects as truth states) but I’m returning to it anew to see if there’s a way around a certain issue.
Background - This extension I’m making has so many switches the author can set, I wanted to include a better way to set them.
I have some objects which carry multiple truth states, and you can ‘tick (object)’ or ‘cross (object)’ to turn all its states on or off at once. There are also 3 custom phrases for turning individual switches of these objects on or off.
But then I still have a ton of plain old truth state switches separate from these objects.
My ideal goal would be to have the commands ‘tick’ and ‘cross’ work on the objects, but also on any truth state variable as well, so that authors wouldn’t have to pay attention to which were which.
So I have object phrases like this:
[code]To tick (H - a hotkey option) menu:
now menu of H is true;
To tick (H - a hotkey option):
tick H support;
tick H hotkey;
tick H menu;[/code]
And a fall through phrase intended to catch regular truth states, like this:
To tick (T - a truth state):
now T is true;
The phrases intercept and identify the correct things (hotkey objects or truth states) but then I realised that in the truth state case, T isn’t returning the truth state variable, it’s returning the true or false setting of T, so it doesn’t work.
Question - Is there any way to make the truth state phrase work as I intend?
If not, I could make all the variables in the extension tickable/crossable boolean objects but then the player can’t ‘tick’ their own variables, and they start to run into that ‘I need to remember which is which’ issue. Of course it’s not an error that goes undetected, because the program just stops compiling if you use the wrong one. But it’s annoying, and is not intuitive.
One alternative I thought of is: make only the special objects that carry multiple truth states tickable and crossable (their fewness and their context makes them easy to remember). But that leaves a mountain of truth states brought by the extension which just have to be set by ‘now (blah) is true’, still giving two different ways to do things in an area (CYOA variables) where one would be more logical.
-Wade