How to change the default animation state through script

My character has the ability to be a fisticuffs fighter or he can use a sword or a handgun. What I need to be able to switch from a fisticuffs idle animation which would be a something like a basic fighting stance to an idle handgun stance which would be something like pointing the gun at the ground. I have the system set up so that each weapon is equipped using the numbers to cycle through so how could I make it so that when the gun is equipped the default state is the gun idle and if no weapon is equipped the default state is the fighting idle state?

use different layers and then use setlayerweight to switch between the layers with different idle animations.