I would use a variable to track what animation I was in, then read from that variable at the end of the current animation to decide which animation to go back to. For example:
On Fire Play Animation (MachineGunAnimation) Play from beginning
On player collision with bullet Set lastAnimation to MachineGunAnimation
Play Animation (hit-By-bullet) Play from beginning
On hit-by-bullet animation end, play animation (lastAnimation)
LastAnimation at that point should be the MachineGunAnimation.
Sorry if my psuedo code doesn't match up on syntax, I don't have C2 in front of me right now.