However there may be times when you mess up and it's a good idea to have a plan and train it under some pressure. If you are ambushed, all your enemy's weapons will be pointed at you and you will be standing on the proverbial X. Not a great place to be!
You basically have three choices:
Retreating, which is not always possible if the ambush has been sprung.
Moving down what I call route one, which is to step directly towards the enemy, aiming to overwhelm them.
Stepping off at an angle towards the enemy but rather than coming straight down his centre line, you come in on his left or right side, out flanking him.
Assuming weapons are involved, of the three options I prefer stepping off the X on an angle on the Kali female triangle as below:
Outflanking him gives you a number of advantages, you get out of the line of his attack and you can come back in across his centre line, closing down one side of his body and distance yourself away from the far side of his body. You can also get in behind him, allowing your weapons the bare on him as below:
Your footwork will need to be explosive as you will need to get off the danger area as quickly as possible.