I want to give a unit lower piercing armor while they are attacking but leave the piercing armor high while walking or standing. As in, a houscarl has a shield, but he puts it on his back while attacking with his two-handed dane axe. Thus, he should be more vulnerable to archer fire while attacking, but should still be able to move to and from target without taking too much damage from archers, towers, etc.
I have not had a chance to try this out yet, but I was wondering if using villager mode might allow the unit to change attributes while attacking? I worry that even if possible, the unit would never revert back to carrying a shield while walking. Villagers change forms only when assigned to a new task, not when told to walk to a location. Given that the only tasks a military unit can form are to attack or walk, this probably wouldn't work.
Side note, I imagine this could be done using triggers or having a button like the trebuchet that transforms the unit into another unit. However, I am specifically wanting something more automatic that the AI will benefit from as well.
I have not had a chance to try this out yet, but I was wondering if using villager mode might allow the unit to change attributes while attacking? I worry that even if possible, the unit would never revert back to carrying a shield while walking. Villagers change forms only when assigned to a new task, not when told to walk to a location. Given that the only tasks a military unit can form are to attack or walk, this probably wouldn't work.
Side note, I imagine this could be done using triggers or having a button like the trebuchet that transforms the unit into another unit. However, I am specifically wanting something more automatic that the AI will benefit from as well.