Is there a way to poll the current state of an object for use elsewhere?
Hello fellow intrepid adventurers, I have a question that has been bugging me for some time.
Question summary: Is there any way in Captivate (2017) either pass an object's state name either directly to a variable, or use that value directly in an if/then statement? I don't think Advanced actions are quite advanced enough for this, though there may be a way in JavaScript.
OR is there a way to automatically change the state of an object as a variable changes?
Backstory
Current method: What I usually do is create a "state counter" variable to "track" state changes. The learner clicks a button, it switches the object to a particular state, and assigns/increments/decrements the assigned counter variable to a corresponding value. When it comes time to check the answer, I simply use a lengthy if/then statement to check for the appropriate variable combination, and then trigger a success or failure caption.
For example: here's what my increment button might look like.

The only purpose of this variable is to assign some sort of significance to the changes in state.
Alternate method: I realize when using purely numerical or text-based values, I can simply display "$$VariableName$$" on the screen, without tying a multistate object to it, however there is a mix of text-based and non text based data displayed, and i'd like to not use 2 different methods.
So what's the problem?
It's frustrating having to script resets for the variables on slide re-entry, while I can simply check a box to get the multistate object to revert to its default state. Furthermore, I don't see any way of setting the range of a variable to automatically reset. like if the object it's tracking only had 5 states, I cant set the range of Variable_A to be 0-5. instead, I have to script an if/then statement to reset the variable back to zero if it is incremented past 5.
I admit this may not seem like much of an issue for the single example I quoted, however imagine this script buried in one of 15 different tabs in an advanced action. Then repeat this process for 15 different buttons. That's an awful lot of placeholder variables whose sole purpose is to parrot what is displayed on the screen. Now imagine trying to troubleshoot why a correct answer isn't registered after shuffling around between slides.
So then I got to thinking, Object states naturally reset back to their normal state when you increment them past their final state. Furthermore, it's easy to set whether or not an object retains its state on revisit. What if there were a way (either through JavaScript, or through something I'm missing in advance actions) to just use that data instead of a counter variable? Wouldn't it be great if I could just say something like:
IF (the state name of MS_screen1 = config_Menu1 )
trigger steps 1,2,3
ELSE
trigger steps 4,5,6
