If I understand you correctly you want the units to be stealthed when they're in your base "only" right?
Well one thing you could do is just give them the stealthupdate module except make it so that it is not active when the unit is alive, create the atructures so that they create the stealth generator just like the GPS special power (the reason for the stealthupdate in the units is that when they are given stealth by any means the engine will read that peice of the unit, so if you have it stealthforbidden = moving it will stealthed until it moves, see?). Other then that suggestion I guess you don't have a pot to pee in.
