It is possible to make a building abitlity like terran bunker? There are two abilities which can be modified to make a similar ability. First is hyppogryph taming, which allows to 'garrison' only one unit, the second is battle stations which can be garrisoned by several units, but the damage does not change with variable number of units inside. Still no one ability does not allows to fire units with their original weapon. What can be the closest implementation to terran bunker ability.
What I would do is create the building with 2 forms of attack, one flamethower and one machinegun. To begin, keep both attacks off then make triggers that activate the gun and multiply the attack speed of the building attack depending on how many units are in it (and parrallel triggers that divide the attack speed when they exit).
check out upgrades, look at how the flying bombs upgrade works and see if you can adjust it to your needs, i'm not going to go much more into detail but that should get you started
This is bad idea indeed. Even if it can work, you may not modify attack speed with upgrades because:
upgrade improves ALL units upgrade can NOT be unlearned.
This is difficult problem and it is imposible (as far as I know) make this function for "mass use". There is few ways to make such effect, but all is difficult (for maker as well as for computer) and may not be used more than several times