Hi,
you'll have to implement a higher level manager for your current "state". but I sense you will byte your own tail with this...
typically to solve this, I would experiment with the following, I did it on a previous project but it was not as time sensitive as input decision.
maintain an fsm called "Player State" which has as may states as there are player movements, so you would have "Crouching" and you would have "FireBall" as well as the start state.
have a global event for each of these states "PLAYER / STATE / ENTER CROUCH"
"PLAYER / STATE / ENTER FIREBALL" and when an fsm catches a user input it sends this event as early as possible for other fsm to query for the current state of that "Player State".
Then if your fireball must not be working if the player is crouching, when the fireball fsm catches a user input it will first query for the state and it if founds that it is "Crouching" then it won't validate the input and bail, else it proceed AND fire the global event "PLAYER / STATE / ENTER FIREBALL".
but again, be carefully you could be end up in a racing condition. I would analyse further what is the logic behind the choice for the same user input to crouch or launch a fireball, the answer may be that there should a higher level context for a player to allow certain types of movement and combos or not so your "Player State" fsm may end up being more generic, with states like "Attacking", "Defencing", "Stealth mode", etc, and then obviously you may not want to launch the fireball if the player is currently in "Stealth mode", that will be up to your game description to decide on these rules of course.
to query for the sucrrent state you can use the action "GetFsmState".
you can also completly revert this logic, and in the fireball and crouching fsm implement the global events "PLAYER / STATE / ENTER XXX" and based on these switch to a state that doesn't listen to user input ( like disabled in a way) or not. so you would maintain also global events like "PLAYER / STATE / EXIT XXX".
the later approch also means that if you have npc, they can act in a very intuitive way to your player actions, defencing when the player attacks, attack when the player idle etc etc.
Bye,
Jean
and