I am doing this in my campaign: Create a spell book with all possible abilities you want, with in mind those abilities require the techtree of a dummy unit. When the unit reaches X conditions, create the dummy unit, with locust, no model, and no sight, somewhere. When they leace those conditions, pick all those units owned by that player and remove them
Actually the best was to do that is The_Raven's way, you don't have to mess around with a bunch custom units.
Init
Events
Map initialization
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Disable Ability for (Picked player)
Events
<Your Event>
Conditions
<Your Conditions>
Actions
Player - Enable Ability for (Triggering player)