Hi! I was testing methods for tower building and now i have a problem. Is there a way to build armory without owning a factory?
None.
Unless you're gonna have it be single player and force the player to type in "Modify the phase variance" and then detect them making a building that requires tech, no. If you aren't going to use a building like a Supply Depot that's the same size as an Armory, you can have all Supply Depots convert to Armories, although I'm not sure if this would work out in the situation you want it in.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Basically no. You can't really circumvent tech requirements.
You could give him the factory for just a short time if that works in your concept.
Or create it by triggers. You could have a pointer (e.g. drone) and burrow it when you want to build an armory there. Then center on the drone, remove it and place and armory there.
Otherwise your best bet is replacing another building, as inferno suggested.
If you don't want to see the factory ever, you can disable vision, or you can give the factory to another player every 100th frame (without using optical flare), then give it back on the next trigger run. No vision, and you only lose the factory 2% of the time.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
Another option, if you don't want the player to do anything with the factory like build or lift-off, is to use a disabled unit sprite. I'm doing this in my map, where I want players to be able to build Comsat stations at will, which requires an Academy, but don't want the player to be able to research stim packs. Obviously I could prevent research of stim packs by setting the ore/gas cost so high they could never click on it, but that's not terribly professional, and I can't disable stim packs as I need Raynor and Gui Montag to have it. The good thing about this approach is that I want the player to only be able to build 1 comsat station ever, so once they've built one, I simply destroy the Academy.
None.