Rock Paper Scissors State machine help

I’m trying to set up a rock, paper, scissors state machine. I’m using the default Vive controller.

Requirement: player can change to Rock, Paper or Scissors at any time.

I was hoping someone could give me some advice about the setup below. Need I just need fix up my conditions, or use something else entirely?

The current controls are:

  • Trigger = Scissors
  • Grip = Paper
  • Trigger + Grip = Rock

What I have now works, aside from the fact I run into state lock sometimes when pressing the buttons at about the same time. definitely has to do with how I have the conditions set up, but I’m not sure about the best way to fix it.

Here are the animations I have (all of them are the exact same length):

  1. Rock (looping)
  2. Paper (looping)
  3. Scissors (looping)
  4. Idle (looping)
  5. Idle_To_Rock
  6. Idle_To_Paper
  7. Idle_To_Scissors
  8. Paper_To_Scissors
  9. Rock_To_Paper
  10. Rock_To_Scissors

(4-10 are played backwards as needed.)

The conditions check only the following things as needed:
Grip_Pressed, Trigger_Pressed, TimeRemainingRatio (>=.9 for backwards anims, <=.1 for forward anims)

Here’s a screenshot of the state machine.

I ended up fixing it myself. I was getting state locks (stuck in a state) likely because I was checking each variable’s value in each condition, and I had conditions for every possible state change.

Now I have :

I think before, when I was checking all variables (is trigger pressed, is grip presses, is ration <) on every single condition, that the variables were changing in less than a frame, causing it to get in unexpected states.

Now, (except for the Rock, which requires both trigger and grip press), checking if one prerequisite is met before transitioning fixed the issue up. No more state locks. Oh yeah, I also made it so you’d always go into paper or scissors, and you can no longer go directly into rock. Allowing it, to begin with, I think made it unnecessarily complicated.