There are two ways.
One would be giving the unit 'Locust' ability, so that it can't be selected, but will exist and can still do the basic moves like attacking and etc.. However, it will also make the unit not be able to be attacked (since it acts as an invulnerability for the unit), and will be fully unselectable, so it can't be ordered manually without triggering.
Another way would be simply triggering it, unselecting the unit whenever a player selects it.