It says in the gmlive documentation that dynamic expressions in switch statements are iffy.
But, to me it was unclear to which degree this was the case. Quote from the documentation:
"Needless to say, that does get a little nastier with fall-through cases, and GMLive currently
may not agree to compile a "case" if it's expression cannot be computed compile-time (things like ord("A") are fine though)."
I wrote some code for a state machine-like object. A very simplified example of the code would be something like this: