I dont think its possible but you can try ,?PropInpulse?,I think yet I am almost certainly wrong or you can use SetEntityPlayerInteractCallback and SetEntityActive so when barrel1 (which is on its side) is touched barrel 2 (upright) will activate and barrel 1 will deactivate.
The activate method will look wierd tho and the PropInpulse method will make the barrel go flying through the air unless you spend hours to get it just right.